When making a Text-to-Speech callout, the synthesized voice starts speaking as soon as the call is answered. In some cases, this may not be desireable. Using Speech Synthesis Markup Language (or SSML), you can add a pause to the start of the speech so that the synthesized voice waits for a configurable period of time before speaking.
Note: To learn how to make a Text-to-Speech callout, see our getting started guides on our developer portal!
Adding a pause is as simple as adding a few SSML tags to the prompt property of the ttsCallout request body:
{
"method": "ttsCallout",
"ttsCallout": {
"cli": "<YOUR_phone_number>",
"destination": {
"type": "number",
"endpoint": "<destination_phone_number>" },
"locale": "en-US", "prompts": "#ssml[<speak><break time="3s"/>Hello, this is a phone call from Sinch.</speak>]"
}
}
The above code will result in a 3-second pause before the synthesized voice says the prompt.
You can use SSML tags for many other things in Text-to-Speech calls. Sinch's Voice API supports the SSML tags defined in the RFC. Some of the available Voice IDs may have limited support of the defined SSML tags.
Documentation for Voice Calling API: https://developers.sinch.com/docs/voice/api-reference/
Android : https://developers.sinch.com/docs/in-app-calling/android-cloud/
iOS : https://developers.sinch.com/docs/in-app-calling/ios-cloud/
Javascript: https://developers.sinch.com/docs/in-app-calling/js-cloud/
Latest Voice SDKs: https://developers.sinch.com/docs/in-app-calling/sdk-downloads/
Voice SDK
Reference Apps: JS, Android, iOS https://github.com/sinch/rtc-reference-applications
Calling API
webhook callback application: https://github.com/sinch/voice-api-webhook-nodejs
php client + samples : https://github.com/sinch/voice-api-php
How to: https://community.sinch.com/t5/Virtual-Numbers/Getting-a-number-from-Sinch/ta-p/8081
Login to https://dashboard.sinch.com/numbers/buy-numbers find the number you want.