-
Notifications
You must be signed in to change notification settings - Fork 160
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
Use silero v3.1 #142
Merged
Merged
Use silero v3.1 #142
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f961580
Use silero v3.1
Jeronymous 52100d2
Fixes #139 : Load distilled models, and assign them default alignment…
Jeronymous 7bead93
version 1.14.0 : can choose among several VAD methods (different vers…
Jeronymous a9334c2
update unittests
Jeronymous c7a71e4
Merge branch 'master' into bugfix/use_silero_v3.1
689e07e
version 1.14.1 : more hacky but solid way of handling silero folder m…
Jeronymous File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't make a symbolic link
snakers4_silero-vad_master -> snakers4_silero-vad_v3.1
in~/.cache/torch/hub/
, it does not work.It fails with
I also don't want to rename "v3.1" into "master" so that both versions can co-exist.
So I temporarily move master to make the symbolic link so that it works.
But I have to it at every call of the VAD. This is awkward and... imagine user does not have write permission on the folder...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jeronymous
I found a commit that addresses this issue in silero repository. But judging from commit dates, it seems to have been merged after default switched to v4.0? I don't know what is the best option here. I personally don't use the silero repo anymore. Because I wanted a near-instant inference start on demand (to skip non-speech in my local mpv player from any playback position) I switched to a self-contained minimal C program that calls to onnxruntime's C api in a dll. I just pipe the audio from ffmpeg and it immediately returns the timestamps. Switching silero versions for me was just a matter of renaming the model file and adjusting the onnxruntime api (the V4 IIRC changed output tensor dimension).
snakers4/silero-vad@df1d520
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for sharing this.
Given this, my solution in python makes sense. Just I don't like the fact of meshing like this with folders when processing an audio.
Maybe the right solution is just to fork silero from v3.1 and fix that particular issue inside...
Concerning the quality of silero VAD, apparently, there is no free lunch : it's not obvious that solving this case would not degrade in other circumstances (speech with very noisy background). See comments here: snakers4/silero-vad#396 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jeronymous In my case, the hypothetical issues of detecting speech with very noisy background accurately are so rare that they are indeed hypothetical for me. I can't speak for others using the whisper-timestamped, and I don't know your intended main usage for the project, so I will offer a suggestion strictly from my own perspective and usage patterns. For my use cases I would settle on the silero-vad version that suits best for my needs and set that as a reasonable default, and implement it first and foremost. Support the other version later if there is enough demand. And since silero-vad models are so small, and the inference code is so simple and short, I would just bundle the models (if license permits) and inference code with the whisper-timestamped project, and by removing a dependency we get rid of a potential failure point, downloading the entire repository for like 50 lines of python code, and dealing with all the symlinking and paths nonsense.
Unfortunately it wouldn't address my main issue with the project, (unacceptably high VRAM usage, making it impossible to run whisper-v3-large), but that's better addressed in topical issues like #110