Package com.vonage.client.conversations
Class AudioSayEvent.Builder
java.lang.Object
com.vonage.client.conversations.Event.Builder<AudioSayEvent,AudioSayEvent.Builder>
com.vonage.client.conversations.AudioSayEvent.Builder
- Enclosing class:
AudioSayEvent
public static final class AudioSayEvent.Builder
extends Event.Builder<AudioSayEvent,AudioSayEvent.Builder>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the EventWithBody.language(TextToSpeechLanguage language) Language for the spoken text.level(double level) Audio volume level, with -1 being quietest, +1 being loudest and 0 the default.loop(int loop) Number of times to repeat the audio.premium(boolean premium) Whether to use the premium version of the text-to-speech voice.queue(boolean queue) Whether to queue the audio.ssml(boolean ssml) Whether to enable Synthesized Speech Markup Language (SSML).style(int style) Text-to-speech voice style.(REQUIRED) Text to be spoken.Methods inherited from class com.vonage.client.conversations.Event.Builder
from
-
Method Details
-
text
(REQUIRED) Text to be spoken.- Parameters:
text- The speech text.- Returns:
- This builder.
-
style
Text-to-speech voice style. See the Voice API documentation for valid options.- Parameters:
style- The TTS style as an int.- Returns:
- This builder.
-
language
Language for the spoken text.- Parameters:
language- The TTS language as an enum.- Returns:
- This builder.
-
ssml
Whether to enable Synthesized Speech Markup Language (SSML).- Parameters:
ssml-trueto use SSML.- Returns:
- This builder.
-
build
Description copied from class:Event.BuilderBuilds the EventWithBody.- Specified by:
buildin classEvent.Builder<AudioSayEvent,AudioSayEvent.Builder> - Returns:
- An instance of Event, populated with all fields from this builder.
-
queue
Whether to queue the audio.- Parameters:
queue-trueto enable queuing,falseotherwise.- Returns:
- This builder.
-
level
Audio volume level, with -1 being quietest, +1 being loudest and 0 the default.- Parameters:
level- The volume as a double.- Returns:
- This builder.
-
loop
Number of times to repeat the audio. Default is 1.- Parameters:
loop- The loop count as an int.- Returns:
- This builder.
-