Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
+ Coverage 94.02% 94.12% +0.10%
==========================================
Files 23 23
Lines 1690 1720 +30
==========================================
+ Hits 1589 1619 +30
Misses 101 101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cho playback Co-authored-by: codingjoe <[email protected]>
Co-authored-by: codingjoe <[email protected]>
Done in da6d920. Duplicate code removed: Extracted CLI command added: Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Adds a new VAD-driven call handler (EchoCall) and factors shared voice-activity / buffering logic into a reusable VoiceActivityCall base, then exposes the echo behavior via a new voip sip … echo CLI subcommand.
Changes:
- Introduce
VoiceActivityCall(shared energy-based VAD, buffering, silence debounce, and flush hook) and implementEchoCallon top of it. - Refactor
TranscribeCallto inherit fromVoiceActivityCalland override buffering behavior for transcription. - Add
sip echoCLI command plus corresponding tests and API docs updates.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
voip/audio.py |
Adds VoiceActivityCall + EchoCall, updates codec preference defaults, updates module exports. |
voip/ai.py |
Refactors TranscribeCall to extend VoiceActivityCall and removes duplicated VAD/buffering logic. |
voip/__main__.py |
Adds voip sip … echo command wiring SIP answering to EchoCall. |
tests/test_audio.py |
Adds unit tests for VoiceActivityCall and EchoCall. |
tests/test_ai.py |
Updates tests for the new silence_handle naming and moved patch targets. |
tests/test_main.py |
Adds CLI tests for sip echo and updates module stubs. |
docs/calls.md |
Adds mkdocstrings sections for VoiceActivityCall and EchoCall. |
You can also share your feedback on Copilot code review. Take the survey.
Adds
EchoCall, a call handler that buffers the caller's speech and replays it once sustained silence is detected — useful for latency testing and call-flow demos.Introduces
VoiceActivityCall, a shared VAD base class that eliminates duplicate code betweenEchoCallandTranscribeCall/AgentCall. Also adds avoip sip … echoCLI command for quick end-to-end testing.Design
VoiceActivityCallencapsulates the shared VAD pattern:speech_threshold,silence_gap,speech_buffer,silence_handle,on_audio_speech,on_audio_silence,flush_speech_buffer, and thespeech_buffer_readyhookcollect_audio()controls which frames are buffered — default buffers speech only;TranscribeCalloverrides to buffer all frames (preserving intra-utterance silences)EchoCallonly overridesspeech_buffer_ready: resample buffered audio and send via RTPTranscribeCallextendsVoiceActivityCall, removing all previously duplicated fields and methodssilence_gapseconds of sustained silenceUsage
Tunable via keyword args:
CLI:
Changes
voip/audio.py—VoiceActivityCallbase class andEchoCall; both added to__all__voip/ai.py—TranscribeCallrefactored to extendVoiceActivityCall; duplicate fields and methods removedvoip/__main__.py—echoCLI subcommand added undersiptests/test_audio.py—TestVoiceActivityCall+ leanTestEchoCall(100% module coverage)tests/test_ai.py— updated for renamedsilence_handleand moved patch targetstests/test_main.py—TestEchoCLIaddeddocs/calls.md—VoiceActivityCallandEchoCallsections addedOriginal prompt
EchoCallclass that waits for the other party to finish (sustained low RMS) and replays the same audio back #36🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.