Share via


ISpeechToTextClient.GetStreamingTextAsync Method

Definition

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

public System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate> GetStreamingTextAsync(System.IO.Stream audioSpeechStream, Microsoft.Extensions.AI.SpeechToTextOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetStreamingTextAsync : System.IO.Stream * Microsoft.Extensions.AI.SpeechToTextOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate>
Public Function GetStreamingTextAsync (audioSpeechStream As Stream, Optional options As SpeechToTextOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of SpeechToTextResponseUpdate)

Parameters

audioSpeechStream
Stream

The audio speech stream to send.

options
SpeechToTextOptions

The speech to text options to configure the request.

cancellationToken
CancellationToken

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

Returns

The text updates representing the streamed output.

Applies to