vonage

Get Live Audio Stream of an Outbound Call in Nexmo


I have checked all the documentations of Nexmo and I can't seem to figure out how to get Live Audio stream of an outbound call in Nexmo. What I can see currently is the recording of the call which does not work for my use case at the moment.


Solution

  • To get a live audio feed, you will need to use a websocket connection. The websocket will get the live audio chunks sent down in real time, which you can then pass off to other services like transcribing or sentiment analysis services, or stitch back together into a discreet file.

    You'll need to send a connect action NCCO to connect to a web socket server you would be running, and the web socket server would handle the incoming data.

    Web sockets for the Voice API - https://developer.nexmo.com/voice/voice-api/guides/websockets