LoggingTextToSpeechClient 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個將文字轉語音的用戶端委派給 ILogger。
public ref class LoggingTextToSpeechClient : Microsoft::Extensions::AI::DelegatingTextToSpeechClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
public class LoggingTextToSpeechClient : Microsoft.Extensions.AI.DelegatingTextToSpeechClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type LoggingTextToSpeechClient = class
inherit DelegatingTextToSpeechClient
type LoggingTextToSpeechClient = class
inherit DelegatingTextToSpeechClient
Public Class LoggingTextToSpeechClient
Inherits DelegatingTextToSpeechClient
- 繼承
- 屬性
備註
所提供的實作 ITextToSpeechClient 對並行使用是執行緒安全的,只要所用的執行 ILogger 緒同時也是執行緒安全的。
當被雇用者啟用ILoggerTrace時,訊息和選項的內容會被記錄下來。 這些訊息和選項可能包含敏感的應用程式資料。 Trace 預設為停用,且在生產環境中絕不應啟用。 訊息和選項不會在其他日誌層級被記錄。
建構函式
| 名稱 | Description |
|---|---|
| LoggingTextToSpeechClient(ITextToSpeechClient, ILogger) |
初始化 LoggingTextToSpeechClient 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| InnerClient |
得到內層 ITextToSpeechClient。 (繼承來源 DelegatingTextToSpeechClient) |
| JsonSerializerOptions |
取得或設定 JSON 序列化選項,用於序列化日誌資料。 |
方法
| 名稱 | Description |
|---|---|
| Dispose() |
執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。 (繼承來源 DelegatingTextToSpeechClient) |
| Dispose(Boolean) |
提供釋放 Unmanaged 資源的機制。 (繼承來源 DelegatingTextToSpeechClient) |
| GetAudioAsync(String, TextToSpeechOptions, CancellationToken) |
將文字內容傳送給模型並回傳產生的語音。 |
| GetService(Type, Object) |
請求 給 ITextToSpeechClient 指定類型的 |
| GetStreamingAudioAsync(String, TextToSpeechOptions, CancellationToken) |
將文字內容傳送給模型,並將生成的語音串流回傳。 |
擴充方法
| 名稱 | Description |
|---|---|
| AsBuilder(ITextToSpeechClient) |
創造一個新的 TextToSpeechClientBuilder 使用 |
| GetService<TService>(ITextToSpeechClient, Object) |
請求 一個 ITextToSpeechClient 類型的 |