Class WordInfo

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

public abstract class WordInfo extends JsonSerializable
Information about a single recognized word.
  • Constructor Details

    • WordInfo

      public WordInfo()
  • Method Details

    • word

      public abstract Optional<String> word()
      Transcript of the word.
    • startOffset

      public abstract Optional<String> startOffset()
      Start offset in time of the word relative to the start of the audio.
    • endOffset

      public abstract Optional<String> endOffset()
      End offset in time of the word relative to the start of the audio.
    • builder

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

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

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