Del via


TextToSpeechResponseUpdateExtensions.ToTextToSpeechResponseAsync Method

Definition

Combines TextToSpeechResponseUpdate instances into a single TextToSpeechResponse.

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

Parameters

updates
IAsyncEnumerable<TextToSpeechResponseUpdate>

The updates to be combined.

cancellationToken
CancellationToken

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

Returns

The combined TextToSpeechResponse.

Applies to