Author Topic: Genesys Google ASR integration  (Read 689 times)

Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Genesys Google ASR integration
« on: March 15, 2020, 03:31:52 PM »
Hi Experts,

I have to do a POC for Genesys - Google ASR .
I wanted to know if it's mandatory to have  Genesys Intelligent Automation to be installed and integrated.

Also ASR voice XML can be created in Composer or I need to write VoiceXML manually for ASR ?

Thanks

Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: 14
    • Genesys Brasil
Re: Genesys Google ASR integration
« Reply #1 on: March 16, 2020, 03:07:49 AM »
 The vxml will be generated automatically by GIA 

Genesys says that GIA is mandatory

Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Re: Genesys Google ASR integration
« Reply #2 on: March 16, 2020, 02:27:47 PM »
Hi,

Thanks for the response. :)
So I should then follow the deployment guide of GIA


Offline hsujdik

  • Sr. Member
  • ****
  • Posts: 362
  • Karma: 14
    • Genesys Brasil
Re: Genesys Google ASR integration
« Reply #3 on: March 17, 2020, 09:30:23 AM »
Just to spare you from a little headache, there are two things that aren't on the deployment procedures for that integration:

- The configuration "DialogEngine.Provider" on GIA must be set to "SlotBucket"
- On MCP, the option "[asr].defaultengine" must be set to "nativegsr"

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7131
  • Karma: 56330
Re: Genesys Google ASR integration
« Reply #4 on: March 18, 2020, 02:41:28 AM »
You can do this also at VXML level


Quote
On MCP, the option "[asr].defaultengine" must be set to "nativegsr"



I am testing with 2 ASR engines and no GIA involved. Just to check how would I have to handle the VXML and grammars

Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Re: Genesys Google ASR integration
« Reply #5 on: March 20, 2020, 03:48:18 PM »
Guys,

I was able to integrate Google ASR and TTS with MCP using VXML , without GIA.
I tested with test  vxml provided in Genesys document and it was fine :).

followed below document :

https://docs.genesys.com/Documentation/GVP/9.0.x/GDG/CGCGC#PGSR

However I am also trying to figure out how can i create custom VXML , grammar etc. Whatever i tried so far is failing.
I am not Pro in writing VXML.

if anyone have created any VXML which I refer for Google ASR , TTS would be helpful :)

Thanks

Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Re: Genesys Google ASR integration
« Reply #6 on: March 22, 2020, 01:14:55 AM »
Guys,

I created custom  VXML and it works like a charm :). You need to incorporate below text in your VXML in order to make it work:

In VoiceXML, Google Speech-to-Text can be triggered by setting the com.genesyslab.asrengine VoiceXML property and src attribute in the <grammar> tag to match the values provisioned in the GRPC Resource Access Point:

<property name="com.genesyslab.asrengine" value="nativegsr"/>
<grammar mode="voice" xml:lang="en-US" src="builtin:grammar/transcribe" />


Do let me know if anyone needs any other info :)

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7131
  • Karma: 56330
Re: Genesys Google ASR integration
« Reply #7 on: March 22, 2020, 02:53:41 AM »
Nice well done
Can you share a snippet of your code?

