DelegatingTextToSpeechClient Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides an optional base class for an ITextToSpeechClient that passes through calls to another instance.
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
- Inheritance
-
DelegatingTextToSpeechClient
- Derived
- Attributes
- Implements
Remarks
This is recommended as a base type when building clients that can be chained in any order around an underlying ITextToSpeechClient. The default implementation simply passes each call to the inner client instance.
Constructors
| Name | Description |
|---|---|
| DelegatingTextToSpeechClient(ITextToSpeechClient) |
Initializes a new instance of the DelegatingTextToSpeechClient class. |
Properties
| Name | Description |
|---|---|
| InnerClient |
Gets the inner ITextToSpeechClient. |
Methods
| Name | Description |
|---|---|
| Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| Dispose(Boolean) |
Provides a mechanism for releasing unmanaged resources. |
| GetAudioAsync(String, TextToSpeechOptions, CancellationToken) |
Sends text content to the model and returns the generated audio speech. |
| GetService(Type, Object) |
Asks the ITextToSpeechClient for an object of the specified type |
| GetStreamingAudioAsync(String, TextToSpeechOptions, CancellationToken) |
Sends text content to the model and streams back the generated audio speech. |
Extension Methods
| Name | Description |
|---|---|
| AsBuilder(ITextToSpeechClient) |
Creates a new TextToSpeechClientBuilder using |
| GetService<TService>(ITextToSpeechClient, Object) |
Asks the ITextToSpeechClient for an object of type |