Using Dialogflow in VoiceXML Applications

1,869 views
Skip to first unread message

Arsen Chaloyan

unread,
Jan 4, 2018, 8:16:45 PM1/4/18
to UniMRCP
UniMRCP users:

This post provides a basic guidance on how to use Google Dialogflow in VoiceXML applications.

Prerequisites
  • VoiceXML 2.1 compliant platform (Genesys, Avaya, Cisco, Voxeo, ...)
  • UniMRCP server with Google Dialogflow plugin (http://unimrcp.org/gdf)
Configuration

The ASR resource of VoiceXML platform must be configured to use UniMRCP server. While the relevant configuration details slightly differ for each VoiceXML platform, you should consider using the following common parameters:

sip:ipaddress:8060 for MRCPv2
rtsp:ipaddress:1554 for MRCPv1

where ipaddress needs to be replaced with the corresponding IP address of UniMRCP server.

Initiating Recognition

In order to initiate a speech recognition, a built-in grammar "speech/transcribe" must be to be referenced from a VoiceXML application. For example:

<field>
   <grammar src="builtin:speech/transcribe"/>

</field>

As a result, a StreamingDetectIntent request will be sent to the Google Dialogflow service.

Processing Results

Upon a successful completion of the request, a received QueryResult structure is transformed to XML and incorporated into the <instance> element of NLSML results sent back to the VoiceXML application. All the QueryResult fields can be referenced in the VoiceXML application by means of lastresult$.interpretation variable. For example:

<field>
  <grammar src="builtin:speech/transcribe"/>
  <filled>
    <prompt>You said <break time="300ms"/> <value expr="lastresult$.interpretation.query_text"/> <break time="300ms"/></prompt>
    <prompt><value expr="lastresult$.interpretation.fulfillment_text"/></prompt>
  </filled>
</field>

Sample Application

You may check out the following sample VoiceXML application.


In order to use the application, simply point your VoiceXML browser to the URI above.

This should be enough to get started. Your questions, thoughts and ideas are welcome.

--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org

Anand

unread,
Jan 10, 2018, 10:39:42 AM1/10/18
to UniMRCP
On Friday, 5 January 2018 06:46:45 UTC+5:30, Arsen Chaloyan wrote:
> UniMRCP users:
>
> This post provides a basic guidance on how to use Google Dialogflow in VoiceXML applications.
>
> Prerequisites
> VoiceXML 2.1 compliant platform (Genesys, Avaya, Cisco, Voxeo, ...)UniMRCP server with Google Dialogflow plugin (http://unimrcp.org/gdf)
Great!!! This post was very much helpful for me to Integrate the Google Dialog Flow with IVR[VoiceXML] Applications. Thank you so much Arsen.

Karthic Raghupathi

unread,
Jan 12, 2018, 11:52:10 AM1/12/18
to UniMRCP
Very exciting to see a DialogFlow plugin. I had a quick question though: why is VXML compliant platform listed as a pre-requisite. Can this plugin not be used from Asterisk / Freeswitch via the UniMRCP server?

Arsen Chaloyan

unread,
Jan 12, 2018, 8:32:40 PM1/12/18
to UniMRCP
Thanks for your responses. I am also very excited with what Dialogflow offers.

While this particular post is related to the VoiceXML use case, the Dialogflow plugin can be used from any MRCP-compliant IVR platform. I'll try to post similar examples for Asterisk and FreeSWITCH later on.

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages