Package com.google.genai.types
Class TranslationConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.TranslationConfig
Config for stream translation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for TranslationConfig. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TranslationConfig.Builderbuilder()Instantiates a builder for TranslationConfig.If true, the model will generate audio when the target language is spoken, essentially it will parrot the input.static TranslationConfigDeserializes a JSON string to a TranslationConfig object.The target language for translation.abstract TranslationConfig.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
TranslationConfig
public TranslationConfig()
-
-
Method Details
-
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
The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). -
builder
Instantiates a builder for TranslationConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a TranslationConfig object.
-