Conversation
…Bindu#353) Worker accessed task_operation["_current_span"] but scheduler now sends primitive trace_id/span_id strings. Add _reconstruct_span() helper to rebuild a NonRecordingSpan from hex-encoded IDs with graceful fallback.
Replace math.inf buffer size with a constant of 100 to prevent unbounded memory growth while still allowing task enqueue before the worker loop is ready.
Add SpanContext, TraceFlags, NonRecordingSpan, and INVALID_SPAN_CONTEXT mocks. Register opentelemetry.trace.span submodule so worker imports resolve in the test environment.
…audio config, pipeline builder, service factory, session manager, extension class)
|
Hey, thanks for working on adding voice support — really appreciate the effort here. I went through the implementation and there are a few areas we’ll need to address before merging:
Looking forward to the update! |
Voice Agent Extension — Progress & Documentation PR
Overview
This PR introduces the initial implementation of the Voice Agent Extension for Bindu, enabling real-time voice conversations between users and agents. The extension integrates backend, frontend, and testing components, following the architecture and plan outlined in
docs/VOICE_AGENT_PLAN.md.What’s Included
Backend
bindu/extensions/voice/with:__init__.py,voice_agent_extension.py,service_factory.py,pipeline_builder.py,session_manager.py,agent_bridge.py,audio_config.pybindu/server/endpoints/voice_endpoints.py(REST + WebSocket)bindu/settings.pyupdated withVoiceSettingsbindu/server/applications.pyupdated for conditional voice route registration and session managerbindu/utils/capabilities.pyupdated for voice extension helpersbindu/penguin/bindufy.pyupdated to accept voice config and add the extensionFrontend
frontend/src/lib/services/voice-client.ts: WebSocket client, audio capture/playbackfrontend/src/lib/stores/voice.ts: Svelte stores for voice state and transcriptsfrontend/src/lib/components/voice/VoiceCallPanel.svelte,VoiceCallButton.svelte,LiveTranscript.svelte: UI components for voice sessionTests
tests/unit/extensions/voice/test_voice_extension.pytests/unit/extensions/voice/test_session_manager.pytests/unit/extensions/voice/test_service_factory.pytests/unit/extensions/voice/test_agent_bridge.pytests/unit/extensions/voice/test_voice_endpoints.pyExamples & Docs
examples/voice-agent/main.py,.env.example, andREADME.mddocs/VOICE_AGENT_PLAN.md(implementation plan)Current Progress
docs/VOICE.md) are planned.How to Test
pipecat-ai[deepgram,elevenlabs,silero]andwebsocketsare installed (seepyproject.tomlvoice group).VOICE__STT_API_KEY,VOICE__TTS_API_KEY(see.env.example)uv run pytest tests/unit/extensions/voice/ -vGET /tasks/get.Next Steps & Improvements
docs/VOICE_AGENT_PLAN.md)docs/VOICE.md)uv run pre-commit run --all-filesReferences
Contributors:
For questions or feedback, please comment on this PR.