Package com.vonage.client.voice
Class TalkPayload
java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.voice.TalkPayload
- All Implemented Interfaces:
Jsonable
Defines the text-to-speech properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for configuring properties of TalkPayload. -
Method Summary
Modifier and TypeMethodDescriptionstatic TalkPayload.BuilderEntry point for constructing an instance of this class.The Language that will be used to converttextinto speech.getLevel()The volume level that the speech is played at, between -1 and 1.getLoop()The number of times the audio file at stream_url is repeated before the stream ends (0 for infinite).Whether the premium version of the specified voice style should be used if available.getStyle()The Vocal Style to use (range, tessitura, timbre) to use in the speech.getText()A string of up to 1500 characters containing the message to be synthesized in the Call or Conversation.Methods inherited from class com.vonage.client.JsonableBaseObject
createJsonObjectMapper, equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vonage.client.Jsonable
toJson, updateFromJson
-
Method Details
-
getLoop
The number of times the audio file at stream_url is repeated before the stream ends (0 for infinite).- Returns:
- The number of repetitions, or
nullif unset (the default).
-
getText
A string of up to 1500 characters containing the message to be synthesized in the Call or Conversation. Each comma in text adds a short pause to the synthesized speech.- Returns:
- The speech text, or
nullif unset (the default).
-
getLanguage
The Language that will be used to converttextinto speech.- Returns:
- The TTS language as an enum, or
nullif unset (the default).
-
getStyle
The Vocal Style to use (range, tessitura, timbre) to use in the speech.- Returns:
- The voice style, or
nullif unset (the default).
-
getLevel
The volume level that the speech is played at, between -1 and 1.- Returns:
- The speech volume, or
nullif unset (the default).
-
getPremium
Whether the premium version of the specified voice style should be used if available.- Returns:
truefor premium,falsefor standard ornullif unset (the default).
-
builder
Entry point for constructing an instance of this class.- Parameters:
text- The text to convert to speech.- Returns:
- A new Builder.
-