By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.
Contact Center

Easy Speech IVR for Outbound Calling using Voicegain and Twilio

Outbound IVRs on Voicegain

Voicegain platform makes it easy to build IVRs for simple outbound calling applications like: surveys (Voice-of-Customer, political, etc), reminders (e.g. appointments, payments due), notifications (e.g. school closure, water boil notice), and so on.

Voicegain allows developers to use the outbound calling features of CPaaS platforms like Twilio or SignalWire with the speech recognition and IVR features of the Voicegain platform. All you need is this simple piece of code to make an outbound call using Twilio and connect it to Voicegain for IVR.

call=client.calls.create(twiml='<Response> \<Dial><Sip>sip:673a8342-b0eds851-7c18b8ca3ba@fs001.voicegain.ai:5080;transport=tcp?x-mycustomheader=foo</Sip></Dial> \    <Say voice="woman" language="en-US">Bye</Say> \</Response>',   to='+18174221096',   from_='+14655440912' )

Defining IVRs in declarative way

Voicegain provides a full featured Telephone Bot API. It is a webhook/callback style API that can be used in similar way you would use Twilio's TwiML. You can read more about it here

However, in this post, we describe an even simpler method to build IVRs. We allow developers to specify the Outbound IVR call flow definitions in a simple YAML format. We also provide a python script that can be easily deployed on AWS Lambda or on your web-server to interpret this YAML file. The complete code with examples can be found on our github. It is under MIT license so you can modify the main interpreter script to your liking. You might want to do it e.g. to make calls to external webservices that your IVR needs.

In this YAML format, an IVR question would be defined as follows:

AgreeToParticipate:  type: INPUT  name: agreeToParticipate  voice: catherine  prompt: 'Would you like to participate now, or would you rather have us call you later.'  bargeIn: true  grammar:     type: JJSGF    parameters:      tag-format: semantics/1.0-literals    grammar: participate    public:      root: "(<now> {now}) | (<later> {later}) | (<never> {never})"    rules:      now: "(yes [participate] [now]) | ([participate] now)"      later: "(later)"      never: "(no) | (never)"  noInputMax: 1  noMatchMax: 1  confirmation:    threshold: 0.33    prompt: "Was it: ${agreeToParticipate} ?"  fail: CallHealth  next: ParticipateDecision  

As you can see, this is a pretty easy way to define an IVR question. Notice also that we provide a built-in handling for the NOINPUT and NOMATCH re-prompts, as well as the logic for confirmations. This greatly reduces the the clutter in the specification as those flow scenarios do not have to be handled explicitly.

The questions support either use of grammars to map responses to semantic meaning, or they can alternatively simply capture the response using a large vocabulary transcription.

Prompts are played using TTS or can be concatenated from prerecorded clips.

Wait, there is more.

Because this is built on top of Voicegain Telephone Bot API it comes with full API access to the IVR call session. You can obtain details, including all the events and responses, of the complete session using the API. This includes the 2-channel recording plus also full transcription of both channels and also Speech Analytics features.

You can also examine the details of the session from the Voicegain Console and listen to the audio. This helps in testing the application before it gets deployed.  




If you have questions about building this type of IVRs running on Voicegain platform, please contact us at support@voicegain.ai

Sign up for an app today
* No credit card required.

Enterprise

Interested in customizing the ASR or deploying Voicegain on your infrastructure?

Contact Us →