Skip to content

SpeechStreamPart

Namespace: Vercel.AI.Operations

public sealed class SpeechStreamPart

A part of FullStream.

Inheritance: object

View source

public byte[] Audio { get; set; }

Audio chunk in generation order. Chunks are not necessarily standalone files; concatenate them to reconstruct the audio. A chunk is empty only when it carries ProviderMetadata (for example a turn marker).

Value: byte[]

View source

public SpeechAudioFormat? AudioFormat { get; set; }

Format of an audio chunk.

Value: SpeechAudioFormat

View source

public Exception? Error { get; set; }

Provider error of an error part.

Value: Exception

View source

public string? Id { get; set; }

Provider identifier of an audio chunk.

Value: string

View source

public JsonElement? ProviderMetadata { get; set; }

Provider metadata of an audio chunk.

Value: JsonElement?

View source

public JsonElement? RawValue { get; set; }

Raw provider chunk of a raw part.

Value: JsonElement?

View source

public string Type { get; set; }

Part type: audio, raw, or error.

Value: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product