-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Describe the bug
Started receiving the following error message through the realtime session recently,
Error(message="Cannot update a conversation's voice if assistant audio is present.", type='invalid_request_error', code='cannot_update_voice', event_id=None, param=None)
This only seems to happens if you have a model_config passed to runner.run() method.
Debug information
- Agents SDK version: 0.2.10
- Python version: Python 3.10
Repro steps
- Setup the
examples/realtime/app/server.py
- Change the runner.run() line (
session_context = await runner.run()
session_context = await runner.run(
model_config=RealtimeModelConfig(
initial_model_settings=RealtimeSessionModelSettings(
model_name="gpt-4o-realtime-preview-2025-06-03",
input_audio_format="pcm16",
output_audio_format="pcm16",
input_audio_transcription=RealtimeInputAudioTranscriptionConfig(
model="gpt-4o-transcribe",
language="en",
),
voice="alloy",
speed=1.2,
),
)
)
- Talk to the agent and get past the handover.
- Right after the handover you should see
Error(message="Cannot update a conversation's voice if assistant audio is present.", type='invalid_request_error', code='cannot_update_voice', event_id=None, param=None)
Expected behavior
A clear and concise description of what you expected to happen.