Package com.vonage.client.voice.ncco
Class TalkAction.Builder
java.lang.Object
com.vonage.client.voice.ncco.TalkAction.Builder
- Enclosing class:
- TalkAction
public static class TalkAction.Builder extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String text) -
Method Summary
Modifier and Type Method Description TalkAction.BuilderbargeIn(java.lang.Boolean bargeIn)TalkActionbuild()TalkAction.Builderlevel(java.lang.Float level)TalkAction.Builderloop(java.lang.Integer loop)TalkAction.Buildertext(java.lang.String text)TalkAction.BuildervoiceName(VoiceName voiceName)
-
Constructor Details
-
Builder
- 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.
-
-
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:
- The
TalkAction.Builderto keep building.
-
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:
- The
TalkAction.Builderto keep building.
-
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:
- The
TalkAction.Builderto keep building.
-
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:
- The
TalkAction.Builderto keep building.
-
voiceName
- Parameters:
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.KIMBERLYis a female who speaks English with an American accent (en-US).- Returns:
- The
TalkAction.Builderto keep building.
-
build
- Returns:
- A new
TalkActionobject from the stored builder options.
-