Del via


DelegatingTextToSpeechClient.GetStreamingAudioAsync Method

Definition

Sends text content to the model and streams back the generated audio speech.

public virtual System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.TextToSpeechResponseUpdate> GetStreamingAudioAsync(string text, Microsoft.Extensions.AI.TextToSpeechOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetStreamingAudioAsync : string * Microsoft.Extensions.AI.TextToSpeechOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.TextToSpeechResponseUpdate>
override this.GetStreamingAudioAsync : string * Microsoft.Extensions.AI.TextToSpeechOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.TextToSpeechResponseUpdate>
Public Overridable Function GetStreamingAudioAsync (text As String, Optional options As TextToSpeechOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TextToSpeechResponseUpdate)

Parameters

text
String

The text to synthesize into speech.

options
TextToSpeechOptions

The text to speech options to configure the request.

cancellationToken
CancellationToken

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

Returns

The audio speech updates representing the streamed output.

Implements

Applies to