@hoffsta; did you make any progress?
I´m still stuck with empty TTS file in SB
No, squeezebox just won’t play the files. I removed base_url as prescribed above but it makes no difference. Haven’t had time to look into the command line options.
Ok, same for me
Too bad. TTS on SB would´ve been nice
But it’s only this ssl issue, isn’t it? Without ssl I have no problems with tts on SB!
Yes it seems to be related to SSL, I guess the best thing would be if the TTS url is created without https at all.
But I don´t know if its possible
Guys, I’m facing the same issue. Started troubleshooting and found this:
[17-06-15 17:44:39.9196] Slim::Player::Protocols::HTTP::canSeekError (815) bitrate unknown for: http://172.31.20.10:8123/api/tts_proxy/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_pl_-_google.mp3
klaus@nuc-prod1:~/Docker/lms$ file a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_pl_-google.mp3
a94a8fe5ccb19ba61c4c0873d391e987982fbbd3_pl-_google.mp3: Audio file with ID3 version 2.4.0, contains: MPEG ADTS, layer III, v2, 32 kbps, 24 kHz, Monaural
My TTS appears over on LMS, I actually can read the text in LMS that I sent from HASS but I can’t hear anything. Not using SSL or DNS Any Solution?
Thanks
Still no solution for TTS + LMS +SSL?
This is too bad, would be a nice feature
This seems to be a combination to the parts involved somehow
Trying to play other HTTPS content through LMS = OK, So HTTPS should be fine.
Trying to play TTS in browser or VLC = OK, So the file exists and is accessible.
Trying to play TTS via LMS = FAIL, So no clue why it isn’t working… maybe specific encoding problems, as seen in @kstaniek’s reply?
Does anyone know a way to change the bitrate/encoding of the TTS file google returns?
Just signed up for Azure Cognitve Services (following https://www.home-assistant.io/components/tts.microsoft/)
That works just fine, so it seems google related.
For what it’s worth, google gives Mono, 24000Hz 32-bit float but Microsoft outputs Mono, 16000Hz 32-bit float.
I’ll just stick with Microsoft for now.
This is what I added:
/etc/squeezeboxserver/convert.conf
mp3 mp3 squeezelite *
# RT:{BITRATE=–abr %B}D:{RESAMPLE=–resample %D}
[mpg123] -q -s -w - $FILE$ | [lame] --silent -q $QUALITY$ --resample 48000 - -
So microsoft tts is working through ssl with squeezebox? Can you for example tts current temperature through squeezebox?
Thanks!
You should be able to, I haven’t got mine setup to read out states tho. Just static phases like ‘there is someone at the door’
This is a problem in squeezelite when playing short files (1.7 - 1.8.6).
Upgrade the squeezelite version preferably to the latest (squeezelite-1.9.6.1198-armv6hf.tar.gz).
Repository: https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/
Because I have already installed squeezelite enough:
sudo systemctl stop squeezelite.service
mkdir squeezelite
cd squeezelite
wget -O squeezelite-armv6hf.tar.gz https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/squeezelite-1.9.6.1198-armv6hf.tar.gz
tar -xvzf squeezelite-armv6hf.tar.gz
sudo mv squeezelite /usr/bin
sudo chmod a+x /usr/bin/squeezelite
sudo systemctl start squeezelite.service
It works for me. Thanks!
I have an installation of piCorePlayer on a Pi 4 with Squeezelite 1.9.6-1206 and LMS 8.0.0 - 1587049226.
There the TTS feature is also not working!
I see no solution so far.
I also plan to have a few non-cloud alerting devices around, based on Raspberry Pi Zero W’s running SqueezeLite which must be able to play “https:” MP3 from HA’s “local” web folder, plus Google TTS.
Seems the problem is twofold:
LMS seems to have a problem playing files over https that are less than about 4s than 128 KiB in length. The problem has been confirmed as is being worked on.
Google TTS’ odd bitrate (32 kbit/s monaural files at 24000 sample rate). Fortunately, this can be remedied by using -R hLE
on SqueezeLite’s command line (or service definition). This will force SqueezeLite to resample files if their sampling rate isn’t supported by the DAC. My el-cheapo USB DAC on the Pi Zero only supports 44100 and 48000 natively, so SqueezeLite goes and resamples Google TTS files for me. Ta-daaa!
Observed CPU loads on a Raspberry PI Zero W:
– 0.8–8% for squeezelite
with no local resampling
– 20–95% (shortly, at beginning of file) when resampling on the Pi
See also: https://github.com/ralph-irving/squeezelite/issues/94
In HA, I do miss a means of leaving the full https://
server URL out, if it is the same as the base_url. If ever that should change, you’ll have to edit a zillion automations. I’d much prefer to be able to specify like /local/…
or local/…
as a media_content_id
and have HA take care of adding the base_url if media_content_id
isn’t a full URI.
I made a text that has a filesize of nearly 500k.
I added this to my piCorePlayer installation for Squeezelite.
In Home Assistant 0.110.0 I set the internal URL to https://192.168.178.108:8123 and LMS is getting this URL:
https://192.168.178.108:8123/api/tts_proxy/b0aea2edbe4dd...08854ba5fb9_en_-_google_translate.mp3
In LMS I see the cext, the progressbar is running in a loop. The text seems to be 1:48 minutes long, but I can hear nothing! It is telling me that this file has 32kb/s CBR.
That is all.
This error-message can be found in slimserver/server.log:
[20-05-20 23:58:12.1391] Slim::Utils::Scanner::Remote::__ANON__ (192) Error: Can't connect to remote server to retrieve playlist for, http://192.168.178.108:80/api/tts_proxy/cd1bf3b4e11eff3edf905c...9334_en_-_google_translate.mp3: 404 Not Found.
Why the URL has http and not https and why is the port 80 and not 8123? Very strange!
Strange indeed. My current problem is that I (still have to) run my LMS on a quite old server, that still uses gnutls
for some utils like ffmpeg
and mpg123
(instead of using OpenSSL).
I also have a few KODI instances around, these seem to be able to play the Google TTS messages just fine, so it must be some issue with LMS.
Opened https://github.com/Logitech/slimserver/issues/347
Almost there … some patches are already in LMS 8. See https://github.com/Logitech/slimserver/issues/350