You can play an audio file to a participant by using either the play API or the play XML.
The audio file can be shared through a remote URL. Plivo supports .mp3 and .wav file formats. The preferences for .mp3 and .wav files are as follows.
The .mp3 file should be formatted with the following settings: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo
The .wav file should be formatted with the following settings: WAVE PCM, 8,000 Hz 16 bit or 11,025 Hz 16 bit PCM
Learn how to set up an audio file in this tutorial: https://www.plivo.com/docs/getting-started/play-mp3-audio-to-caller/
Frequently asked questions
- Does Plivo process or modify a customer's audio file?
No, we don't modify the audio file before playing it.
- What happens if the .mp3 or .wav specs don't match the preferences mentioned above? Will Plivo still process that file?
Yes, but the quality may not be as clear as expected.
- What happens if the .mp3 is set at 193 kbps? Will the audio be of poor quality?
We should be able to play this file as it is, but can't guarantee the audio quality. We advise you to configure the file withing the suggested parameters mentioned above.