Mycroft Community Forum

Google Cloud TTS - Configuration of mycroft.conf

Dear team,
I’m trying to use a voice from google cloud TTS. I added the following in mycroft.conf, unfortunately I only get the error message “can not connect to mycroft server”. When I configure mycroft.conf to use another STT, I get no error message. Can you help me with how to edit the the conf to use google cloud voice? How can I choose, which of the Google Cloud voices I want to use?

“stt”: {
“module”: “google_cloud”,
“google_cloud”: {
“lang”: “de-de”,
“credential”: {
“json”: {
“type”: “service_account”,
“project_id”: “german-r…3950”,
“private_key_id”: “e24332…c”,
“private_key”: “-----BEGIN PRIVATE KEY----------END PRIVATE KEY-----\n”,
“client_email”: “test-156@german-…eaccount. com”,
“client_id”: “10012…888”,
“auth_uri”: “https://accounts.google.com/o/oauth2/auth”,
“token_uri”: “https://oauth2.googleapis.com/token”,
“auth_provider_x509_cert_url”: “…”,
“client_x509_cert_url”: “…”
}}}}

Hey Jonny,

I just had a quick look and am wondering if it also requires the google-cloud-speech Python package as Google have modified their authentication mechanism.

Can you try installing this in the Mycroft virtual environment?

If you have the helper commands on your PATH you can use:

mycroft-pip install google-cloud-speech

Thank you for your feedback. I tried it, unfortunately it does not help. I used the demo python script from google and it works that way. So I probably change some code in the mycroft scripts to send the text to be spoken to my own python file for replay. Do you have a link or file within the mycroft code where I best take the output text from to send it to my python file? Or where I might modify the mycroft code to work with google cloud text to speech?

If outhers can use it, here 2 links to get it working:

https://cloud.google.com/text-to-speech/docs/quickstart-protocol?hl=de

https://cloud.google.com/text-to-speech/docs/reference/libraries#client-libraries-install-python

Each of the STT engines has a class defined at mycroft-core/mycroft/stt

So you could hack your mycroft-core to send it to your other script instead.

We will have to investigate further why this isn’t working though.

Ok, thank you! I don’t have too much time at the moment, will go on as soon as possible.

This would be fantastic to see working, the option to use WaveNet voices would be a big step up in user experience.

Could the TTS section of the example mycroft.conf file at

Be updated to include examples for using Google Cloud Voice? Thanks!