Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the older (V4) version? #479

Closed
helloWorld199 opened this issue Jul 1, 2024 · 1 comment
Closed

How to use the older (V4) version? #479

helloWorld199 opened this issue Jul 1, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@helloWorld199
Copy link

helloWorld199 commented Jul 1, 2024

Hi,
I've been using your model to detect vocals in audio tracks. It was working pretty fine and the choice of the window was a cool feature that allowed me to optimize the detection. Now with the newer version I see a lot of the activity is not detected, and I would revert back to the older model. Is there a way to do this? I tried loading the older model from the hub but it seems it's not available anymore.

By loading it in this way:
USE_ONNX = False # change this to True if you want to test onnx model
if USE_ONNX:
!pip install -q onnxruntime

model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad:v4.0',
model='silero_vad',
force_reload=True,
onnx=USE_ONNX)

(get_speech_timestamps,
save_audio,
read_audio,
VADIterator,
collect_chunks) = utils

I get this error:
~/.cache/torch/hub/helloWorld199_silero-vadv4_master/hubconf.py in
2 import torch
3 import json
----> 4 from utils_vad import (init_jit_model,
5 get_speech_timestamps,
6 get_number_ts,

ImportError: cannot import name 'get_number_ts' from 'utils_vad' (/root/.cache/torch/hub/snakers4_silero-vad_master/utils_vad.py)

I'm don't really know how torch hub works, but I would like to know how to resolve this versions conflict, and use the v4 one,

Thank you!

@helloWorld199 helloWorld199 added the help wanted Extra attention is needed label Jul 1, 2024
@snakers4
Copy link
Owner

snakers4 commented Jul 1, 2024

#474

will be fixed here
we know about the problem

the choice of the window was a cool feature that allowed me to optimize the detection

turns out some people were passing the whole instead of a chunk
in any case with the new version we changed some internals in the model
and audio chunk size choice became pointless since the results now hardly depend on it

@snakers4 snakers4 closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants