Connecting Tech Pros Worldwide Forums | Help | Site Map

Cannot stream WAV audio

Todd Merriman
Guest
 
Posts: n/a
#1: Oct 23 '08
A link is presented to the browser:

echo "<embed src=\"http://sites.mydomain.com/cgi-bin/play.cgi?speech+1\"
autostart=\"true\" hidden=\"true\" width=\"0\" height=\"0\">"
echo "</embed>"

The browser requests the URL, and the server executes the CGI and sends
the following:

echo "Content-Type: audio/x-wav"
echo "Content-transfer-encoding: BINARY"
echo
espeak --stdout "This is a test and only a test"

The espeak program does a text-to-speech conversion and outputs a WAV
stream. I can output the audio to a file and then serve the file, but
the results are the same.

Safari on a Mac plays the stream. Safari (and Firefox) on Windows XP
plays nothing!

This is the header for the response received by the browser:

HTTP/1.x 200 OK
Date: Thu, 23 Oct 2008 20:32:16 GMT
Server: Apache/2.2.0 (Fedora)
Content-Transfer-Encoding: BINARY
Connection: close
Transfer-Encoding: chunked
Content-Type: audio/x-wav

Closed Thread