SpeechToTextResponseUpdateExtensions.ToSpeechToTextResponseAsync Method

Definition

Combines SpeechToTextResponseUpdate instances into a single SpeechToTextResponse.

public static System.Threading.Tasks.Task<Microsoft.Extensions.AI.SpeechToTextResponse> ToSpeechToTextResponseAsync(this System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate> updates, System.Threading.CancellationToken cancellationToken = default);
static member ToSpeechToTextResponseAsync : System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.SpeechToTextResponse>
<Extension()>
Public Function ToSpeechToTextResponseAsync (updates As IAsyncEnumerable(Of SpeechToTextResponseUpdate), Optional cancellationToken As CancellationToken = Nothing) As Task(Of SpeechToTextResponse)

Parameters

updates
IAsyncEnumerable<SpeechToTextResponseUpdate>

The updates to be combined.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

The combined SpeechToTextResponse.

Applies to