Ok. Time to go back some steps before we’re trapped in a rathole (or open the next Pandora’s box).
Make a config/www folder with appropriate permissions.
Restart HA (Caution: FULL restart, not “Restart” from “Server Administration”)
Put a small MP3 file into the www folder.
Use “Direct URL” in the LMS Web UI to try playing that from your external URI, like https://xxxxxxxxxx.duckdns.org:8123/local/mytestfile.mp3. (Don’t miss the local, it is used instead of www.)
Use VLC or a browser on another machine and also try playing this file.
The first is a real music mp3 file and the second is one of the larger tts files created with google translate.
Both are working fine on the Mac and are playing.
On LMS I switched on normal radio play to hear if it still plays something, there is sound.
Then I opened both URL:
For both files the seconds are counting and the bar goes round and round, but there is absolutely no sound. I set the volume to max but nothing can be heard.
There is no error-message inside the LMS log!
So what is the difference to the “api/tts_proxy” folder? And why no sound?
I put the mytestfile.mp3 into config/tts folder, but this can not be played on the Mac.
Hmm. /api/tts_proxy/… is special. Putting files into the tts folder doesn’t work.
Files from the local (i.e., www folder) should play.
I wonder if this could be a problem with LMS8. I use 7.9.3 here. Or maybe even PiCorePlayer, since you were mentioning you use that.
You don’t by chance use a custom-convert.conf? If so, you might try to disable this by renaming to, say, custom-convert.conf.sav and restarting LMS.
We could now start getting LMS logs, but since this is the HA community, I’d suggest you hop over to either the PiCorePlayer forum or https://forums.slimdevices.com/ and ask there. Hopefully someone more knowledgeable has a good idea how to diagnose this further.
I strongly suspect either a LMS8 or a networking issue, but it’s always difficult if you aren’ŧ sitting in front of the systems. Sorry I couldn’t help more! Must really get a LMS8 test machine soon …
This is different, because I use the Duckdns Integration. So I can only use https and not http. If I want to go internally to my Home Assistant I have to use https://192.168.178.108:8123, so the certificate will not be valid, as it is only for names and not for IP-addresses.
These are the links that LMS was getting back in May from Home Assistant. I don’t know why. This was from the tts integration.
But now it seems that tts is not working anymore inside Home Assistant, as LMS is getting nothing. It seems that this is since HA 0.110.0.
The solution is here:
In the LMS settings set Player/Audio/Streaming Method to “Proxied streaming” (“Streaming über Proxy” in German, don’t know if my English translation is correct). and then it works, that’s all.
I am very happy!
The only problem is a HA problem I think. After a few positive tests, I am only getting this:
2020-06-06 23:25:42 ERROR (MainThread) [homeassistant.components.google_translate.tts] Timeout for google speech
2020-06-06 23:25:42 ERROR (MainThread) [homeassistant.components.tts] Error on init TTS: No TTS from google_translate for 'Hallo'
Hey @carsten_h, happy that all the complicated rest works out for you. Proxied streaming might not always be the best bet, but as long as it works out, great!
Your new error might be either:
– There was a problem connecting to Google Translate, or
– you used the same file for testing longer than 5 minutes, and have the TTS (file) caching set to off. HA will only keep the TTS file in memory (1st cache, remember?) for a default of 300s, but you can modify this value. See cache and time_memory in the docs here: https://www.home-assistant.io/integrations/tts/
Same issues here… Still no luck with google_say tts, LMS and pCP.
MP3 file is being generated, it’s accessible and playable via browser, LMS ‘sees’ the file and tries to play it.
But no audio output. It just starts playing ‘nothing’ forever, like a stream with no audio.
Running the latest version of LMS, pCP and squeezelite.
Any idea’s ?
Did some further testing by moving the TTS generated MP3 file to another location (amongst my music MP3’s).
LMS / Squeezelite seems to play this just fine. So there is no issue with the bitrate / encoding / … of the file itself.
The only difference is that it’s not played as being a stream (what HA seems to do), but as a file.
Using tips from this thread and a couple other community threads I have TTS working on a SB Boom, SB radio, and a ChromeCast device. The key things seemed to be my config and setting an internal DNS A record for my LMS server IP that matched my external DNS name.
Using current core HASSOS (core-2021.4.6) on a Pi3+ with NGNIX and Let’s Encrypt + DuckDNS – here is my config snip:
# Text to speech
tts:
- platform: google_translate
cache: true
# cache_dir: /tmp/tts
time_memory: 300
base_url: https://myexample.duckdns.org
service_name: google_say
Sending a TTS message will stop any of the active streams on all device types.
the pcp works perfectly with LMS/squeezebox, bluetooth, etc, but when I try to send TTS it doesn’t play anything.
From the LMS web page I can see the url is something like: http://<ip>:8123/api/tts_proxy/<random_hash>_-_picotts_remote.wav
but if I try to put that URL in the browser nothing happen.
The TTS works fine with local MPD player (using the RPi4 jack output).
I also tried to set the “proxy streaming” on LMS as suggested in this thread, but nothing changed.
Hi,
I don’t know if it is the same problem at your side, but I found a problem within Squeezelite versions >= 1.8.6-938.
Version above work perfectly fine.
Just a hint…
I had the same problem with TTS on LMS/Squeezelite. My solution now is, disabling SSL in configuration.yaml and using my Synology NAS as reverse proxy to keep access to HA from outside via HTTPS.
Now its working perfect!