Ok, I now tested this with processing the wav file with sox with the
following arguments:
/usr/bin/sox tts.wav -c 2 -r 44100 tts.mp3
before passing it to lame (which, in fact, shouldn't be needed anymore,
right, as sox already outputs a mp3 file?) and delivering it in the web
response.
This is the log I get in LMS:
Code:
--------------------
[16-12-13 21:33:25.5700] Slim::Player::Squeezebox::stream_s (787) This player
supports direct streaming for
http://192.168.178.52/tts/service.php?lng=de-DE&msg=Hallo as
http://192.168.178.52/tts/service.php?lng=de-DE&msg=Hallo, let's do it.
[16-12-13 21:33:25.5703] Slim::Player::Squeezebox::stream_s (807) Made
synchronous DNS request for 192.168.178.52 (0.00 ms)
[16-12-13 21:33:25.5706] Slim::Player::Squeezebox::stream_s (828) setting up
direct stream (3232281140:80) autostart: 3 format: m.
[16-12-13 21:33:25.5708] Slim::Player::Squeezebox::stream_s (829) request
string: GET /tts/service.php?lng=de-DE&msg=Hallo HTTP/1.0
Cache-Control: no-cache
Connection: close
Accept: */*
Host: 192.168.178.52
User-Agent: iTunes/4.7.1 (Linux; N; Debian; x86_64-linux; DE; utf8)
SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.0/1481125532
Icy-Metadata: 1
[16-12-13 21:33:25.7933] Slim::Player::Squeezebox2::directHeaders (471)
Processing headers for direct streaming:
HTTP/1.1 200 OK
Server: nginx/1.10.0 (Ubuntu)
Date: Tue, 13 Dec 2016 20:33:25 GMT
Content-Type: audio/mpeg
Content-Length: 10031
Connection: close
Content-Transfer-Encoding: binary
Content-Disposition: filename="tts.mp3"
Cache-Control: no-cache
icy-br: 128
icy-name: TTS Announcement
[16-12-13 21:33:25.7936] Slim::Player::Squeezebox2::directHeaders (545)
Processing 10 headers
[16-12-13 21:33:25.7938] Slim::Player::Squeezebox2::directHeaders (551)
Calling Slim::Player::Protocols::HTTP ::parseDirectHeaders
[16-12-13 21:33:25.7940] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Server: nginx/1.10.0 (Ubuntu)
[16-12-13 21:33:25.7941] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Date: Tue, 13 Dec 2016 20:33:25 GMT
[16-12-13 21:33:25.7943] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Content-Type: audio/mpeg
[16-12-13 21:33:25.7944] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Content-Length: 10031
[16-12-13 21:33:25.7945] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Connection: close
[16-12-13 21:33:25.7946] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Content-Transfer-Encoding: binary
[16-12-13 21:33:25.7947] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Content-Disposition: filename="tts.mp3"
[16-12-13 21:33:25.7948] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: Cache-Control: no-cache
[16-12-13 21:33:25.7948] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: icy-br: 128
[16-12-13 21:33:25.7949] Slim::Player::Protocols::HTTP::parseDirectHeaders
(348) header-ds: icy-name: TTS Announcement
[16-12-13 21:33:25.7953] Slim::Player::Squeezebox2::directHeaders (570)
Setting new title for
http://192.168.178.52/tts/service.php?lng=de-DE&msg=Hallo, TTS Announcement
[16-12-13 21:33:25.7959] Slim::Player::Squeezebox2::directHeaders (613) Got a
stream type: mp3 bitrate: 128000 title: TTS Announcement
[16-12-13 21:33:25.7961] Slim::Player::Squeezebox2::directHeaders (664)
Beginning direct stream!
[16-12-13 21:33:25.7962] Slim::Player::Squeezebox2::sendContCommand (700)
Sending cont frame: metaint 0, loop 0
--------------------
And the log of the squeezelite player:
Code:
--------------------
[20:33:25.518787] process_strm:269 strm command q
[20:33:25.518838] decode_flush:193 decode flush
[20:33:25.518883] output_flush:424 flush output buffer
[20:33:25.518936] sendSTAT:184 STAT: STMf
[20:33:25.522986] process:521 strm
[20:33:25.523083] process_strm:269 strm command q
[20:33:25.523134] decode_flush:193 decode flush
[20:33:25.523177] output_flush:424 flush output buffer
[20:33:25.523227] sendSTAT:184 STAT: STMf
[20:33:25.573940] process:521 audg
[20:33:25.574039] process_audg:433 audg gainL: 20992 gainR: 20992 adjust: 1
[20:33:25.574096] set_volume:229 setting internal gain left: 20992 right:
20992
[20:33:25.574181] process:521 strm
[20:33:25.574226] process_strm:269 strm command s
[20:33:25.574268] process_strm:342 strm s autostart: 3 transition period: 10
transition type: 0 codec: m
[20:33:25.574320] sendSTAT:184 STAT: STMf
[20:33:25.574588] codec_open:221 codec open: 'm'
[20:33:25.574724] stream_sock:393 connecting to 192.168.178.52:80
[20:33:25.578440] stream_sock:422 header: GET
/tts/service.php?lng=de-DE&msg=Hallo HTTP/1.0
Cache-Control: no-cache
Connection: close
Accept: */*
Host: 192.168.178.52
User-Agent: iTunes/4.7.1 (Linux; N; Debian; x86_64-linux; DE; utf8)
SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.0/1481125532
Icy-Metadata: 1
[20:33:25.578580] sendSTAT:184 STAT: STMc
[20:33:25.578747] process_strm:377 set fade mode: 0
[20:33:25.578852] process:521 audg
[20:33:25.578898] process_audg:433 audg gainL: 20992 gainR: 20992 adjust: 1
[20:33:25.578946] set_volume:229 setting internal gain left: 20992 right:
20992
[20:33:25.779292] stream_thread:180 headers: len: 297
HTTP/1.1 200 OK
Server: nginx/1.10.0 (Ubuntu)
Date: Tue, 13 Dec 2016 20:33:25 GMT
Content-Type: audio/mpeg
Content-Length: 10031
Connection: close
Content-Transfer-Encoding: binary
Content-Disposition: filename="tts.mp3"
Cache-Control: no-cache
icy-br: 128
icy-name: TTS Announcement
[20:33:25.784747] sendRESP:215 RESP
[20:33:25.797280] process:521 cont
[20:33:25.797380] process_cont:391 cont metaint: 0 loop: 0
[20:33:25.884871] stream_thread:253 end of stream
[20:33:25.885803] sendDSCO:203 DSCO: 0
[20:33:25.889505] process:521 strm
[20:33:25.889594] process_strm:269 strm command u
[20:33:25.889646] process_strm:329 unpause at: 0 now: 1731995
[20:33:25.889700] sendSTAT:184 STAT: STMr
[20:33:26.890934] sendSTAT:184 STAT: STMt
[20:33:27.005642] process:521 strm
[20:33:27.005765] process_strm:269 strm command t
[20:33:27.005822] sendSTAT:184 STAT: STMt
[20:33:28.007088] sendSTAT:184 STAT: STMt
[20:33:29.008517] sendSTAT:184 STAT: STMt
[20:33:30.009960] sendSTAT:184 STAT: STMt
[20:33:31.006313] process:521 strm
--------------------
Unfortunately there's still no sound. The resulting fileinfo of the mp3
file (pico2wave -> sox -> lame):
Code:
--------------------
tts.mp3: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo
--------------------
------------------------------------------------------------------------
ONeill's Profile: http://forums.slimdevices.com/member.php?userid=66366
View this thread: http://forums.slimdevices.com/showthread.php?t=106623
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins