Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the voice helpers are very interesting; what approach do we take? plain xml response? or command to construct xml ? The helpers will be great, this will make voice so easy 👍

voice.say("X is a letter! It's not a word") 

Here the approach is to wrap say around root xml response - what of nested commands? and attributes, how to create the xml response?

Of course this is for incoming calls, with the callback url handler. is ok. I don’t think there’s much there. I mean initiating a call.

voice.say("say something", voice="woman") // ?

Say then Play a URL

<Say>Please listen to our awesome record</Say>
<Play url=""/>
voice.say("Hi, listen to", play=url)

and how do we wrap getDigits when we say?

voice.say("say something I'm giving ... ", voice=woman, getDigits=True, record=True) // ?
// sadly without named parameters
// also, recording - maybe an attribute to be set

call redirect?

if (dtmfDigit === '9') {

then, this would be expected.

  <Dial phoneNumbers="+254711XXXYYY,+254733YYYZZZ," ringBackTone="" record="true" sequential="true"/>

maps to

// callerId specific to calling out from SIP
voice.dial(phoneNumbers=phones, maxDurationInSec=10, record=True, 
                ringBackTone="some_url", sequential="True", callerId="some_num");

Problem with this is that we need all possible mappings, and I think there’s many cases, we might miss a few and not generate a proper functional XML string, but the XML response will still work.

So, basically we generate this by passing attributes on a command, is this a good approach? we also need a SIP section, will look at this later.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

aksaljcommented, Jan 13, 2017

Could something like this be a good solution?

// example (express)'/callback/voice', new AfricasTalking.VOICE.CallHandler((phoneCall) => {
    var session = phoneCall.session;
    if (phoneCall.isActive) {
    } else if (phoneCall.isCompleted){
    var response = voice.builder()
        .say("UI", {voice: "woman"})
        .getDigits("SW", {say:{voice: "man"}})
        //... more say(), play(), record(), etc.
    phoneCall.respond(null, response);
ianjumacommented, Jan 13, 2017

that’s perfect! awesome! this will make it so easy to build voice apps on node 💯

Read more comments on GitHub >

github_iconTop Results From Across the Web

Everything you need to know about voice assistants - Santander
The most well-known are Alexa (Amazon), Siri (Apple), Google Assistant (Google) and Bixby (Samsung), which are taking over our homes thanks to ...
Read more >
Voice Assistants in 2022: Usage, growth, and future of the AI ...
Voice assistants are intelligent software that responds to voice commands and can run on any device, including smartphones, speakers, desktop/ ...
Read more >
Virtual assistant - Wikipedia
Some virtual assistants are able to interpret human speech and respond via synthesized voices. Users can ask their assistants questions, control home ...
Read more >
Best Voice Assistants for Your Home and Office - IndieWire
The three big players in the voice assistant space are Amazon, Google, and Apple. Amazon pioneered the field with its famous Alexa technology, ......
Read more >
Top 22 Intelligent Personal Assistants or Automated Personal ...
Some automated personal assistants can perform concierge type tasks or provide information based on voice input or commands and some smart personal agents, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found