Class AudioTranscriptionConfig

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

public abstract class AudioTranscriptionConfig extends JsonSerializable
The audio transcription configuration in Setup.
  • Constructor Details

    • AudioTranscriptionConfig

      public AudioTranscriptionConfig()
  • Method Details

    • languageCodes

      public abstract Optional<List<String>> languageCodes()
      BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection.
    • languageAuto

      public abstract Optional<LanguageAuto> languageAuto()
      Deprecated: Auto-detection is now the default when language_codes is omitted. This field will be removed in a future version.
    • languageHints

      public abstract Optional<LanguageHints> languageHints()
      Deprecated: Use top-level language_codes instead. This field will be removed in a future version.
    • customVocabulary

      public abstract Optional<List<String>> customVocabulary()
      A list of custom vocabulary phrases, which biases the ASR model to improve recognition of these specific terms.
    • adaptationPhrases

      public abstract Optional<List<String>> adaptationPhrases()
      Deprecated. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms.
    • diarization

      public abstract Optional<Boolean> diarization()
      Configures speaker diarization.
    • wordTimestamp

      public abstract Optional<Boolean> wordTimestamp()
      Configures word-level timestamp generation.
    • mode

      public abstract Optional<AudioTranscriptionConfigMode> mode()
      Optional. Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If unspecified, defaults to `VERBATIM` transcription. In `SMART` mode, the model performs disfluency removal (eliminating filler words, repetitions, and false starts), light grammatical cleanup, automatic formatting (paragraphs, bullet points, numbered lists), and minor user edits (inline self-corrections). Timestamps and diarization are incompatible with mode `SMART`.
    • builder

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

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

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