Table of Contents

Class LanguageHints

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Provides hints to the model about possible languages present in the audio.

public record LanguageHints : IEquatable<LanguageHints>
Inheritance
LanguageHints
Implements
Inherited Members

Properties

LanguageCodes

BCP-47 language codes. At least one must be specified.

[JsonPropertyName("languageCodes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? LanguageCodes { get; set; }

Property Value

List<string>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a LanguageHints object.

public static LanguageHints? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

LanguageHints

The deserialized LanguageHints object, or null if deserialization fails.