I am trying to set up the Google Cloud integration for speech to text not text to speech. However, my REST sensor isn’t working. It doesn’t even get created as a sensor. I have saved the json file mentioned in step 6 to the config folder.
Here is my configuration.yaml:
tts:
- platform: google_cloud
key_file: googlecloud.json
From these Google instructions, I put the following in sensors.yaml. I am not sure the syntax is fully correct.
- platform: rest
name: "Speech to text"
resource: https://speech.googleapis.com/v1/speech:recognize
method: POST
headers:
Content-Type: application/json
Authorization: Bearer $(gcloud auth application-default print-access-token)
payload: '{ "config":"{"encoding":"WAV", "languageCode":"en-US"}", "audio":"{"uri":"https://www.signalogic.com/melp/EngSamples/Orig/ENG_M.wav"}" }'
value_template: '{{ value_json }}'
Any ideas why this is not working?