Skip to content

feat(voice): 8 kHz audio support for VAD and Smart Turn#122

Draft
sam-s10s wants to merge 1 commit into
mainfrom
pr/voice-8khz
Draft

feat(voice): 8 kHz audio support for VAD and Smart Turn#122
sam-s10s wants to merge 1 commit into
mainfrom
pr/voice-8khz

Conversation

@sam-s10s

@sam-s10s sam-s10s commented Jul 20, 2026

Copy link
Copy Markdown
Member

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 an is_speech_likely fast-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 audio sample_rate/sample_width through to SileroVAD.process_audio.

Notes

  • Touches sdk/voice/speechmatics/voice/_client.py (only the VAD dispatch line). Sibling PRs pr/voice-ws-headers and pr/voice-forced-eou also touch this file in disjoint regions — clean merge in any order, possible trivial rebase for whichever lands later.
  • Extracted from the voice/v0.2.9-rc3 pre-release line.

Test plan

  • VAD produces sensible speech probabilities at both 8 kHz and 16 kHz
  • Smart Turn predictions unchanged at 16 kHz; reasonable at 8 kHz after resample
  • Voice test suite passes

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.
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.

1 participant