Class TranslationConfig

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

public abstract class TranslationConfig extends JsonSerializable
Config for stream translation.
  • Constructor Details

    • TranslationConfig

      public TranslationConfig()
  • Method Details

    • echoTargetLanguage

      public abstract Optional<Boolean> echoTargetLanguage()
      If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language.
    • targetLanguageCode

      public abstract Optional<String> targetLanguageCode()
      The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr").
    • builder

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

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

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