Objective
How To Make MP3 of Recording From Voice API
Applies To
- Voice API
- Python SDK
Procedure
- You can follow the steps to get the recording into a variable within your Python script.
- Once you have the audio in a variable (recording) in the example below, you can write it to a file using the code following the comment: # how to write recording to file.
recording = voice.get_recording("https://api-us.nexmo.com/v1/files/example-9009-4412-a31c-8380fcad6ac2")
# how to write recording to file
file = 'recording.mp3'
with open(file, 'wb') as f:
f.write(recording)
You now have your recording in an MP3 file named 'recording.mp3' on disk, which can be played on any popular MP3 player.
Articles in this section
- Why is there an extended silence at the beginning of a call and how can it be reduced?
- Intermittent WebSocket Disconnections
- What Is An NCCO
- How Does Jitter Impact Voice Calls
- Voice API "Bad Request" Error When Ending Calls Immediately After Creation
- What Is MOS Score In Voice Calls?
- Is there a way to see current active calls on our account?
- How To Make MP3 of Recording From Voice API in Python
- How To Enter DTMF Before MP3 Stream Finishes
- Can a user call leg be removed from the voice call recording?