Table of Contents

Class Transcription

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

Audio transcription in Server Content.

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

Properties

Finished

Optional. The bool indicates the end of the transcription.

[JsonPropertyName("finished")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? Finished { get; set; }

Property Value

bool?

LanguageCode

The BCP-47 language code of the transcription.

[JsonPropertyName("languageCode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? LanguageCode { get; set; }

Property Value

string

Text

Optional. Transcription text.

[JsonPropertyName("text")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Text { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a Transcription object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

Transcription

The deserialized Transcription object, or null if deserialization fails.