Język

ISpeechToTextClient.GetStreamingTextAsync Metoda

Definicja

Wysyła zawartość mowy audio do modelu i przesyła strumieniowo wygenerowany tekst.

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)

Parametry

audioSpeechStream
Stream

Strumień mowy audio do wysłania.

options
SpeechToTextOptions

Opcje zamiany mowy na tekst w celu skonfigurowania żądania.

cancellationToken
CancellationToken

Element CancellationToken do monitorowania żądań anulowania. Wartość domyślna to None.

Zwraca

Aktualizacje tekstowe reprezentujące przesyłane strumieniowo dane wyjściowe.

Dotyczy