Conversation
Close #26
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 93.69% 94.02% +0.32%
==========================================
Files 16 23 +7
Lines 1348 1690 +342
==========================================
+ Hits 1263 1589 +326
- Misses 85 101 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds an AI-capable call stack to the VoIP library by splitting “audio-only” vs “AI” responsibilities, introducing agentic call handling (Whisper → Ollama → Pocket TTS), and refactoring RTP call handling to dispatch parsed RTP packets.
Changes:
- Introduce
voip.aiwithTranscribeCallandAgentCall(newaiextra), and extend the CLI with anagentcommand. - Refactor call handling around
voip.rtp.RTPCall+ parsedRTPPacketdelivery, and extendAudioCallwith outbound encoding/packetization. - Update docs/navigation and optional dependencies to reflect the new module split.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
voip/types.py |
Replaces digest enums with a new ByteSerializableObject protocol used by message/packet types. |
voip/stun.py |
Docstring/logic tweaks; tightens STUN request guard and adds an assertion before callback. |
voip/srtp.py |
Documentation formatting + RFC reference-style links. |
voip/sip/types.py |
Adds SIP digest algorithm/QoP enums; minor docstring formatting changes. |
voip/sip/protocol.py |
Switches call handler type to RTPCall and updates many docstrings/links. |
voip/sip/messages.py |
Makes Message implement ByteSerializableObject; docstring/link updates. |
voip/sip/__init__.py |
Adds re-exports (Message, Request, Response, SessionInitiationProtocol, CallerID) and RFC link docstring. |
voip/sdp/types.py |
Expands docstrings and updates inline references in SDP types. |
voip/sdp/messages.py |
Docstring/link updates; removes redundant __bytes__ docstring. |
voip/sdp/__init__.py |
Adds RFC 4566 reference-style link docstring. |
voip/rtp.py |
Introduces RTPCall and RTPPacket.__bytes__; RTP mux now dispatches parsed packets to packet_received. |
voip/call.py |
Removes the old Call base class module. |
voip/audio.py |
Drops Whisper code from audio; adds outbound encoding/packetization + per-packet decode path. |
voip/ai.py |
New AI module: VAD-based transcription + Ollama/Pocket-TTS agent responder. |
voip/__main__.py |
Refactors CLI structure (sip group holds AOR/options); adds agent command and shared connect helper. |
tests/test_rtp.py |
Updates tests to use RTPCall + packet_received and validates RTPPacket serialization. |
tests/test_main.py |
Updates CLI invocation style and adds agent CLI test coverage; stubs AI deps. |
tests/test_call.py |
Ports tests to RTPCall and send_packet; adds SRTP encryption assertion. |
tests/test_audio.py |
Reworks tests to cover encoding/packetization/resampling and removes Whisper tests from audio. |
tests/test_ai.py |
New comprehensive tests for TranscribeCall and AgentCall. |
tests/sip/test_protocol.py |
Updates SIP protocol tests to use RTPCall and packet_received semantics. |
pyproject.toml |
Splits extras into audio vs ai; CLI extra now includes AI deps. |
mkdocs.yml |
Reorganizes nav to include Calls/SDP/SIP/RTP under “API Reference”. |
docs/sip.md |
Switches to module-level mkdocstrings entry for voip.sip. |
docs/sdp.md |
New module doc page for voip.sdp. |
docs/rtp.md |
Switches to module-level mkdocstrings entry for voip.rtp. |
docs/calls.md |
Updates calls documentation to reference RTPCall, AudioCall, and AI calls. |
README.md |
Updates CLI usage/examples; updates Python API example to TranscribeCall; adds Ollama link. |
.pre-commit-config.yaml |
Adds a ty type-check hook (excluded for tests; skipped in CI). |
.github/copilot-instructions.md |
Allows Markdown links in docstrings and clarifies docstring conventions. |
You can also share your feedback on Copilot code review. Take the survey.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@codingjoe I've opened a new pull request, #35, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: codingjoe <[email protected]>
Co-authored-by: codingjoe <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Close #26