I've used this project with openai-agents-python package source code customized.
So after i'm gonna provide code with fixed source code that you should directly use code with import.
⟶ A companion to OpenAI_S2S, purpose-built to implement a chained architecture.
uv sync
uv run python main.pyPLEASE READ BELOW LINE (main.py 196)
# patch_stt_event_handler() -> un-comment this : if you are using without modifying '.venv/lib/python3.12/site-packages/agents/voice/models/openai_stt.py' _handle_eventsAgent = name / instructions / handoff_description
math_tutor_agent = Agent(
name="Math Tutor",
handoff_description="Specialist agent for math questions",
instructions="You provide help with math problems. Explain your reasoning at each step and include examples",
)- Handoff ⊂ Tool
- Tool: function-calling, hosted tools(retrieval/web/computer use), agents-as-tools
Voice angent workflow SDK : SingleAgentVoiceWorkflow
PCM : Pulse Code Modulation
Results
14:15:40 [LIFECYCLE] {"event": "turn_started", "type": "voice_stream_event_lifecycle"}
14:15:43 [LIFECYCLE] {"event": "turn_ended", "type": "voice_stream_event_lifecycle"}
14:15:43 [LIFECYCLE] {"event": "session_ended", "type": "voice_stream_event_lifecycle"}