I was looking to utilize the following API: Text-to-speech (TTS) - Home Assistant to obtain the MP3 file URL from generating a TTS sentence.
I couldn’t find a way to call upon this API from within HASS itself. Is this possible? Alternatively, I ended up configuring a long live token and calling a rest_command to myself which works but don’t know if I’m missing something:
create_tts:
url: http://localhost:8123/api/tts_get_url
method: post
payload: '{ "message": "{{ message }}", "engine_id": "cloud" }'
headers:
content-type: 'application/json'
authorization: !secret tts_token
verify_ssl: false