-
Notifications
You must be signed in to change notification settings - Fork 672
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
Fix vad to return zero output for zero input #3685
Conversation
Hi @wasd96040501! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
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.
Hi
Thanks for the PR. (and sorry for not responding to the original issue)
I have a few comments;
- Please run
pre-commit run -a
to match the style of torchaudio. - We prefer not to add test assets, especially for cases where it's easy to create a synthetic one. Can you replace the zero assets with
torch.zeros
? - For zero audio, instead of performing sox compatibility check, I think we can directly check the correctness of the output value. Can we try that?
- Can we replace these assets with synthetic data that are created on the fly?
We would like to remove these assets, thus
Hi @mthrok , I have implemented the changes, please take a look😊 |
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.
LGTM. Thanks. Will merge if tests pass.
Hi, @mthrok It seems build conda failed. What can I do to fix this? |
The newly added tests no longer require `sox` CLI, thus it is better located at transforms_test.
@wasd96040501 This PR has nothing to do with build, and build jobs often fail for external reasons, so we don't need to worry about it. FYI: I edited the test you added a bit. |
Hi, I think the current way to handle
output: I realize this is not the best example, as there is no speech in that array of all ones. Here is a sample that didn't trigger the flag even though there is speech in it, which led me to discover this. |
fix #3668
Return empty result when not
has_triggered
.Zeroed wav audio added to unit test.