public static class TalkAction.Builder extends java.lang.Object
| Constructor and Description |
|---|
Builder(java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
TalkAction.Builder |
bargeIn(java.lang.Boolean bargeIn) |
TalkAction |
build() |
TalkAction.Builder |
level(java.lang.Float level) |
TalkAction.Builder |
loop(java.lang.Integer loop) |
TalkAction.Builder |
text(java.lang.String text) |
TalkAction.Builder |
voiceName(VoiceName voiceName) |
public Builder(java.lang.String text)
text - A string of up to 1,500 characters (excluding SSML tags) containing the message to be
synthesized in the Call or Conversation. A single comma in text adds a short pause to the
synthesized speech. To add a longer pause a break tag needs to be used in SSML.
To use SSML tags, you must enclose the text in a speak element.
public TalkAction.Builder text(java.lang.String text)
text - A string of up to 1,500 characters (excluding SSML tags) containing the message to be
synthesized in the Call or Conversation. A single comma in text adds a short pause to the
synthesized speech. To add a longer pause a break tag needs to be used in SSML.
To use SSML tags, you must enclose the text in a speak element.
TalkAction.Builder to keep building.public TalkAction.Builder bargeIn(java.lang.Boolean bargeIn)
bargeIn - Set to true so this action is terminated when the user presses a button on the keypad.
Use this feature to enable users to choose an option without having to listen to the whole
message in your Interactive Voice Response (IVR). If you set bargeIn to true the next
action in the NCCO stack must be an input action. The default value is false.TalkAction.Builder to keep building.public TalkAction.Builder loop(java.lang.Integer loop)
loop - The number of times text is repeated before the Call is closed.
The default value is 1. Set to 0 to loop infinitely.TalkAction.Builder to keep building.public TalkAction.Builder level(java.lang.Float level)
level - The volume level that the speech is played. This can be any value between -1 to 1 with 0
being the default.TalkAction.Builder to keep building.public TalkAction.Builder voiceName(VoiceName voiceName)
voiceName - The name of the voice used to deliver text. You use the voiceName that has the correct
language, gender and accent for the message you are sending.
For example, the default
voice VoiceName.KIMBERLY is a female who speaks English with an American accent (en-US).
TalkAction.Builder to keep building.public TalkAction build()
TalkAction object from the stored builder options.