ISpeechToTextClient 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表語音轉文字的客戶端。
public interface class ISpeechToTextClient : IDisposable
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public interface ISpeechToTextClient : IDisposable
public interface ISpeechToTextClient : IDisposable
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type ISpeechToTextClient = interface
interface IDisposable
type ISpeechToTextClient = interface
interface IDisposable
Public Interface ISpeechToTextClient
Implements IDisposable
- 衍生
- 屬性
- 實作
備註
除非另有說明,所有成員 ISpeechToTextClient 皆為執行緒安全,可同時使用。 預期所有支援實作 ISpeechToTextClient 同時被多個請求使用。
然而,的ISpeechToTextClient實作可能會改變所提供的參數,GetTextAsync(Stream, SpeechToTextOptions, CancellationToken)GetStreamingTextAsync(Stream, SpeechToTextOptions, CancellationToken)例如配置選項實例。 因此,介面使用者應避免使用這些參數的共享實例進行並行調用,或應透過設計確保不會 ISpeechToTextClient 使用可能使用此類變異的實例。 例如,ConfigureOptions 方法應提供一個回調,可能會改變所提供的選項參數,若使用單例選項實例,應避免此操作。 傳送到這些方法的語音串流不會被實作關閉或處理。
方法
| 名稱 | Description |
|---|---|
| Dispose() |
執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。 (繼承來源 IDisposable) |
| GetService(Type, Object) |
請求 給 ISpeechToTextClient 指定類型的 |
| GetStreamingTextAsync(Stream, SpeechToTextOptions, CancellationToken) |
將語音內容傳送給模型,並回傳產生的文字。 |
| GetTextAsync(Stream, SpeechToTextOptions, CancellationToken) |
將語音內容傳送給模型並回傳產生的文字。 |
擴充方法
| 名稱 | Description |
|---|---|
| AsBuilder(ISpeechToTextClient) |
創造一個新的 SpeechToTextClientBuilder 使用 |
| GetService<TService>(ISpeechToTextClient, Object) |
請求 一個 ISpeechToTextClient 類型的 |
| GetStreamingTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken) |
從語音產生文字,提供單一語音語音 DataContent。 |
| GetTextAsync(ISpeechToTextClient, DataContent, SpeechToTextOptions, CancellationToken) |
從語音產生文字,提供單一語音語音 DataContent。 |