Class AddCustomPromptOptions

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

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

    • newBuilder

      public AddCustomPromptOptions.Builder newBuilder()
      New builder.
      Returns:
      a AddCustomPromptOptions builder
    • customizationId

      public String customizationId()
      Gets the customizationId.

      The customization ID (GUID) of the custom model. You must make the request with credentials for the instance of the service that owns the custom model.

      Returns:
      the customizationId
    • promptId

      public String promptId()
      Gets the promptId.

      The identifier of the prompt that is to be added to the custom model: * Include a maximum of 49 characters in the ID. * Include only alphanumeric characters and `_` (underscores) in the ID. * Do not include XML sensitive characters (double quotes, single quotes, ampersands, angle brackets, and slashes) in the ID. * To add a new prompt, the ID must be unique for the specified custom model. Otherwise, the new information for the prompt overwrites the existing prompt that has that ID.

      Returns:
      the promptId
    • metadata

      public PromptMetadata metadata()
      Gets the metadata.

      Information about the prompt that is to be added to a custom model. The following example of a `PromptMetadata` object includes both the required prompt text and an optional speaker model ID:

      `{ "prompt_text": "Thank you and good-bye!", "speaker_id": "823068b2-ed4e-11ea-b6e0-7b6456aa95cc" }`.

      Returns:
      the metadata
    • file

      public InputStream file()
      Gets the file.

      An audio file that speaks the text of the prompt with intonation and prosody that matches how you would like the prompt to be spoken. * The prompt audio must be in WAV format and must have a minimum sampling rate of 16 kHz. The service accepts audio with higher sampling rates. The service transcodes all audio to 16 kHz before processing it. * The length of the prompt audio is limited to 30 seconds.

      Returns:
      the file