語言

DelegatingTextToSpeechClient 類別

定義

提供一個可選的基底類別, ITextToSpeechClient 該類別能將呼叫傳遞給另一個實例。

public ref class DelegatingTextToSpeechClient : IDisposable, Microsoft::Extensions::AI::ITextToSpeechClient
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class DelegatingTextToSpeechClient : IDisposable, Microsoft.Extensions.AI.ITextToSpeechClient
public class DelegatingTextToSpeechClient : IDisposable, Microsoft.Extensions.AI.ITextToSpeechClient
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type DelegatingTextToSpeechClient = class
    interface ITextToSpeechClient
    interface IDisposable
type DelegatingTextToSpeechClient = class
    interface ITextToSpeechClient
    interface IDisposable
Public Class DelegatingTextToSpeechClient
Implements IDisposable, ITextToSpeechClient
繼承
DelegatingTextToSpeechClient
衍生
屬性
實作

備註

此類型建議作為基礎類型,用於建立可依任何順序串連的客戶 ITextToSpeechClient端。 預設實作會將每次呼叫傳遞給內部客戶端實例。

建構函式

名稱 Description
DelegatingTextToSpeechClient(ITextToSpeechClient)

初始化 DelegatingTextToSpeechClient 類別的新執行個體。

屬性

名稱 Description
InnerClient

得到內層 ITextToSpeechClient。

方法

名稱 Description
Dispose()

執行與釋放、釋放或重設非受控資源相關聯的應用程式定義工作。

Dispose(Boolean)

提供釋放 Unmanaged 資源的機制。

GetAudioAsync(String, TextToSpeechOptions, CancellationToken)

將文字內容傳送給模型並回傳產生的語音。

GetService(Type, Object)

請求 給 ITextToSpeechClient 指定類型的 serviceType物件。

GetStreamingAudioAsync(String, TextToSpeechOptions, CancellationToken)

將文字內容傳送給模型,並將生成的語音串流回傳。

擴充方法

名稱 Description
AsBuilder(ITextToSpeechClient)

創造一個新的 TextToSpeechClientBuilder 使用 innerClient ,作為其內在客戶。

GetService<TService>(ITextToSpeechClient, Object)

請求 一個 ITextToSpeechClient 類型的 TService物件。

適用於