Class Transcription.Builder

java.lang.Object
com.google.genai.types.Transcription.Builder
Enclosing class:
Transcription

public abstract static class Transcription.Builder extends Object
Builder for Transcription.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • text

      public abstract Transcription.Builder text(String text)
      Setter for text.

      text: Optional. Transcription text.

    • clearText

      @CanIgnoreReturnValue public Transcription.Builder clearText()
      Clears the value of text field.
    • finished

      public abstract Transcription.Builder finished(boolean finished)
      Setter for finished.

      finished: Optional. The bool indicates the end of the transcription.

    • clearFinished

      @CanIgnoreReturnValue public Transcription.Builder clearFinished()
      Clears the value of finished field.
    • languageCode

      public abstract Transcription.Builder languageCode(String languageCode)
      Setter for languageCode.

      languageCode: The BCP-47 language code of the transcription.

    • clearLanguageCode

      @CanIgnoreReturnValue public Transcription.Builder clearLanguageCode()
      Clears the value of languageCode field.
    • speakerLabel

      public abstract Transcription.Builder speakerLabel(String speakerLabel)
      Setter for speakerLabel.

      speakerLabel: A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2").

    • clearSpeakerLabel

      @CanIgnoreReturnValue public Transcription.Builder clearSpeakerLabel()
      Clears the value of speakerLabel field.
    • words

      public abstract Transcription.Builder words(List<WordInfo> words)
      Setter for words.

      words: Detailed word-level transcriptions and timing details.

    • words

      @CanIgnoreReturnValue public Transcription.Builder words(WordInfo... words)
      Setter for words.

      words: Detailed word-level transcriptions and timing details.

    • words

      @CanIgnoreReturnValue public Transcription.Builder words(WordInfo.Builder... wordsBuilders)
      Setter for words builder.

      words: Detailed word-level transcriptions and timing details.

    • clearWords

      @CanIgnoreReturnValue public Transcription.Builder clearWords()
      Clears the value of words field.
    • build

      public abstract Transcription build()