serenadeai / speech-recorder

speech-recorder is a node.js module for streaming audio from a device's microphone and filtering for speech.
MIT License
86 stars 19 forks source link

Separate recorder logic from VAD #37

Open dsouza95 opened 1 year ago

dsouza95 commented 1 year ago

Currently in my application we use two recorders: the speech-recorder and the browser's recorder. The browser recorder works fine, but lacks the excelent VAD available in the speech-recorder. By separating the recorder logic from the VAD logic, we would be able to use any means to record audio, use custom audio processing pipelines and etc, while being able to leverage the VAD algorithm. I believe this would be very helpful for many, as it will be more flexible. @tmacwill Is that something you would consider changing or adapting in some way? Would be happy to help with this!

y-lobau commented 4 days ago

I confirm this would be a great addition to the library. I am building an audio assistant with Wake Word Detection, standing at the beginning of the audio processing pipe, so I need the VAD to receive audio bytes rather than recording itself.

dsouza95 commented 4 days ago

@y-lobau I would suggest taking a look at: https://github.com/ricky0123/vad It uses the same VAD as this project, the silero VAD, while not being tied to a recorder. Should make more sense than trying to modify the recorder at this point.

y-lobau commented 4 days ago

@dsouza95 Thanks for the hint. I already tried It. I need it for the node.js environment, which lacks real-time support. Unfortunately, it only analyzes files.

dsouza95 commented 4 days ago

Oh, I was not aware of that. Nevermind then!