I use:
Code: Select all
<record name="message" beep="true" maxtime="10s" type="audio/x-wav" finalsilence="4000ms" dtmfterm="true">
to record.
I use:
<submit next="http://www.somedomain.com/vxml/base/RcdTest.php"
method="post"
namelist="message fromname"
enctype="multipart/form-data"/>
I use this php to read the file and save it.
Code: Select all
$file = $_FILES['message'];
if ($file['size'] > 0)
{
$bytelen = $file['size'];
$fp = fopen($file['tmp_name'], 'rb');
$data = fread($fp, $bytelen);
fclose($fp);
$fh = fopen('../temp/wavtest.wav', 'w') or die("can't open file");
if (fwrite($fh, $data) == -1) { die("can't write data"); }
fclose($fh) or die("can't close file");
$from = "File loaded.";
}
Code: Select all
<prompt>
<audio src="http://www.somedomain.com/vxml/temp/wavtest.wav">
I hope I do not hear this.
</audio>
</prompt>
I could not record and playback per the above without setting type="audio/x-wav”.
The code that I want to interface with requires WAVE file format headers. I noticed that the AudioFormat set with “audio/x-wav” is 7, and not 1 as my existing code is looking for. Do you know what AudioFormat = 7 means. This could be a useful clue.
In my research, I used http://support.plumgroup.com/plumdocs/v ... audio.html, which states “See section 4.14.1 for supported audio formats.” Do you know where this section is. I couldn’t find it.