Interface CalloutRequestTTS
- All Superinterfaces:
CalloutRequest
CalloutRequestTTS
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Dedicated Builderstatic class
Gets or Sets method -
Method Summary
Modifier and TypeMethodDescriptionstatic CalloutRequestTTS.Builder
builder()
Getting buildergetCli()
The number that will be displayed as the incoming caller.Can be used to input custom data.Get destinationGet domaingetDtmf()
When the destination picks up, this DTMF tones will be played to the callee.IfenableAce
is set totrue
and the application has a callback URL specified, you will receive an ACE callback when the call is answered.IfenableDice
is set totrue
and the application has a callback URL specified, you will receive a DiCE callback when the call is disconnected.Note: PIE callbacks are not available for DATA Calls; only PSTN and SIP calls.The voice and language you want to use for the text-to-speech message.An advanced alternative to usingtext
.getText()
The text that will be spoken in the text-to-speech message.
-
Method Details
-
getCli
String getCli()The number that will be displayed as the incoming caller. To set your own CLI, you may use your verified number or your Dashboard number. The number must be in E.164 format.- Returns:
- cli
-
getDestination
DestinationTextToSpeech getDestination()Get destination- Returns:
- destination
-
getDtmf
DualToneMultiFrequency getDtmf()When the destination picks up, this DTMF tones will be played to the callee. Valid characters in the string are "0"-"9", "#", and "w". A "w" will render a 500 ms pause. For example, "ww1234#w#" will render a 1s pause, the DTMF tones "1", "2", "3", "4" and "#" followed by a 0.5s pause and finally the DTMF tone for "#". This can be used if the callout destination for instance require a conference PIN code or an extension to be entered.- Returns:
- dtmf
-
getDomain
Domain getDomain()Get domain- Returns:
- domain
-
getCustom
String getCustom()Can be used to input custom data.- Returns:
- custom
-
getLocale
String getLocale()The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed here.- Returns:
- locale
-
getText
String getText()The text that will be spoken in the text-to-speech message. Every application's default maximum characters allowed in text-to-speech is 600 characters. Contact support if you wish this limit to be changed.- Returns:
- text
-
getPrompts
String getPrompts()An advanced alternative to usingtext
. TTS Text To Speech: The equivalent of text but within the prompt property. Example:#tts[Hello from Sinch]
TTS with SSML Text To Speech with Speech Synthesis Markup Language (SSML). This is an XML-based markup language for assisting the generation of synthetic speech in the Web and other applications. AWS Polly supports a sub-set of SSML. This allows us to use SSML-enhanced text for additional control over how Polly generates speech from the text. Details and examples of supported tags are here Externally hosted media: Provide a URL to your own hosted media. Please check here to read about audio content type and usage limits. Every application's default maximum allowed in TTS or TTS SSML is 600 characters. Contact support if you wish this limit to be changed. Several prompts can be used, separated by a semi-colon;
Example:#tts[Hello from Sinch];#ssml[<speak><break time=\\\"250ms\\\"/>Have a great day!</speak>]
- Returns:
- prompts
-
getEnableAce
Boolean getEnableAce()IfenableAce
is set totrue
and the application has a callback URL specified, you will receive an ACE callback when the call is answered. When the callback is received, your platform must respond with a svamlet, containing the “connectconf” action in order to add the call to a conference or create the conference if it's the first call. If it's set tofalse
, no ACE event will be sent to your backend.- Returns:
- enableAce
-
getEnableDice
Boolean getEnableDice()IfenableDice
is set totrue
and the application has a callback URL specified, you will receive a DiCE callback when the call is disconnected. If it's set tofalse
, no DiCE event will be sent to your backend.- Returns:
- enableDice
-
getEnablePie
Boolean getEnablePie()Note: PIE callbacks are not available for DATA Calls; only PSTN and SIP calls. IfenablePie
is set totrue
and the application has a callback URL specified, you will receive a PIE callback after therunMenu
action executes and after the configured menu timeout has elapsed with no input. If it's set tofalse
, no PIE events will be sent to your backend.- Returns:
- enablePie
-
builder
Getting builder- Returns:
- New Builder instance
-