Genesys CTI User Forum
Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: gen_den on March 15, 2020, 06:31:52 AM
-
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
-
The vxml will be generated automatically by GIA
Genesys says that GIA is mandatory
-
Hi,
Thanks for the response. :)
So I should then follow the deployment guide of GIA
-
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"
-
You can do this also at VXML level
[quote]
[font=verdana, arial, helvetica, sans-serif] On MCP, the option "[asr].defaultengine" must be set to "nativegsr"[/font]
[/quote]
I am testing with 2 ASR engines and no GIA involved. Just to check how would I have to handle the VXML and grammars
-
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
-
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 :)
-
Nice [emoji41] well done
Can you share a snippet of your code?
Enviado de meu SM-N9600 usando o Tapatalk
-
<?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 &&
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" />
[b]<property name="com.genesyslab.asrengine" value="nativegsr"/>[/b]
<!-- 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">
[b]<grammar mode="voice" xml:lang="de-DE" src="builtin:grammar/transcribe" />[/b]
<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>
-
The requirement was for German language de-DE locale.
Hope it helps..
Feel free to message me if you need more details :)
-
Hi, gen_den... do you happen to have the configuration needed for the Resource Access Point for integration with Google Speech Engines? It seems they have been removed from Genesys' documentation
-
hey,
I was able to do the integration successfully. Please do let me know if you need any help.
I Have the documentation too which have the steps.
Thanks
-
Nice. Can you share it?
Specifically, I'm looking for the options on the Resource Access Points. I remember that an option that contains a key to use Google API needs to be created, but I don't remember the option name and it is not present on the .APD or .XML templates.
If you have the list of options, along with any documentation, that would be great. It seems that it has been removed from the official GVP docs.
-
Hi gen_den
Is it possible that you share it?
Thanks in advanced.
Greetings
-
It was a cheap move from Genesys to remove the Documentation but it wasn't my first time so here you go.
To enable Google TTS and ASR with Genesys you need to do the following:
[list]
[li]Download and install the latest MCP available from Genesys.[/li]
[li]Install it on server with full access to Google APIs (could be DMZ Server).[/li]
[li]Get Google credential json file for the client with TTS and ASR API access.[/li]
[li]Adjust new MCP options with attached configuration.[/li]
[li]Create 2 new applications, one for ASR VP_MCP_GRPC_ASR_900 and one for TTS VP_MCP_GRPC_TTS_900 then import options attached respectively (Template should exist in new MCP install folder).[/li]
[li]Add 2 new applications to MCP connection tab.[/li]
[li]In composer entry block add global properties
[b]com.genesyslab.ttsengine=GTTS[/b]
[b]com.genesyslab.tts.name=[i]<Your TTS Name, Could be a variable>[/i][/b]
[b]com.genesyslab.asrengine=nativegsr[/b][/li]
[li]For TTS, In any prompt block add text with interpret-As set to Text[/li]
[li]For ASR use custom vxml block attached.[/li]
[/list]
[u]Please note, this is only for testing and you need a voice bot license for production implementation.
[/u]
[b]VP_MCP_GRPC_TTS_900.cfg[/b]
[provision]
vrm.client.resource.name=GTTS
vrm.client.resource.proxy=
vrm.client.resource.type=TTS
vrm.client.resource.uri=texttospeech.googleapis.com
vrm.client.TransportProtocol=GRPC
[b]VP_MCP_GRPC_ASR_900.cfg[/b]
[provision]
vrm.client.audio.codec=mulaw
vrm.client.audio.samplerate=8000
vrm.client.grammar.expected=builtin:grammar/transcribe
vrm.client.resource.name=nativegsr
vrm.client.resource.proxy=
vrm.client.resource.type=ASR
vrm.client.resource.uri=speech.googleapis.com
vrm.client.TransportProtocol=GRPC
[b]MCP_Options.cfg[/b]
[asr]
load_once_per_call=1
[mpc]
mpc.asr.codec=pcma telephone-event
[vrm]
client.grpc.credential=[i]<Location of your credential.json>[/i]
client.modules=MRCPV1 MRCPV2 MRCP_DTMFRECOGNIZER GRPC
client.grpc.dll=$InstallationRoot$/bin/libgrpcclient.dll
client.grpc.init_worker_threads=5
client.grpc.sslroots=$InstallationRoot$/config/grpc_roots.pem
[b]Custom VXML Block.vxml[/b]
[code] <block>
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
<value expr="YOUR PROMPT" />
</prompt>
</block>
<field name="GoogleASRCustomFieldEN">
<grammar mode="voice" xml:lang="en-US" src="builtin:grammar/transcribe" />
<filled>
<prompt>
You said <value expr="GoogleASRCustomFieldEN" />.
</prompt>
<assign name="AppState.var_output" expr="GoogleASRCustomFieldEN" />
</filled>
</field>
<block>
<throw event="next_block" messageexpr="AppState.var_output"></throw>
</block>
<catch event="maxspeechtimeout" count="1">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Data received too long, max is 15 seconds.
</prompt>
</catch>
<catch event="maxspeechtimeout" count="2">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Data received too long, max is 15 seconds.
</prompt>
</catch>
<catch event="noinput" count="1">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Sorry I didn't get that.
</prompt>
</catch>
<catch event="noinput" count="2">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Sorry I didn't get that.
</prompt>
</catch>
<catch event="nomatch" count="1">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Nothing matched
</prompt>
</catch>
<catch event="nomatch" count="2">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
Nothing Matched
</prompt>
</catch>
<catch event="noinput" count="3">
<throw event="com.genesyslab.composer.toomanynoinputs" message="exceeded the number of noinput retries" />
</catch>
<catch event="nomatch" count="3">
<throw event="com.genesyslab.composer.toomanynomatches" message="exceeded the number of nomatch retries" />
</catch>
<catch event="maxspeechtimeout" count="3">
<throw event="com.genesyslab.composer.toomanynomatches" message="exceeded the number of maxspeechtimeout retries" />
</catch>[/code]
-
Sorry guys, i didnt get email notifications for your update.
If you still need the guide and step do let me know.or drop me a message in my inbox.
-
Hello everyone,
I have a few questions regarding the implementation of Google TTS and ASR without GIA:
1. Is this working without the streaming plugin from Google (and MCP installed on Linux server - as the Google plugin comes only as RPM)?
2. I assume the licensing is only a commercial requirement from Genesys as there is no technical requirement and no technical license associated? When stating that VoiceBot license is needed this means voicebot bundle with GIA?
3. I assume DMZ deployment is not mandatory, only the local firewalls and proxies must support and not intercept HTTP/2 (gRCP and gRCP streaming)? Any other considerations regarding network traffic?