Google TTS, how to change to male voice?

Hi @Jizar_Stoffel

I got it to work last night - and seems the ‘gender’ is obsolete now, as you choose a voice.
Though, this might be different if you don’t use the advanced neural voices…

Hi,
It’s working great with Google Cloud parameters, but currently I’m stuck with one voice (the one configured in configuration.yaml).
I need to change the language (EN, ES, FR) when running automations, but I didn’t manage dynamically changing the language/voice when calling the tts service.
Did any one manage this ?

Thanks

Go here: https://cloud.google.com/text-to-speech/docs/voices
test the voice you want and change it in your configuration.yaml

tts:
  - platform: google_cloud
    key_file: googlecloud.json
    language: en-US # <<<<<<<<<<< here
    gender: female #<<<<<<<<<<<<<<<< here
    voice: en-US-Wavenet-C #<<<<<<<<<<<<<<<<<< here 
    encoding: linear16
    # speed: 0.9
    # pitch: -2.5
    # gain: -5.0
    profiles:
      - small-bluetooth-speaker-class-device
2 Likes

Hi,
@Jizar_Stoffel I don’t know if your reply was for my question.
Maybe I did not explain myself correctly.

I set it up correctly and can choose a voice, it’s working great.
But I want to change the voice any time I want through automation :

  • Automations for me would be in french for instance
  • I live in Spain, and so I need sometimes to output Spanish message…

Currently I only managed to specify one and only one voice.

Regards.

Hi,

Can you please help me, I think I did everything correctly, but still I don’t get the Dutch voice but the English one :frowning:

I put this in my configuration.yaml file

# Text to speech
# Example configuration.yaml entry
tts:
  - platform: google_cloud
    key_file: googlecloud.json
    language: nl-NL
    gender: female
    voice: nl-NL-Wavenet-D
    encoding: linear16
    speed: 0.9
    pitch: -2.5
    gain: -5.0
    profiles:
      - telephony-class-application
      - wearable-class-device

Copied the json file in my .config folder, restarted HA and still as I use this the language is in English :frowning: anyone who can help me with this please?

Screenshot 2020-03-14 at 18.59.46

I dont think that is possible at the moment, you only get the voice you setup on config.yaml

Need more info in order to help …
but it seems that you want it to use Dutch voices.
You need to set the voice (on config.yalm) to a Dutch voice and set your google devices (on the Google app) to the Dutch language. or it will try to read English as Dutch. All your automation need to also be in Dutch.
With me… if I set my voice to Portuguese and have the Language set to English. every automation I have sounds really strange.

I installed a new version and update my configuration.yaml file to NL and now it works, very strange but it works, so happy :wink: Thanks!

Hi,

i have the same probem.
Please tell new version of what have you installed and how?

Thanks a lot!

The same behavior. Tried to change some languages in .yalm, but it speaks only english (((

Hi guys!

Here is the solution of problem with setting up another language. Read after “PS”
https://community.home-assistant.io/t/tts-queue-in-node-red-for-google-cloud-and-other-tts-engine/214022

I am just getting started with Home Assistant and would like a bit of help. In the above example, do I need to include the “profiles” information? If so, I am not quite sure is required here for me?

Also, I see in some of them the speed, pitch, & gain are commented out. So I am assuming I only need those values if I want to tweak any of those values and that if I am happy with the voice “as is” they values are unneeded.

Thank you.

Any help is greatly appreciated.

Edit: Please disregard - I played around with it for a while and got everything working.

So… I used TTS using google translate. In the dropdown box asking for what language to translate to, I put en-gb. This gives me a female voice that has a british accent. Tried everything else, and nothing else appeared to work.