Jump to content

embassy17

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by embassy17

  1. Thanks for the advice. I tried solution 1, which was to rename audio.xml to audio.asp. No luck. Thewav file produced was still filled with static. I tried solution 2, which was to hardcode the url into audio.xml.Still got the same results. My buddy was able to do this using Perl in his "audio.xml" file, but I need to useASP. Any other advice would be appreciated. Thanks again everybody.Mike C.
  2. Good morning/afternoon/evening to all,First time post/long time user.I'm trying to use a voicexml tag to retrieve a wav file via the stream object andI am receiving a great deal of static in the returned object. I realize many of youmay not have experience in VoiceXML, but I'm hoping there is something I'm doing incorrectly in my ASP code.I have two files: process_record_review.xml and audio.xml process_record_review.xml has a voicexml tag called <audio> which plays back whatever file you want. audio.xml contains the ASP stream object to get the wav file to play back. I have the <audio> tag in process_record_review.xml pointing to audio.xml, so it will get the ASP stream object which contains the wav file.This is the process_record_review.xml piece containing the xml <audio> tag:<form id="replay"> <block> <prompt><audio expr="'audio.xml'"/></prompt> </block></form>This is the audio.xml which gets the wav file via the ASP stream object:<?xml version="1.0"?><vxml version="2.0"><%dim strAudioFilePathdim strAudioFileNamestrAudioFilePath = "m:\WebSites\wavfile.wav" strAudioFileName = "wavfile.wav"Set objStream = Server.CreateObject("ADODB.Stream")objStream.OpenobjStream.Type = 1objStream.LoadFromFile strAudioFilePathContentType = "audio/wav"stream = objStream.Read()objStream.CloseSet objStream = NothingResponse.ClearResponse.Buffer = TrueResponse.AddHeader "Content-Disposition", "attachment; filename=" & strAudioFileNameResponse.AddHeader "Content-Length", Len(stream)Response.Charset = "UTF-8"Response.ContentType = ContentTypeResponse.BinaryWrite streamResponse.Flush%></vxml> Here is what works and doesn't work:1. The wav file plays back clear if I just hard code the wav file URL in the <audio> tag in process_record_review.xml and do not call the audio.xml file.-This tells me that the voicexml <audio> tag will successfully play back a wav file 2. The wav file plays back clear if I just type in ....../audio.xml into my browser.-This tells me that the stream object in audio.xml works fine. 3. The wav file plays back staticy if I have the <audio> tag in process_record_review.xmlpoint to audio.xml to retrieve the wav file via the stream object. So, the <audio> tag in process_record_review.xml is successfully making it to audio.xml. It gets the stream object,but doesn't play it clear. I'm really lost on this one. I've googled the crap out of this, but I think I'm the only person to ever to do this. Any suggestions would be appreciated Thanks again,Mike C.
×
×
  • Create New...