Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to access the live audio stream in a Twilio call?

Twilio can provide call recording, but that's not real-time. Is it possible to write an app that processes the caller's audio in real-time and responds after processing the audio? I'd like to have some software "listen" to the speaker and respond programmatically.

like image 907
Zach Rattner Avatar asked May 12 '15 01:05

Zach Rattner


People also ask

How does twilio voice call work?

When your phone number receives an incoming call, Twilio will send an HTTP request to your server at /answer. Your app tells Twilio how to respond with a text to speech response. Twilio gets the instructions from your app and sends the voice response. Twilio's always there when you call!

How do I use twilio for phone calls?

You can use a Function to make a call from your Twilio phone number via Programmable Voice. The to and from parameters of your call must be specified to successfully send, and valid TwiML must be provided either via the url or twiml parameters.

How do I change twilio voice?

When using <Say> , you can choose between using Man, Woman, Alice, or Amazon Polly voices. To use one of these voices, either configure the Text to Speech settings in the Twilio Console, or provide the Voice attribute on <Say> . You can view and change the default voice in the Twilio Console.


2 Answers

Two years later, Twilio has released the use case I was trying to do on my own. They have a real-time speech recognition service built into Programmable Voice now. It's in public beta: https://www.twilio.com/blog/2017/05/introducing-speech-recognition.html

like image 144
Zach Rattner Avatar answered Oct 09 '22 09:10

Zach Rattner


For people still looking, Twilio now has Voice Streams that covers this use case ! It's a twiml verb that will communicate the audio through websocket to your server.

like image 22
nSimonFR Avatar answered Oct 09 '22 10:10

nSimonFR