feat: local silero vad and pre-speech ring buffer for telephony input#656
Open
Gmin2 wants to merge 1 commit intobolna-ai:masterfrom
Open
feat: local silero vad and pre-speech ring buffer for telephony input#656Gmin2 wants to merge 1 commit intobolna-ai:masterfrom
Gmin2 wants to merge 1 commit intobolna-ai:masterfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
bolna has no in-process VAD today every "user is speaking" decision waits on the ASR providers speech_started over the network, so first syllables get clipped and barge-in pays a full round-trip. This adds an opt-in local silero VAD with a 500ms pre-speech ring buffer in
TelephonyInputHandler, when enabled, audio is gated locally and speech events feedinterruption_managerdirectly. setvad_configon the input section of the agent JSON to turn it on; off by default, byte-identical to main otherwise.I tested this end-to-end against a real Deepgram session on a 6-second speech clip. With the local VAD on, we send 31.7% fewer bytes to Deepgram (48000 → 32800), the transcript and WER (0.083) come out identical, and Bolna learns the user is speaking at 1522ms instead of waiting until Deepgrams SpeechStarted at 2050ms about 527ms faster barge-in. Full harness and the little benchmarks can be seen at: 3b7ac0a