Class SpeechMetadata

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SpeechMetadata

public abstract class SpeechMetadata extends JsonSerializable
Extra metadata associated with the part for speech synthesis.
  • Constructor Details

    • SpeechMetadata

      public SpeechMetadata()
  • Method Details

    • speaker

      public abstract Optional<String> speaker()
      The speaker for this part, which must match a `speaker` name in `MultiSpeakerVoiceConfig.speaker_voice_configs`.
    • style

      public abstract Optional<String> style()
      The style instruction for how the voice should be synthesized (e.g. "excited, fast-paced").
    • builder

      public static SpeechMetadata.Builder builder()
      Instantiates a builder for SpeechMetadata.
    • toBuilder

      public abstract SpeechMetadata.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static SpeechMetadata fromJson(String jsonString)
      Deserializes a JSON string to a SpeechMetadata object.