The ISP I use has limited ports that can be opened and cannot access 80, 443 and 8123 ports from outside.
Access from the outside is forwarded port 12345 to the 8123 by the router.
My voice mp3 files are cached and will play properly in Japanese when played with an audio player.
If you trigger a sound on the media player, you should be able to grab the full URL from the attributes in the states list on that device. Take that and plug it into your browser. If you get sound, you’re on your way to success. If you don’t, then you have an issue with your base_url, most likely.
The base_url in tts, even if the local IP or DuckDNS url is written, even if “https” is changed to “http” or nothing is written, there is no improvement, and it will silence after the beep .
And no matter what I do, the following error occurs.
I checked the media player “media_content_id” from the developer tool STATES. I found that the URL refers to the Duckdns domain of base_url. I think it will work if I can redirect media_content_id to a local IP address.
I understand you are trying to play an MP3 sound with TTS? Yes
I’m not sure if this is the same problem that I had, but I was trying to get Google TTS to play an MP3 sound as a door chime. It would’t work and after 4hrs I realised that the location of the file and the filename it self is case sensitive. My file name was “Classic-doorbell-sound.mp3” and it wouldn’t work because my file name didn’t have a capital C at the start, as soon as I changed it to make it match the file system it worked.
Your setup all looks correct though, it’s the same as mine.
Here is my yaml for the automation that calls the sound:
- id: '1558173150098'
alias: Garage Door Bell Chime
trigger:
- event_data: {}
event_type: doorbird_door_bell_doorbell_1
platform: event
condition: []
action:
- data:
media_content_id: http://192.168.1.39:8123/local/sounds/Classic-doorbell-sound.mp3 # the capital is required because linux is case sensitive and my file name has a capital
media_content_type: music
entity_id: media_player.garage_speaker
service: media_player.play_media
The only other difference is in tts:
I have 1 extra thing
The media_content_id is changing every time tts on media player.
I tried copy url and paste to chrome browser then it’s can play voice.
Why can play on browser but can’t play on google home?
I’m sorry for my poor English.
Does my English make sense?
I solved the problem!
I installed NGINX Home Assistant SSL proxy add-on. As a result, the local network is no longer SSL with a self-signed certificate. So now Google tts is working properly.
thank you all.
Thanks a lot for this suggestion!!! It solved so many issues I was having internally !!! Just installed the proxy add-on and everything started to work automagically !