Open WofWca opened 2 years ago
I was thinking about doing some frequency comparison. Maybe by getting the ratio between certain frequencies inside human voice range and outside of it. Some research would be needed, though, to find the right values. Also, non-instrumental music would probably cause some problems.
Finding an existing one would be cooler, at least in other languages, or at least in maths form.
What exactly are we looking for, would something like webvoicesdk be it? the demo seems to do what we are looking for.
What do you mean? The pros and cons in the issue description should give a rough idea. Have you looked further into tech specs of the library you suggested, how it's better than what we have now? Based on the demo it seems to also get activated by music. Anyway, thanks for suggestion.
I didn't look much into it. "State of the art Recurent Neural Network that uses WebAssembly portable runtime for voice activity detection." gave me the idea that it was taking into account more than volume. I think "finding something that doesn't get activated by music" is a good way of measuring it.
People who use NewPipe say that it does its job well (also it doesn't requre the user to specify volumeThreshold), so maybe copying their algorithm would be enough. It uses ExoPlayer, where the silence skipping feature is implemented:
Also see https://github.com/vantezzen/skip-silence/issues/36 (adaptive (dynamic) volume threshold)
A few thoughts about OpenAI's Whisper (also mentioned in #164). I'm not an expert, but at a glance it looks to me like VAD with extra steps? I'm looking at FUTO Voice Input and they're using both Whisper and WebRTC VAD (check the "credits" section in their app:
WebRTC - Thanks to the voice activity detection to stop recognition on silence
Currently we're simply calculating the loudness of incoming audio and if it's below a certain value, we say it's silence. Would be cool to find a specialized algorithm that does this better, like what voice communication apps do. FYI in theory we can use an implementation written in a different language, such as C, C++, Rust, Go - we could compile it to WASM.
And it's not necessary to replace the current implementation, we can make an option to switch between different silence detection algorithms.
➕ Advantages:
➖ Disadvantages:
Where to start (I update the list from time to time):
BiquadFilterNode
that would cut out frequencies that human speech is usually not associated with. See this StackOverflow answer also.Also see #164, there is a good collection of various VAD algorithms
I would appreciate your advice (as always).
I also found this: https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/noiseSuppression Idk what it is, but may help. Also this: https://github.com/w3c/webrtc-extensions/issues/76