VXML audio file playing status

丶灬走出姿态 提交于 2021-02-10 07:02:09

问题


I have a VXML (say vxml-1) which contains simple audio file for announcement followed by a goto element pointing to next vxml doc(say vxml-2) containing another audio file for announcement. Once the execution starts, vxml-1 loads with corresponding audio followed by goto execution. Now when the user hangs up, in the background it shows that it ended at vxml-2 because of very fast goto transition, but actually the user hung up at the audio of vxml-1 because of its long length. How can I determine if the user actually hung in between of audio of vxml-1 ? Is there any inbuilt function or property of audio tag like start or end in VXML ?


回答1:


Because of the way voice xml documents are processed, both audio files are queued (ie both pages executed) before the customer even notices audio is playing.

To accomplish what you want, create a form on the first page with an input (any input grammar will do) with a very short timeout. That way, the user doesn't navigate to the next page until they audio file has played and the timeout expired.

Note, the timeout and page navigation will add a delay. You can keep the timeout short, but the platform and page complexity determine how long it takes to navigate to the next page. To try and minimize the delay, make sure your audio files a trimmed of silence at the beginning and end.



来源:https://stackoverflow.com/questions/65822994/vxml-audio-file-playing-status

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!