Use variable(s) for audio source/expression
Posted: Wed Jul 29, 2015 3:53 pm
Hi!
I am trying to dynamically create the audio source/expression for my application. In a nutshell, I have questions with a variety of answer options. Based on the question, I need to present the options to the user. I know you are not an ASP/C# shop, however that is what I'm bound to... I have tried for a day and a half to do this and cannot figure it out...even with the examples I've seen...so--here is some code that I've tried--thinking that it should work, but it doesn't. It will ask the question and take my answer--however it will NOT tell me the possible choices--I just have to "guess" at what I can answer. The line in my logs say:
errno: 999 message Something tag-like was found in your expr and is being sent as-is to the TTS engine. This is deprecated.
according to the log, the string being returned from the subdialog code behind is:
VXI::var_element(name="oaPrompt" expr = "'<audio src="http://dev-tachl.mdc.musc.edu/IVR_Cats/ ... "/></audio>'")
Which is the correct path to the audio file. If I simply use that without returning it from the subdialog, it works fine. However I need to build it like this b/c I may have to return something that actually has TWO or MORE audio sources/expressions, so I would need the ability to return something like:
VXI::var_element(name="oaPrompt" expr = "'<audio src="http://xxxx/IVR_Cats/IVRRecordings/Yes1 ... dio><audio src="http://dev-tachl.mdc.musc.edu/IVR_Cats/ ... "/></audio>'")
Also--I can not build this up ahead of time--I have to do it question by question because the questions/answers are presented in a dynamic way--based on individual responses.
Any assistance would be greatly appreciated! Thanks!
Shawntel
I am trying to dynamically create the audio source/expression for my application. In a nutshell, I have questions with a variety of answer options. Based on the question, I need to present the options to the user. I know you are not an ASP/C# shop, however that is what I'm bound to... I have tried for a day and a half to do this and cannot figure it out...even with the examples I've seen...so--here is some code that I've tried--thinking that it should work, but it doesn't. It will ask the question and take my answer--however it will NOT tell me the possible choices--I just have to "guess" at what I can answer. The line in my logs say:
errno: 999 message Something tag-like was found in your expr and is being sent as-is to the TTS engine. This is deprecated.
Code: Select all
<subdialog name="tryQuest" src="http://XXXXX/playQuestions.aspx">
<filled>
<if cond="tryQuest.qSkip==1">
<goto next="#questionForm" />
<clear />
<else />
<assign name="questionToAsk" expr="tryQuest.qPrompt" />
<assign name="questionUrl" expr="tryQuest.aPrompt" />
<assign name="questionOptions" expr="tryQuest.oPrompt" />
<assign name="optionsUrl" expr="tryQuest.oaPrompt" /> ***this is the string with my options***
<assign name="voiceGrammarExp" expr="tryQuest.gPrompt" />
<assign name="dtmfGrammarExp" expr="tryQuest.dPrompt" />
<assign name="qSkip" expr="tryQuest.qSkip" />
<assign name="qInstruction" expr="tryQuest.qInstruction" />
</if>
</filled>
</subdialog>
<field name="qAnswer">
<%--add grammar for voice and dtmf
as well as grammar for # to repeat question
and "repeat" to repeat question--%>
<grammar srcexpr="voiceGrammarExp" />
<grammar srcexpr="dtmfGrammarExp" />
<grammar>^"#"$</grammar>
<grammar>"repeat"</grammar>
<prompt>
<value expr ="optionsUrl" />
</prompt>
VXI::var_element(name="oaPrompt" expr = "'<audio src="http://dev-tachl.mdc.musc.edu/IVR_Cats/ ... "/></audio>'")
Which is the correct path to the audio file. If I simply use that without returning it from the subdialog, it works fine. However I need to build it like this b/c I may have to return something that actually has TWO or MORE audio sources/expressions, so I would need the ability to return something like:
VXI::var_element(name="oaPrompt" expr = "'<audio src="http://xxxx/IVR_Cats/IVRRecordings/Yes1 ... dio><audio src="http://dev-tachl.mdc.musc.edu/IVR_Cats/ ... "/></audio>'")
Also--I can not build this up ahead of time--I have to do it question by question because the questions/answers are presented in a dynamic way--based on individual responses.
Any assistance would be greatly appreciated! Thanks!
Shawntel