When i try to open the saved file i get an error that format is not
correct. I use type='audio/x-wav' in <record> tag and save all
input stream as a wav file.
Code: Select all
<form id='description1'>
<record name='description1' type='audio/x-wav' beep='true'>
<prompt>
Please say description for your answer
</prompt>
<filled>
I heard, <value expr='description1'/>
</filled>
</record>
<block>
<submit next='VxmlSaveAnswers.aspx' namelist='description1' method='post' enctype='multipart/form-data'/>
</block>
</form>
-----------------------------VxmlSaveAnswers.aspx.cs-------------------
StreamReader sr = new StreamReader(Request.InputStream);
string wavFile = sr.ReadToEnd();
byte[] ba = HttpUtility.UrlDecodeToBytes(wavFile);
FileStream fs = new FileStream(filePath, FileMode.CreateNew);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(ba);
bw.Flush();
fs.Close();