Class TranslationConfig
Config for stream translation.
public record TranslationConfig : IEquatable<TranslationConfig>
- Inheritance
-
TranslationConfig
- Implements
- Inherited Members
Properties
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.
[JsonPropertyName("echoTargetLanguage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? EchoTargetLanguage { get; set; }
Property Value
- bool?
TargetLanguageCode
The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr").
[JsonPropertyName("targetLanguageCode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TargetLanguageCode { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a TranslationConfig object.
public static TranslationConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- TranslationConfig
The deserialized TranslationConfig object, or null if deserialization fails.