Using TTS as Translator

I’m trying to use TTS feature as translator but looks like it’s not working at the moment:

        "contents": [{
          "parts":[{
            "text": "Say and Translate In Spanish: Have a wonderful day!"
          }]
        }],

causes this error:

Model tried to generate text, but it should only be used for TTS. Make sure your instructions are clear to only generate audio from a given text transcript.

Is there any other way to do this?

1 Like

Hi @NeonByteNomad
I think it’s intended behaviour of the model . Check this out Speech generation (text-to-speech)  |  Gemini API  |  Google AI for Developers