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

Incoporate WebRTC VAD code #278

Merged
merged 84 commits into from
Aug 21, 2022
Merged

Incoporate WebRTC VAD code #278

merged 84 commits into from
Aug 21, 2022

Conversation

dhdaines
Copy link
Contributor

@dhdaines dhdaines commented Aug 12, 2022

Incoporate the more or less industry-standard VAD code from WebRTC. Still a draft as it is missing some really important features:

  • Doesn't support 44.1kHz (which is pretty ironic since WebAudio only supports 44.1kHz...)
  • Not integrated into the C API, and not very well integrated into Python
  • Missing unit tests in C, because the original tests were in C++

Having this checked in will allow us to unit test it when we add these missing features.

@dhdaines
Copy link
Contributor Author

Note that supporting 44.1kHz is fairly easy (if not really optimal) as the code to resample the input to an acceptable sampling rate (i.e. a multiple of 8kHz) is already present in the code, just not hooked into the actual VAD API.

The reason it can't be done without resampling is that the VAD code, for very good reasons, relies on filters designed and optimized for 8kHz sampled data. Arguably the right approach would be to have a parallel set of filters for 11025Hz data, which is, unfortunately, beyond my abilities in DSP.

@dhdaines dhdaines marked this pull request as ready for review August 21, 2022 16:33
@dhdaines
Copy link
Contributor Author

Now accepting other sampling rates (70d848d) and has okay unit tests for VAD (93d02d5). Endpointer considered to be tested via Python but I'll add a small C unit test as well before merging.

@dhdaines dhdaines merged commit 1395c2b into master Aug 21, 2022
@dhdaines dhdaines deleted the webrtc_vad branch September 21, 2022 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant