Package com.vonage.client.voice
Class TalkPayload.Builder
java.lang.Object
com.vonage.client.voice.TalkPayload.Builder
- Enclosing class:
TalkPayload
Builder for configuring properties of TalkPayload.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs the TalkPayload object.language(TextToSpeechLanguage language) The speech language to use.level(double level) The volume level that the speech is played.loop(int loop) The number of times to repeat the message.premium(boolean premium) Specify whether to use the premium version of the specified style if available.style(int style) The vocal style (vocal range, tessitura, and timbre) to use for text-to-speech.
-
Method Details
-
loop
The number of times to repeat the message. The default value is1, or you can use0to indicate that the message should be repeated indefinitely.- Parameters:
loop- The number of repetitions.- Returns:
- This builder.
-
style
The vocal style (vocal range, tessitura, and timbre) to use for text-to-speech. Each language has varying number of styles. Refer to the documentation for available values.- Parameters:
style- The language style as an integer.- Returns:
- This builder.
-
level
The volume level that the speech is played. This can be any value between -1 to 1 in 0.1 increments, with 0 being the default.- Parameters:
level- The volume of speech.- Returns:
- This builder.
-
language
The speech language to use.- Parameters:
language- Language code as an enum.- Returns:
- This builder.
-
build
Constructs the TalkPayload object.- Returns:
- A new TalkPayload instance with this builder's properties.
-