TTS Stopped working - mp3 files still generated

Hello,

My text to speech stopped working for some reason in all my automations. For troubleshooting, I have tried to manually trigger it by using Developer Tools->Call Service TTS, also using media player entities and Node Red.

I am trying to send it to my google home players, computers, Browser Mod devices, etc…None of them are saying anything. Google Home devices do the beep as if they were about to say something, so they are getting the command but again - no audio. When I look in my /tts folder I do see the correct mp3s being generated and if I play them I hear exactly what they are supposed to say.

Any ideas? Thanks

Ok, adding base_url seemed to have fixed it. Not sure why it wasn’t needed until now.

Hello,

I know it’s an old thread, but Googling the same problem sent me here. :slightly_smiling_face: Where did you put that base_url, and how did you specify it? I’m running Home Assistant OS on an Intel NUC, and also use Nabu Casa.

I think the base_url method has been deprecated. Your URL’S are now configured at Settings - Network - Home Assistant URL. Not sure about using this with Nabu Casa as I’m using a DuckDNS URL.

Ok, thanks. Seems I can’t get any local mp3 files to play in neither Sonos speakers nor a Goggle Nest Hub.

Can you play the file from a computer using the correct path? I’m using Node Red, and I use the media_player play_media service call with the following URL, which I can also get to from a browser:

http://192.168.0.115:8123/local/sounds/ding.mp3

For TTS I have the following in my configuration.yaml:

tts:
  - platform: google_translate
    cache: false
    cache_dir: /config/tts
    time_memory: 60
    service_name: google_say

For testing in Node Red:

[{"id":"05d060faf5774fa3","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"d9c62aad3cb7723b","type":"inject","z":"05d060faf5774fa3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":80,"wires":[["88b5a1a7b81363f2"]]},{"id":"88b5a1a7b81363f2","type":"api-call-service","z":"05d060faf5774fa3","name":"Speak","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"tts","service":"google_say","areaId":[],"deviceId":[],"entityId":["media_player.rpi4"],"data":"{\"message\":\"{{payload}}\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":280,"y":80,"wires":[[]]},{"id":"c6d8001d836d8c96","type":"inject","z":"05d060faf5774fa3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"str","x":110,"y":160,"wires":[["8f94098483b6d03a"]]},{"id":"8f94098483b6d03a","type":"api-call-service","z":"05d060faf5774fa3","name":"Play Ding.mp3","server":"8be923df.d66f9","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.rpi4"],"data":"{\"media_content_id\":\"http://192.168.0.115:8123/local/sounds/ding.mp3\",\"media_content_type\":\"audio/mp3\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":300,"y":160,"wires":[[]]},{"id":"8be923df.d66f9","type":"server","name":"homeassistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Sorry, I missed this answer! But this entry in config.yaml fixed the TTS problem at least:

tts:
  - platform: google_translate
    service_name: google_say
    language: 'no'
    base_url: http://xx.x.x.xx:8123

But going to Settings → System → Network and changing the URL for Local Network from https://homeassistant.local:8123/ to http://xx.x.x.xx:8123 may fix the general problem of playing mp3 files. I forgot to try that one, since TTS now works fine, but I should try that as well I guess.