Table of Contents

Class VoiceAudioData

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Inline audio data.

public sealed class VoiceAudioData
Inheritance
VoiceAudioData
Inherited Members
Extension Methods

Properties

Data

Required. The base64-encoded audio bytes.

[JsonPropertyName("data")]
public string? Data { get; set; }

Property Value

string

MimeType

Required. The MIME type of the audio (e.g. audio/wav).

[JsonPropertyName("mime_type")]
public string? MimeType { get; set; }

Property Value

string

Methods

FromBytes(byte[], string)

Creates audio data from raw bytes.

public static VoiceAudioData FromBytes(byte[] bytes, string mimeType)

Parameters

bytes byte[]

The audio bytes.

mimeType string

The MIME type.

Returns

VoiceAudioData

The audio data.