Skip to content

StreamSpeechResult

Namespace: Vercel.AI.Operations

public sealed class StreamSpeechResult

Result of CancellationToken). Maps to StreamSpeechResult.

Inheritance: object

View source

public OperationFullStream<byte[]> AudioStream { get; }

Stream of audio bytes in generation order. AudioStream and FullStream share one live stream: only one of them can be accessed, and only once. Access it before any result promise.

Value: OperationFullStream&lt;byte\[\]&gt;

View source

public OperationFullStream<SpeechStreamPart> FullStream { get; }

Full stream of speech parts (audio, raw, and error parts). AudioStream and FullStream share one live stream: only one of them can be accessed, and only once. Access it before any result promise.

Value: OperationFullStream&lt;SpeechStreamPart&gt;

View source

public Task<JsonElement> ProviderMetadata { get; }

Additional provider-specific metadata. Accessing it claims the stream.

Value: Task<JsonElement>

View source

public Task<IReadOnlyList<ProviderResponse>> Responses { get; }

Response metadata. Accessing it claims the stream.

Value: Task<IReadOnlyList<ProviderResponse>>

View source

public Task<SpeechStreamUsage> Usage { get; }

Usage reported for the call, if available. Accessing it claims the stream.

Value: Task<SpeechStreamUsage>

View source

public Task<IReadOnlyList<OperationWarning>> Warnings { get; }

Warnings for the call, such as unsupported settings. Accessing it claims the stream.

Value: Task<IReadOnlyList<OperationWarning>>

View source

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