Skip to content

error: cannot update a conversation's voice if assistant audio is present bug #1661

@shehan360

Description

@shehan360

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

  1. Setup the examples/realtime/app/server.py
  2. Change the runner.run() line (
    session_context = await runner.run()
    ) to the following
        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,
                ),
            )
        )
  1. Talk to the agent and get past the handover.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions