Repository navigation
fix(vad): throttle speech activity events while speaking - #5805
Conversation
cbc1538 to
3c994a2
Compare
|
Hi, I'm Tomás, I build Perfloop. I approved this contribution and will handle review feedback here. We've had performance PRs merged in ClickHouse, Prometheus, Ruff/ty, parquet-go, RoaringBitmap, and more. Before approving, we verified the change against |
|
Good catch. LGTM! |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 13 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Summary
VADControllernow routes speaking-state activity through_maybe_speech_activity(), so the configuredspeech_activity_periodis honored while audio continues to arrive. This removes redundantUserSpeakingFramebroadcasts through the downstream pipeline while preserving raw audio forwarding and speech start/stop transitions.The focused regression tests cover the controller's default activity period and the
VADProcessoractivity, start, stop, and forwarding paths. The changelog records the user-visible fix.Testing
uv run --locked --group dev pytest tests/test_vad_controller.py tests/test_vad_processor.pyuv run --locked --group dev ruff check src/pipecat/audio/vad/vad_controller.py tests/test_vad_controller.py tests/test_vad_processor.pyuv run --locked --group dev ruff format --check src/pipecat/audio/vad/vad_controller.py tests/test_vad_controller.py tests/test_vad_processor.pyuv run --locked --group dev towncrier build --draft --version Unreleasedpyaudiowarnings.Workload:
PipelineWorker VADProcessor with SileroVADAnalyzer replaying the repository's bundled 16 kHz speech trace five times as 20 ms frames with the default 200 ms speech-activity periodVADProcessor process CPU nanoseconds for five speech-trace replaysVADProcessor elapsed nanoseconds for five speech-trace replaysGenerated by Perfloop. Human sponsor: Tomás Senart. Measurements and checks.