Bug: voiceName configuration is silently ignored in gemini-3.1-flash-live-preview (Multimodal Live API)

I am using the Multimodal Live API with ephemeral AuthTokens (authTokens.createBidiGenerateContentConstrained WebSocket). My implementation strictly follows the API documentation for voice selection, but the gemini-3.1-flash-live-preview model completely ignores the configured voice and always defaults to a fixed voice.

Environment:

  • Model: models/gemini-3.1-flash-live-preview

  • Endpoint: generativelanguage.googleapis.com (Google AI Studio)

Payload Structure Used: I am wrapping the configuration correctly inside the token creation request as follows:

JSON

"bidiGenerateContentSetup": {
  "model": "models/gemini-3.1-flash-live-preview",
  "generationConfig": {
    "responseModalities": ["AUDIO"],
    "speechConfig": {
      "voiceConfig": {
        "prebuiltVoiceConfig": { "voiceName": "Kore" }
      }
    }
  }
}

What I’ve verified (Troubleshooting steps taken):

  1. The JSON schema is accepted by the API (no 400 Bad Request error).

  2. systemInstruction configured exactly the same way works perfectly.

  3. I have tested multiple valid Live API voices (Kore, Puck, Aoede). The result is always the same fixed default voice.

  4. I tested both baking speechConfig into the AuthToken and delegating it to the client WebSocket setup message (using lockAdditionalFields). Same issue.

Question: Is speechConfig intentionally hardcoded/disabled on the backend for the 3.1-flash-live-preview model, or is this a bug in the voice synthesis module? Any timelines on when custom voice selection will be enabled for 3.1?

Thank you!

Hello @Tuong_Nguyen,

Setting speechConfig directly inside ephemeral token creation (bidiGenerateContentSetup) is currently not honored by the live session runtime, causing the audio to fall back to the default voice.

To ensure your requested voice takes effect, configure speechConfig directly within the initial client WebSocket setup message upon connection rather than baking it into the ephemeral authentication token.

Next steps:

  • Pass your speechConfig (with your desired voiceName) inside the client-side setup message when establishing the WebSocket connection.
  • If you still face issues, let us know.