Say Prompt - Avaya-CXI/virtual-agent-public GitHub Wiki

HOME / REFERENCE DOCUMENTATION / SAY PROMPT

Throughout Virtual Agent there are several areas where a piece of text must be spoken back to the caller. The prompt field has a few different features to it.

  1. Any text you paste in the prompt field will automatically be spoken in the Virtual Agent number’s default language.
  2. The prompt field follows the rules of Object Value replacement that Virtual Agent allows for to provide variable substitution (See ObjectValueReplacement)
  3. It is possible to have multiple pieces of text read out in different languages. To do this, you must wrap the text you want to say in tags. Again the spacing inside of the tags is crucial to pay attention to. Also notice the actual language tag being wrapped in double quotes. All of the accepted language tags could be found here under Supported Languages: https://docs.avayacloud.com/aspx/inboundxml#say.

correct examples:

  • <lang=”en-us”>Here is some text
  • <lang=”en-us”> Here is some text
  • <lang=”en-us”> Here is some text <lang=”es-us”>Como estas

incorrect examples (notice spacing) :

  • <lang=” en-us ”>Here is some text
  • <lang =”en-us”>Here is some text
  • <lang= ”en-us”>Here is some text
  • < lang=”en-us”>Here is some text
  • <lang=”en-us” >Here is some text
  • <lang=”en-us”>Here is some text</ lang>
  • <lang=”en-us”>Here is some text< /lang>
  • <lang=”en-us”>Here is some text
  1. It is also possible to provide PAUSE(NUM) tags in the prompt if you would like the prompt to take a break between two sentences or between two different language read outs. Currently the Virtual Agent only supports single digit pauses (1-9). The number that goes on the inside tells Virtual Agent how long to pause in the prompt for. It must be written in all capital letters and again there cannot be any spaces inside of the parenthesis.

correct examples :

  • Hi thanks for calling. PAUSE(5)
  • <lang=”en-us”> Here is some text <lang=”es-us”>PAUSE(2) Como estas
  • Thanks for calling {{menu1.name}}. PAUSE(2) How can I help you today?

incorrect examples (notice spacing)

  • Hi thanks for calling. PAUSE(5 )
  • Hi thanks for calling. PAUSE (5)
  • Hi thanks for calling. PAUSE( 5 )
  • Hi thanks for calling. PAUSE( 5)
  1. Keep in mind that the substitution that takes place in step 4 and 5 will also take place if any of the lang tags or PAUSE(NUM) are contained in an Object Value that you are trying to use. So let’s say menu1.text has the value of

<lang=”en-us”> Here is some text </lang> <lang=”es-us”>PAUSE(2) Como estas</lang>

That value, after being replaced and being pushed into the text prompt, will undergo the same evaluation to make sure pause tags are properly inserted as well as the appropriate pieces of text between lang tags being read out in the appropriate language.

Screen Shot 2021-08-25 at 5 07 19 AM

⚠️ **GitHub.com Fallback** ⚠️