Package com.vonage.client.voice.ncco
Class TalkAction.Builder
java.lang.Object
com.vonage.client.voice.ncco.TalkAction.Builder
- Enclosing class:
TalkAction
-
Method Summary
-
Method Details
-
text
- Parameters:
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.
- Returns:
- This builder.
-
bargeIn
- Parameters:
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.- Returns:
- This builder.
-
loop
- Parameters:
loop- The number of times text is repeated before the Call is closed. The default value is 1. Set to 0 to loop infinitely.- Returns:
- This builder.
-
level
- Parameters:
level- The volume level that the speech is played. This can be any value between -1 to 1 with 0 being the default.- Returns:
- This builder.
-
language
- Parameters:
language- The Language to use when converting the text to speech.- Returns:
- This builder.
-
style
- Parameters:
style- The vocal style to use.- Returns:
- This builder.
-
build
- Returns:
- A new
TalkActionobject from the stored builder options.
-