Use Google Cloud Speech-to-Text in Home Assistant

The recently announced voice stuff in 2023.5 are pretty neat, and of course both the local (whisper) and cloud speech-to-text are awesome.

But the more choices we have the better, so I made an integration that allows to use Google Cloud Speech-to-Text in HA. It’s pretty fast, supports a ton of languages and can be included in an assist pipeline like any other STT source.

For those insterested:

19 Likes

This is a MUST HAVE!!! Thank you very much :heart:

1 Like

This is very helpful indeed :fire: especially if you are running home assistant on a less powerful machine and can not have models running locally this will just make things very fast :rocket: .

I saw that it might take 7 seconds for Speech to text to run using faster-whisper on a Raspberry Pi 4.

1 Like

Could it be possible to run a model like Whisper on your own external server? If possible how?

Yes, there’s a docker image you can run in an external server. Check this thread:

I was able to setup an app to send audio over the websockets to Home-Assistant. Using Porcupine to detect a wake word and send the audio to a voice assistant pipeline.

This can work on a raspberry pi with a USB mic.

1 Like

I’ve activated the integration. It doesn’t appear as option for STT (it is there for TTS though). What am I missing? :slight_smile: (screenshot: https://take.ms/BoUBz )

Check that it is configured properly, the googlecloud.json file is valid (with API key etc) and HA is restarted.

Any stt related messages in the log?

Hello,
I have just integrated Google Speetch-to-text and I have the following error in the log at startup.

ERROR (MainThread) [homeassistant.helpers.config_validation] The stt integration does not support any configuration parameters, got [{'platform': 'google_cloud_stt', 'key_file': 'googlecloud.json', 'model': 'command_and_search'}]. Please remove the configuration parameters from your configuration.

I saw this happened to several people but I couldn't find a solution.
Can you help me ?

Hi, this is a known HA bug but it does not affect the integration, it should still work (if properly configured). I added a short FAQ in the README to let users know.

Thanks for your return.
I got stuck on this error, but I just tried and it works.
You should remember to restart HA after configuring the voice assistant.
Thanks for your addon, it’s great!

1 Like

[EDIT / I’ve rewritten my question]
I just installed and configured your plugin for Assist. It works pefectly with M5Stack devices, including/especially with my native language (Polish). But how to use it with google speakers? Within M5Stack settings I can assign “assist pipline” but how to assign this input chanel for Google spaekers?
I would appreciate any help.

edit: my mistake sorry

Hello to all, and thanks Chatziko for this awesome work!

I have the same issue with this error message:

Enregistreur: custom_components.google_cloud_stt.stt
Source: custom_components/google_cloud_stt/stt.py:194
intégration: google_cloud_stt (documentation)
S’est produit pour la première fois: 09:38:02 (1 occurrences)
Dernier enregistrement: 09:38:02

File /config/stt-home-assistant-427316-c5ebe86cb508.json doesn’t exist

I have tried to use the default googlecloud.json statement ( as instructed) and the full name of the file I downloaded in the configuration.yaml

What an I missing?

Thanks in advance for your help!

Hello to all,

it is also not working for me. I tried everything.

Is there no way to have a non english speech to text voicepipline integration on the market? There must be something that is working.

Tanks in advance

Hi to all!

I managed to set it up however when I try to use the assistant the only answer I got is “Unexpected error during speech-to-texr”

I guess it’s an API issue?

Do you have an idea to solve this?

thanks in advance!