Skip to content

SpeechModelStreamPart

Namespace: Vercel.AI.Operations

public sealed class SpeechModelStreamPart

A part emitted by a streaming speech model. Maps to SpeechModelV4StreamPart.

Inheritance: object

View source

public byte[]? Audio { get; set; }

Raw audio bytes of an audio chunk.

Value: byte[]

View source

public string? AudioBase64 { get; set; }

Base64-encoded raw audio bytes of an audio chunk. Used when Audio is null.

Value: string

View source

public SpeechAudioFormat? AudioFormat { get; set; }

Format of an audio chunk.

Value: SpeechAudioFormat

View source

public JsonElement? Body { get; set; }

Response body of a response-metadata part.

Value: JsonElement?

View source

public Exception? Error { get; set; }

Non-fatal error of an error part. The stream continues.

Value: Exception

View source

public IReadOnlyDictionary<string, string>? Headers { get; set; }

Response headers of a response-metadata part.

Value: IReadOnlyDictionary<string, string>

View source

public string? Id { get; set; }

Optional provider identifier for an audio chunk.

Value: string

View source

public string? ModelId { get; set; }

Response model id of a response-metadata part.

Value: string

View source

public JsonElement? ProviderMetadata { get; set; }

Provider metadata of an audio or finish part.

Value: JsonElement?

View source

public JsonElement? RawValue { get; set; }

Raw provider chunk of a raw part.

Value: JsonElement?

View source

public DateTime? Timestamp { get; set; }

Response timestamp of a response-metadata part.

Value: DateTime?

View source

public string Type { get; set; }

Part type: stream-start, audio, response-metadata, finish, raw, or error.

Value: string

View source

public SpeechStreamUsage? Usage { get; set; }

Usage of a finish part.

Value: SpeechStreamUsage

View source

public IReadOnlyList<OperationWarning>? Warnings { get; set; }

Warnings carried by stream-start.

Value: IReadOnlyList<OperationWarning>

View source

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