Enviado de meu SM-N9600 usando o Tapatalk


Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Re: Genesys Google ASR integration
« Reply #8 on: March 22, 2020, 04:32:43 PM »
<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.1" xml:lang="en-US"
      xmlns="http://www.w3.org/2001/vxml"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:gvp="http://www.genesyslab.com/2006/vxml21-extension" application="../src/ComposerRoot.vxml">

   
   <!-- VXML code generated by Composer 8.1.530.17 -->
   <!-- Diagram created by Composer: Composer 8.1.530.17 -->
   <!-- Project version: 8.1.530.17 -->
   <!-- Diagram version: 1.0 CreatedOn:  -->
   <!-- Application Author:  -->
   <!-- Release Mode: false -->

   <!-- Global Scripts includes -->
   <script src="../include/common.js" />
   <script src="../include/ctic.js" />
   <script src="../include/json.js" />
   <script src="../include/DataAccess.js" />

   <!-- 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_ASR_LANGUAGE = initSystemTypeVariable('APP_ASR_LANGUAGE','en-US');
      AppState.APP_LANGUAGE = initSystemTypeVariable('APP_LANGUAGE','en-US');
      AppState.APP_OPM = initSystemTypeVariable('APP_OPM',eval('('+session.connection.protocol.sip.requesturi['parameters']+')'));
      AppState.COMPOSER_WSSTUBBING = initSystemTypeVariable('COMPOSER_WSSTUBBING','0');
      AppState.EnableFCR = initSystemTypeVariable('EnableFCR',true);
      AppState.EnableReports = initSystemTypeVariable('EnableReports',false);
      AppState.EnableSNMP = initSystemTypeVariable('EnableSNMP',false);
      AppState.GRAMMARFILEDIR = initSystemTypeVariable('GRAMMARFILEDIR','../Resources/Grammars');
      AppState.LAST_EVENT_ELEMENT = initSystemTypeVariable('LAST_EVENT_ELEMENT','undefined');
      AppState.LAST_EVENT_LINE = initSystemTypeVariable('LAST_EVENT_LINE','undefined');
      AppState.LAST_EVENT_MSG = initSystemTypeVariable('LAST_EVENT_MSG','undefined');
      AppState.LAST_EVENT_NAME = initSystemTypeVariable('LAST_EVENT_NAME','undefined');
      AppState.LAST_EVENT_URL = initSystemTypeVariable('LAST_EVENT_URL','undefined');
      AppState.OCS_Record = initSystemTypeVariable('OCS_Record',getCallflowOCSRecord());
      AppState.OCS_RecordURI = initSystemTypeVariable('OCS_RecordURI',getCallflowRecordURI());
      AppState.OCS_URI = initSystemTypeVariable('OCS_URI',getCallflowOCSURI());
      AppState.PREV_APP_ASR_LANGUAGE = initSystemTypeVariable('PREV_APP_ASR_LANGUAGE','undefined');
      AppState.PREV_APP_LANGUAGE = initSystemTypeVariable('PREV_APP_LANGUAGE','undefined');
      AppState.SCRIPTSDIR = initSystemTypeVariable('SCRIPTSDIR','../Scripts');
      AppState.varSpeech = undefined;
      AppState.VOXFILEDIR = initSystemTypeVariable('VOXFILEDIR','../Resources/Prompts');
   </script>

      
   <!-- Global Scripts -->
   <script srcexpr="AppState.VOXFILEDIR + '/PromptSwitch.js'" />
   <script srcexpr="AppState.VOXFILEDIR + '/de-DE/de-DE.js'" />
   <script srcexpr="AppState.VOXFILEDIR + '/en-US/en-US.js'" />
   <script>var f = new Format();</script>

   
   <script srcexpr="AppState.VOXFILEDIR + '/de-DE/customprompts.js'" />
   <script srcexpr="AppState.VOXFILEDIR + '/en-US/customprompts.js'" />
   
   
   <!-- Global Properties declarations -->
   <property name="com.genesyslab.logtoasr" value="false" />      
   <property name="com.genesyslab.loglevel" value="5" />
   <property name="com.genesyslab.asrengine" value="nativegsr"/>

   <!-- Metadata information -->
   <meta name="com.genesyslab.studio.resourcePath" content="/Callflows/TOBI_gmr.callflow"/>

   <!-- Global links -->
   <form>
      <block>
         <log expr="'Running TOBI_gmr workflow.'"/>
         <log expr="'Code Generated by Composer: 8.1.530.17.'"/>
         <log expr="'Diagram created/upgraded by Composer: Composer 8.1.530.17.'"/>
         <log expr="'Project version: 8.1.530.17.'"/>
         <log expr="'Diagram version: 1.0 CreatedOn: .'"/>
         <goto next="#Entry1" />
      </block>
   </form>
   <!-- This is the Entry block -->
   <form id="Entry1">
      <block name="Entry">
         <goto next="#Prompt1" />
      </block>
   </form>

   <!-- This is the Exit block -->
   <form id="Exit1">
      <block>
         <var name="varSpeech" expr="AppState.varSpeech"/>
         <exit namelist="varSpeech"/>
        </block>
   </form>

   <!-- This is the Prompt block -->
   <form id="Prompt1">
       
                  
        <script srcexpr="AppState.VOXFILEDIR + '/PromptSwitch.js'" />
        <script srcexpr="AppState.VOXFILEDIR + '/' + 'de-DE' + '/' + 'de-DE' + '.js'" />
        <block>
           <script>
               AppState.PREV_APP_LANGUAGE = AppState.APP_LANGUAGE;
               AppState.PREV_APP_ASR_LANGUAGE = AppState.APP_ASR_LANGUAGE;
               AppState.APP_LANGUAGE = 'de-DE';
               AppState.APP_ASR_LANGUAGE = 'de-DE';
           </script>
        </block>
       
       
       <block name="Prompt1P0">
           <prompt bargein="true"  gvp:langexpr="AppState.APP_LANGUAGE">
            Willkommen bei Vodafone. wie kann ich dir helfen?
          </prompt>
      </block>
       <block>
           <script>resetLanguage()</script>
          <goto next="#Input1" />
       </block>
   </form>

   <!-- This is the Input block -->
   <form id="Input1">
      <property name="inputmodes" value="voice" />
      <property name="bargein" value="true" />
      <block name="Input1P0">
           <prompt gvp:langexpr="AppState.APP_LANGUAGE">
          </prompt>
      </block>
      
      
      <field name="Input1Field" slot="Input1">
        <grammar mode="voice" xml:lang="de-DE" src="builtin:grammar/transcribe" />
        
         <property name="interdigittimeout" value="3s"/>
         <property name="termchar" value="#" />
         <property name="timeout" value="10s"/>
      </field>
       <filled mode="all" namelist="Input1Field">
          <assign name="AppState.varSpeech" expr="Input1Field" />
          <goto next="#Exit1" />
       </filled>
      <catch event="noinput" count="1">
           <throw event="com.genesyslab.composer.toomanynoinputs" message="exceeded the number of noinput retries" />
        </catch>
      <catch event="nomatch" count="1">
           <throw event="com.genesyslab.composer.toomanynomatches" message="exceeded the number of nomatch retries" />
        </catch>
   </form>

</vxml>

Offline AK

  • Full Member
  • ***
  • Posts: 142
  • Karma: 0
Re: Genesys Google ASR integration
« Reply #9 on: March 22, 2020, 04:34:49 PM »
The requirement was for German language de-DE locale.

Hope it helps..
Feel free to message me if you need more details :)