Connecting Tech Pros Worldwide Help | Site Map

Cannot stream WAV audio

  #1  
Old October 23rd, 2008, 09:55 PM
Todd Merriman
Guest
 
Posts: n/a
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
audio file problem pankajs answers 5 October 9th, 2008 01:40 PM
Clipboard audio for background play? AWW answers 3 September 28th, 2008 10:25 AM
How to play a sound from an embedded resource file? (.resx file)? raylopez99 answers 8 August 26th, 2008 12:45 AM
Download files without <a> nathj answers 12 September 25th, 2007 08:14 AM