Dani
Dani

Reputation: 11

twilio play mp3 to caller

I have recorded a mp3 audiofile. I want to play it to the caller. I do not have a server or so from where twilio could access the mp3 file.

What is the easiest way to play that mp3 file to the caller? (Subquestions: where can I upload it for twilio? how do I access the file?)

I have read the posts and https://www.twilio.com/docs/api/twiml/play et cetera so I guess I just need to play the audio file for the caller using these few lines of TwiML, replacing the URL:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Play loop="10">https://api.twilio.com/cowbell.mp3</Play>
</Response>

Since I am an absolute beginner simplicity is key. Thank you so much in advance!

Upvotes: 1

Views: 4753

Answers (2)

Max
Max

Reputation: 1548

You can always use Twilio's own CDN by uploading audio files to their assets.

Twilio Assets

Using Twilio Assets is a best way to make sure you have a minimum delay while playing that audio on call.

Upvotes: 0

gipsy
gipsy

Reputation: 3859

You have to store your mp3 on server and access it via a url. If you don't have your own server , your best bet will be to signup for amazon s3 or google cloud storage and store the mp3 there. Then make the url to access it public and use it in your TwiML.

Upvotes: 4

Related Questions