Max2Play Home › Forums › Max2Play as Squeezebox (Player / Server) › google translate TTS link wird nicht abgespielt
Tagged: tts stream
- This topic has 1 reply, 2 voices, and was last updated 8 years, 10 months ago by flysurfer Moderator.
-
2. Februar 2016 at 2:23 #18303
Hi. Ich benutze euer image mit einem RPi1 und finde es ziemlich genial! 🙂
Die normale Nutzung an meinem Squeezeserver funktioniert auch einwandfrei aber wenn ich einen via Google-TTS engine erstellten Link abspielen möchte funktioniert das irgendwie nicht…
Auf allen anderen Clients (SBRadio, Android-Player, Squeezeplay Windows) funktioniert es einwandfrei.Siehe Logfile:
[01:06:18.511993] process:494 audg [01:06:18.513165] process_audg:413 audg gainL: 6656 gainR: 6656 adjust: 1 [01:06:18.514253] set_volume:246 setting internal gain left: 6656 right: 6656 [01:06:18.518127] process:494 strm [01:06:18.519554] process_strm:256 strm command s [01:06:18.520854] process_strm:325 strm s autostart: 3 transition period: 10 transition type: 0 codec: m [01:06:18.522092] sendSTAT:171 STAT: STMf [01:06:18.523813] codec_open:218 codec open: 'm' [01:06:18.525206] stream_sock:384 connecting to 173.194.116.166:80 [01:06:18.577497] stream_sock:413 header: GET /translate_tts?ie=UTF-8&tl=de&q=zefix+noch+eins.&client=tw-ob HTTP/1.0 Cache-Control: no-cache Connection: close Accept: */* Host: translate.google.com User-Agent: iTunes/4.7.1 (Windows; N; Windows 2008 Server R2; 8664; DE; cp1252) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.0/1452461184 Icy-Metadata: 1 [01:06:18.578800] sendSTAT:171 STAT: STMc [01:06:18.580014] process_strm:357 set fade mode: 0 [01:06:18.581723] process:494 audg [01:06:18.582838] process_audg:413 audg gainL: 6656 gainR: 6656 adjust: 1 [01:06:18.584188] set_volume:246 setting internal gain left: 6656 right: 6656 [01:06:18.642046] process:494 strm [01:06:18.643283] process_strm:256 strm command t [01:06:18.644368] sendSTAT:171 STAT: STMt [01:06:18.680192] stream_thread:176 headers: len: 280 HTTP/1.0 200 OK Date: Tue, 02 Feb 2016 00:06:18 GMT Expires: Tue, 02 Feb 2016 00:06:18 GMT Cache-Control: private, max-age=86400 Content-Type: audio/mpeg X-Content-Type-Options: nosniff Server: HTTP server (unknown) Content-Length: 7920 X-XSS-Protection: 1; mode=block [01:06:18.681672] sendRESP:202 RESP [01:06:18.847362] process:494 cont [01:06:18.848651] process_cont:371 cont metaint: 0 loop: 0 [01:06:18.883478] stream_thread:249 end of stream [01:06:18.885041] sendDSCO:190 DSCO: 0 [01:06:18.901568] process:494 strm [01:06:18.902709] process_strm:256 strm command u [01:06:18.903775] process_strm:312 unpause at: 0 now: 155657 [01:06:18.904846] sendSTAT:171 STAT: STMr [01:06:19.906427] sendSTAT:171 STAT: STMt [01:06:20.909454] sendSTAT:171 STAT: STMt [01:06:21.911965] sendSTAT:171 STAT: STMt [01:06:22.300351] process:494 strm
Das Log hilft mir momentan gar nicht weiter. :/
Was kann ich denn da tun? 🙁
Gruß
azr16. Februar 2016 at 17:23 #18525Hi azr,
manually running http://translate.google.com/translate_tts?ie=UTF-8&tl=de&q=zefix+noch+eins.&client=tw-ob in a browser works, but a call by a machine (Squeezebox Server) might be interrupted by Googles abuse system as stated here: http://stackoverflow.com/questions/9893175/google-text-to-speech-api
What you can do as a workaround:
– install your own Text-to-speech software on the raspberry (e.g. espeak) with
apt-get update && apt-get install espeak
– generate WAV-Files by calling the text-to-speech-engine the following way and save to your media-path
/usr/bin/espeak "zefix+noch+eins" -w /media/yourtext.wav # get more infos with: espeak --help # set language, voice, speed and more...
– make sure the Squeezebox Server is not trying to convert the files: deactivate flac and mp3 in Squeezebox-Server Settings -> Advanced -> File types -> WAV (I had to do this, otherwise it did not play sound)
– test and play the generated file
You may also create your own HTTP-service that acts the same way like the Google TTS Engine and creates the WAV-file. You could do this by creating a Max2Play-Addon that takes the words as HTTP-GET Parameter, runs espeak and generates the WAV-File in the background and sends it as result of the HTTP-Call (if the file already exists it would just send it). The Addon should also have a installer for espeak and a basic set up (default language, voice, reading speed).
Maybe anyone likes to implement this feature? I could help you with special questions. There might be others waiting for this one 🙂
Stefan
-
You must be logged in to reply to this topic.