Author Topic: [VXML] Inject tag SSML TTS to prompt  (Read 181 times)

Offline Sampa

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
[VXML] Inject tag SSML TTS to prompt
« on: August 10, 2019, 06:33:11 AM »
Hi all!

Does anyone know how to inject ssml tag through variable?

Fixed mode works
Code: [Select]
   <form>
      <block>
         <prompt bargein="true" gvp:langexpr="language">
            <voice name="rosana-highquality.voice"><prosody volume="+15dB" rate="40%"> Text to speak </prosody></voice>
          </prompt>
         <return />
      </block>
   </form>


dynamically doesn't work
Code: [Select]

<!-- Global Vars declarations -->
<script>
var AppState = new Object();
AppState.System = new Object();
AppState.System.RetainInputTypeVariableDefaultValue = false;
AppState.CallUUID = session.connection.uuid;
AppState.ANI = getANI();
AppState.DNIS = getDNIS();
AppState.USE_LCASE_USERDATAKEY = initSystemTypeVariable('USE_LCASE_USERDATAKEY',0);
 
  if (session.connection.protocol.sip.headers != undefined &amp;&amp;
    session.connection.protocol.sip.headers['x-genesys-gvp-session-id']){
AppState.GVPSessionID = session.connection.protocol.sip.headers['x-genesys-gvp-session-id'];
} else {
AppState.GVPSessionID = 'undefined';
}
 

AppState.APP_LANGUAGE = initSystemTypeVariable('APP_LANGUAGE','en-US');
AppState.APP_ASR_LANGUAGE = initSystemTypeVariable('APP_ASR_LANGUAGE','en-US');
AppState.PREV_APP_LANGUAGE = initSystemTypeVariable('PREV_APP_LANGUAGE','en-US');
AppState.PREV_APP_ASR_LANGUAGE = initSystemTypeVariable('PREV_APP_ASR_LANGUAGE','en-US');
AppState.GRAMMARFILEDIR = initSystemTypeVariable('GRAMMARFILEDIR','../Resources/Grammars');
AppState.VOXFILEDIR = initSystemTypeVariable('VOXFILEDIR','../Resources/Prompts');
AppState.SCRIPTSDIR = initSystemTypeVariable('SCRIPTSDIR','../Scripts');
AppState.EnableReports = initSystemTypeVariable('EnableReports',true);
AppState.EnableSNMP = initSystemTypeVariable('EnableSNMP',false);
AppState.LAST_EVENT_NAME = initSystemTypeVariable('LAST_EVENT_NAME','undefined');
AppState.LAST_EVENT_MSG = initSystemTypeVariable('LAST_EVENT_MSG','undefined');
AppState.LAST_EVENT_URL = initSystemTypeVariable('LAST_EVENT_URL','undefined');
AppState.LAST_EVENT_ELEMENT = initSystemTypeVariable('LAST_EVENT_ELEMENT','undefined');
AppState.LAST_EVENT_LINE = initSystemTypeVariable('LAST_EVENT_LINE','undefined');
AppState.EnableFCR = initSystemTypeVariable('EnableFCR',true);
AppState.COMPOSER_WSSTUBBING = initSystemTypeVariable('COMPOSER_WSSTUBBING','0');
AppState.APP_OPM = initSystemTypeVariable('APP_OPM',eval('('+session.connection.protocol.sip.requesturi['parameters']+')'));
AppState.OCS_RecordURI = initSystemTypeVariable('OCS_RecordURI',getCallflowRecordURI());
AppState.OCS_URI = initSystemTypeVariable('OCS_URI',getCallflowOCSURI());
AppState.OCS_Record = initSystemTypeVariable('OCS_Record',getCallflowOCSRecord());
AppState.content = '&lt;voice name=&quot;rosana-highquality.voice&quot;&gt;&lt;prosody volume=&quot;+15dB&quot; rate=&quot;40%&quot;&gt; Text to speak &lt;/prosody&gt;&lt;/voice&gt;';
</script>
...
...
...

<form>
<block name="Prompt1P0">
     <prompt bargein="true"  gvp:langexpr="AppState.APP_LANGUAGE">
        <value expr="AppState.content" />
     </prompt>
   <return />
  </block>
</form>

<voice name="rosana-highquality.voice"><prosody volume="+15dB" rate="40%"> Text to speak </prosody></voice>

[]īs!
« Last Edit: August 10, 2019, 06:37:31 AM by Sampa »