Azure OpenAI gpt-realtime generating voice response despite text-only setting

Saurabh M 0 Reputation points
2025-09-20T07:06:46.19+00:00

The Azure OpenAI gpt-realtime service is sometimes generating voice responses and transcriptions even when the modalities are set to ["text"].

In the responses, text such as <|vq_hbr_audio_8233|> is being returned, despite the request for text-only modalities. Additionally, there is a new parameter called output_modalities in the OpenAI gpt-realtime API, but using this parameter results in an error.

Assistance is requested to resolve this issue.

Thanks

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
{count} votes

1 answer

Sort by: Most helpful
  1. Nikhil Jha (Accenture International Limited) 4,230 Reputation points Microsoft External Staff Moderator
    2025-09-24T08:05:05.7233333+00:00

    Hello Saurabh M,

    Your JSON clearly requests text-only modalities, yet occasional audio markers (<|…|>) appear because the session configuration still includes audio-related settings.

    Workaround:
    Even though you set "modalities": ["text"], your session.update includes both input_audio_format and output_audio_format. The Realtime API treats the presence of output_audio_format as an implicit request for audio capabilities, causing the service to insert audio tokens.

    To enforce text-only behavior, try to eliminate audio-related parameters from your session configuration:

    {
      type: "session.update",
      session: {
        "modalities": ["text"],
        // Remove these two fields entirely:
        // "input_audio_format": "pcm16",
        // "output_audio_format": "pcm16",
        "voice": null,                          // Optional: clear voice setting
        …
      }
    }
    
    

    As you noted: Don’t Use output_modalities Parameter The new output_modalities field is not yet supported in this preview and might return an error. Continue using modalities only.


    Please let us know if this helps. If yes, kindly "Accept the answer" and/or upvote, so it will be beneficial to others in the community as well. 😊


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.