I have successfully configured Google TTS and I can hear the female voice as the default voice for English language. The problem is, I gave my AI butler a male name and I don’t wish to change that. It is weird when he speaks in a female voice. May I know how do I change the voice of Google TTS?
I would like to know as well as she doesn’t sound very energizing in the morning
I’d like to know the characters to use to change to US English. Mine is Australian English and I don’t like the accent.
Just found this list, haven’t yet tested http://www.science.co.il/language/Locale-codes.php
Any update on this? I was wondering the same thing. I prefer the british male voice as it sounds more like Jarvis! The default google voice is very dull and robotic.
I was wondering the same thing. I had a look at the Google python file and found the below noted as language options:
SUPPORT_LANGUAGES = [
'af', 'sq', 'ar', 'hy', 'bn', 'ca', 'zh', 'zh-cn', 'zh-tw', 'zh-yue',
'hr', 'cs', 'da', 'nl', 'en', 'en-au', 'en-uk', 'en-us', 'eo', 'fi',
'fr', 'de', 'el', 'hi', 'hu', 'is', 'id', 'it', 'ja', 'ko', 'la', 'lv',
'mk', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sr', 'sk', 'es', 'es-es',
'es-us', 'sw', 'sv', 'ta', 'th', 'tr', 'vi', 'cy',
]
You should be able to use the below (at work so haven’t tested yet) to set the language to US English:
tts:
- platform: google
language: 'en-us'
I know it’s months late, but this worked great! Now to see if any are male voices…
I no longer use the TTS component. I use notification component that sends notifications to my Android devices. Then my devices will speak out the notifications using an Android app such as Voice Notify. That way, I can choose all sorts of voices available in Android.
thats a good idea.
but for most of us, we want HA to work with Google home/Echo. and this way we can have it speak out things like:
if front door sensor activates
then have GH/Eco say “Front door opened”.
so far, Ive done this for all of my doors and windows sensors on my alarm system.
and I can even change to any language I want. which is amazing to entertain guests…hehehehe
Here is a lil code I added today for my backyard door:
- alias: back door
trigger:
- platform: state
entity_id: binary_sensor.patio_door_opened
state: ‘on’
action:
service: tts.google_say
data_template:
entity_id: media_player.home
message: PORTA DO QUINTAL FOI ABERTA.
language: pt-br
Anyone figured out if it´s possible to change to male voice?
playing with google TTS for the 1st time and kind of sick of female voices, i.e. Alexa (echo). A good old British male voice would be nice… Anyone does it yet? Cheers
Amazon Polly does. Not aware of Google TTS having it available. I am using ‘Russell’ with Amazon Polly
ah nice one thanks, will try that
Still no news on this? It’s very weird when my custom tts messages are spoken by a different voice than my standard (male) Google voice.
I don’t think this is possible. Are your custom messages dynamic or static? If the latter, one option might be to find a male voice similar to Google in another TTS engine and cast MP3s directly instead of using tts. Not exactly what you’re looking for but it’s the only option that comes to mind for me.
I like to change things up a bit, so I have my TTS configured as basically, whenever a sensor is triggered, "[sensor name] is now [open/closed] / [on/off] with a dropdown menu on my groups page to select which language you want the announcements to play in. Sometimes I’m in an Australian mood, sometimes English…
So i stumbled across this rather old thread because i had hopes to do something similar… looked through the source code and found that the current method of google tts is actually not using the voice/tts api at all. It’s rather cleverly using the translate website to read out the text. No limits that way. That being said the current implementation does not allow for voice selection… if we wanted to use voices though on the actual tts api (https://cloud.google.com/text-to-speech/?hl=en_GB), it is free for the first 4m characters for base voices per month and free for the first 1m characters on the advanced voices per month… if someone were to have the time to dedicate to making a new module that utilizes the google tts api rather than the translate site, we could select the exact voice we all want. (“en-GB-Wavenet-B”)
Would need to set up an api key in the config for each instance… worth it?
This I must admit is amazing and worth dedicating my time to. No idea how long it will take me, but I’m on it.
Yall can try this… works great. Just remember to change your automation.yalm from “tts.google_translate_say” to “tts.google_cloud_say”.
no, when you set it up on the developer’s page, all you need to do is download the .json they give you and put on your config folder. I believe they use tokens now instead of crendentials.
this is my code on configuration.yalm
tts:
- platform: google_cloud
key_file: googlecloud.json
language: en-US
gender: female
voice: en-GB-Wavenet-C
encoding: linear16
# speed: 0.9
# pitch: -2.5
# gain: -5.0
profiles:
- small-bluetooth-speaker-class-device