Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Default French Voice Changed in Google Cloud TTS API

Hello,
I'm using the Google Cloud Text-to-Speech API in Python, and until recently, I was getting a specific French voice by default without specifying the name attribute. Suddenly, the default voice changed. I've tested all available French options but can't seem to retrieve the previous voice. How can I restore the old configuration (perhaps by specifying the name attribute)?
Thanks in advance!
```
def main(lang, ssml, ofile):
    synthesis_input = texttospeech.SynthesisInput(ssml = ssml)

    voice = texttospeech.VoiceSelectionParams(
    language_code=lang, ssml_gender=texttospeech.SsmlVoiceGender.FEMALE)

    audio_config = texttospeech.AudioConfig(
        audio_encoding=texttospeech.AudioEncoding.LINEAR16, sample_rate_hertz=8000)

    response = client.synthesize_speech(request={"input": synthesis_input, "voice": voice, "audio_config": audio_config})

    with open(ofile, 'wb') as out:
        out.write(audioop.lin2alaw(response.audio_content[42:], 2))

main('fr-FR', '<speak>ceci est un test</speak>', '/tmp/test.al')
```

0 2 898
2 REPLIES 2