Send Voice over API

Besides Flow and Broadcast available via web interface, voice calls can be initiated using our API.

We support:

  • Text-to-speech
  • Pre-recorded audio files
  • Click-to-call

(Early Access) Outbound voice calls sent using Voice over API can be recorded.

Refer to our Voice API documentation to see how you can enable voice recording. Visit the Voice Recording for billing details.

NOTE

Voice calls recording might be subject to legal actions so check regulations on specific markets you are covering that use voice services.

Here's what you can do with the audio files you've created using the Recording feature.

Refer to the Voice Recording article for more details.

Text-to-speech (TTS) and Pre-recorded Audio Files

The Text-to-speech and Pre-recorded audio files ecosystem looks like this: 

Send Voice over Api using text-to-speech and prerecord audio files

Text-to-speech

Text to speech is used to convert a written message into an audio file that will be played to your customers once they answer your voice call. This feature eliminates the need to create an audio file in advance, providing you with a faster solution that is useful for both promotional and transactional traffic.

TTS conversion occurs in real time and it can be used to time-sensitive information such as 2FA One-Time PINs (OTPs). TTS is available in more than 100 languages and accents. Feel free to check the list of available languages.

Pre-recorded Audio Files

This feature enables you to use a pre-recorded audio file and play it to your customers once they answer your voice call. It can be used in combination with TTS or on its own to create a unique customer experience.

Both of these features can be used via API. 

Request example:

{
   "messages": [
      {
         "from": "41793026700",
         "destinations": [
            {
               "to": "41793026727",
               "messageId": "MESSAGE-ID-123-xyz"
            },
            {
               "to": "41793026731"
            }
         ],
         "audioFileUrl": https://www.example.com/media.mp3,
         "text": " Hello world.",
         "language": "en",
         "voice": {
            "name": "Joanna",
            "gender": "female"
         }
]
}

For detailed info on how to use API for text-to-speech and pre-recorded audio, refer to our Infobip API Developer Hub.

Charging Text-to-Speech and Pre-Recorded Audio Files Calls over API

Text-to-Speech and Pre-recorded audio files would be charged as outbound voice traffic. You will pay the traffic charges and the usage charges of the Automated Machine Detection and Recording feature if being used.

Additionally, if using a Response code parameter with the Forward Call option, you will be charged for the second call as well.

Voice - Text-to-Speech and Audio Files Charges

Bear in mind that the voice charges are applied only in case the call is answered.

Click-to-Call

Click-to-call is a form of web-based communication in which a customer clicks on an object (e.g., button, image or text) to request a phone call with one of your agents.

Send Voice over API - Click to call option

Your web-based platforms require a dialog from where your customer can request a call from you by filling out a form with their personal details. The phone number is mandatory information for the click-to-call service. Depending on your business case, you may already have this information, since the customer requesting a call is a registered user of your service.

The click-to-call service requires two numbers: customer and agent numbers. Once the first person answers the call from our platform, they will be connected to the other party. 

Refer to our Infobip API Developer hub on how to send a click-to-call message.

Charging Click-to-Call

Click-to-Call feature would be charged as outbound voice traffic. You will pay the traffic charges and the usage charges of the Automated Machine Detection and Recording feature if being used.

Depending whether one or both sides have answered the call, we would charge one or two calls.  If no one answered, the calls would not be charged.

Voice - Click-to-call charges