Język

SpeechToTextClientExtensions.GetStreamingTextAsync Metoda

Definicja

Generuje tekst na podstawie mowy, zapewniając pojedynczą mowę DataContentdźwiękową .

public static System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate> GetStreamingTextAsync(this Microsoft.Extensions.AI.ISpeechToTextClient client, Microsoft.Extensions.AI.DataContent audioSpeechContent, Microsoft.Extensions.AI.SpeechToTextOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member GetStreamingTextAsync : Microsoft.Extensions.AI.ISpeechToTextClient * Microsoft.Extensions.AI.DataContent * Microsoft.Extensions.AI.SpeechToTextOptions * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<Microsoft.Extensions.AI.SpeechToTextResponseUpdate>
<Extension()>
Public Function GetStreamingTextAsync (client As ISpeechToTextClient, audioSpeechContent As DataContent, Optional options As SpeechToTextOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of SpeechToTextResponseUpdate)

Parametry

client
ISpeechToTextClient

Klient.

audioSpeechContent
DataContent

Zawartość mowy pojedynczej audio.

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

Tekst wygenerowany przez klienta.

Dotyczy