feat(voice): 8 kHz audio support for VAD and Smart Turn#122
Draft
sam-s10s wants to merge 1 commit into
Draft
Conversation
Silero VAD now handles 8kHz (256-sample chunks) as well as 16kHz; Smart Turn resamples input to 16kHz via FFT before feature extraction. Client passes the audio sample rate/width through to the VAD.
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.
Summary
Adds 8 kHz audio support to the Voice SDK's turn-detection stack (previously 16 kHz-only).
Changes
_vad.py: Silero VAD now supports 8 kHz (256-sample chunks / 32-sample context) as well as 16 kHz (512 / 64), keyed by sample rate throughout chunk processing, state init, and periodic reset (state also resets if the sample rate changes between calls). Adds anis_speech_likelyfast-onset property._smart_turn.py: resamples input to 16 kHz via an FFT-based method before Whisper feature extraction, so Smart Turn works regardless of the input rate._client.py: passes the audiosample_rate/sample_widththrough toSileroVAD.process_audio.Notes
sdk/voice/speechmatics/voice/_client.py(only the VAD dispatch line). Sibling PRspr/voice-ws-headersandpr/voice-forced-eoualso touch this file in disjoint regions — clean merge in any order, possible trivial rebase for whichever lands later.voice/v0.2.9-rc3pre-release line.Test plan