Class SpeechAnnotation

java.lang.Object
com.google.genai.gaos.models.interactions.SpeechAnnotation
All Implemented Interfaces:
Annotation

public class SpeechAnnotation extends Object implements Annotation
SpeechAnnotation

Speech annotation for text content.

  • Constructor Details

    • SpeechAnnotation

      public SpeechAnnotation(@Nullable Integer endIndex, @Nullable String speaker, @Nullable Integer startIndex, @Nullable String style)
    • SpeechAnnotation

      public SpeechAnnotation()
  • Method Details

    • endIndex

      public Optional<Integer> endIndex()
      End of the attributed segment, exclusive.
    • speaker

      public Optional<String> speaker()
      The speaker to associate with this turn.
    • startIndex

      public Optional<Integer> startIndex()
      Start of segment of the response that is attributed to this source.

      Index indicates the start of the segment, measured in bytes.

    • style

      public Optional<String> style()
      Style instruction for the speech synthesis.
    • type

      public String type()
      Specified by:
      type in interface Annotation
    • builder

      public static SpeechAnnotation.Builder builder()
    • withEndIndex

      public SpeechAnnotation withEndIndex(@Nullable Integer endIndex)
      End of the attributed segment, exclusive.
    • withSpeaker

      public SpeechAnnotation withSpeaker(@Nullable String speaker)
      The speaker to associate with this turn.
    • withStartIndex

      public SpeechAnnotation withStartIndex(@Nullable Integer startIndex)
      Start of segment of the response that is attributed to this source.

      Index indicates the start of the segment, measured in bytes.

    • withStyle

      public SpeechAnnotation withStyle(@Nullable String style)
      Style instruction for the speech synthesis.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object