Class SynthesizeOptions

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.text_to_speech.v1.model.SynthesizeOptions
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class SynthesizeOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
The synthesize options.
  • Method Details

    • newBuilder

      public SynthesizeOptions.Builder newBuilder()
      New builder.
      Returns:
      a SynthesizeOptions builder
    • text

      public String text()
      Gets the text.

      The text to synthesize.

      Returns:
      the text
    • accept

      public String accept()
      Gets the accept.

      The requested format (MIME type) of the audio. You can use the `Accept` header or the `accept` parameter to specify the audio format. For more information about specifying an audio format, see **Audio formats (accept types)** in the method description.

      Returns:
      the accept
    • voice

      public String voice()
      Gets the voice.

      The voice to use for synthesis. For more information about specifying a voice, see **Important voice updates for IBM Cloud** in the method description.

      **IBM Cloud:** The Arabic, Chinese, Dutch, Australian English, and Korean languages and voices are supported only for IBM Cloud.

      **See also:** See also [Using languages and voices](https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-voices).

      Returns:
      the voice
    • customizationId

      public String customizationId()
      Gets the customizationId.

      The customization ID (GUID) of a custom model to use for the synthesis. If a custom model is specified, it works only if it matches the language of the indicated voice. You must make the request with credentials for the instance of the service that owns the custom model. Omit the parameter to use the specified voice with no customization.

      Returns:
      the customizationId
    • getTimings

      public List<String> getTimings()
      Gets the timings.

      An array that specifies whether the service is to return word timing information for all strings of the input text. Specify `words` as the element of the array to request word timing information. The service returns the start and end time of each word of the input. Specify an empty array or omit the parameter to receive no word timing information. Not supported for Japanese input text.

      NOTE: This parameter only works for the `synthesizeUsingWebSocket` method.

      Returns:
      the timings