Skip to content

google-cloud-texttospeech: SynthesizeLongAudioRequest fails when using Gemini gemini-2.5-pro-tts model #14966

@Aananda-giri

Description

@Aananda-giri

I am attempting to use the gemini-2.5-pro-tts model, voice: Puck with the Long Audio Synthesis API for generating long-form audio.

I am following the official documentation for creating long-form audio:
https://docs.cloud.google.com/text-to-speech/docs/create-audio-text-long-audio-synthesis

Given code snippet works correctly. But, when passing gemini-2.5-pro-tts as model_name, and Puck as name, it is giving error: This voice requires a model name to be specified.

Code causing the error:

voice = texttospeech.VoiceSelectionParams(
    language_code="en-US",
    name="Puck",
    model_name="gemini-2.5-pro-tts" # This line seems to cause the Long Audio API to fail
)
client.synthesize_long_audio(request=request)

# full code:  https://docs.cloud.google.com/text-to-speech/docs/create-audio-text-long-audio-synthesis#create_audio_data

Observed Error:

InvalidArgument: 400 This voice requires a model name to be specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions