Class TalkPayload

java.lang.Object
com.vonage.client.JsonableBaseObject
com.vonage.client.voice.TalkPayload
All Implemented Interfaces:
Jsonable

public final class TalkPayload extends JsonableBaseObject
Defines the text-to-speech properties.
  • Method Details

    • getLoop

      public Integer 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 null if unset (the default).
    • getText

      public String 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 null if unset (the default).
    • getLanguage

      The Language that will be used to convert text into speech.
      Returns:
      The TTS language as an enum, or null if unset (the default).
    • getStyle

      public Integer getStyle()
      The Vocal Style to use (range, tessitura, timbre) to use in the speech.
      Returns:
      The voice style, or null if unset (the default).
    • getLevel

      public Double getLevel()
      The volume level that the speech is played at, between -1 and 1.
      Returns:
      The speech volume, or null if unset (the default).
    • getPremium

      public Boolean getPremium()
      Whether the premium version of the specified voice style should be used if available.
      Returns:
      true for premium, false for standard or null if unset (the default).
    • builder

      public static TalkPayload.Builder builder(String text)
      Entry point for constructing an instance of this class.
      Parameters:
      text - The text to convert to speech.
      Returns:
      A new Builder.