DelegatingTextToSpeechClient class

A TextToSpeechClient that delegates all calls to an inner client.

Subclass this to build middleware that wraps specific methods while delegating others to the inner client.

This is an experimental feature.

Implemented types
Implementers
Annotations
  • @Source(name: 'DelegatingTextToSpeechClient.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Abstractions/TextToSpeech/')

Constructors

DelegatingTextToSpeechClient(TextToSpeechClient innerClient)
Creates a new DelegatingTextToSpeechClient wrapping innerClient.

Properties

hashCode int
The hash code for this object.
no setterinherited
innerClient TextToSpeechClient
The inner client to delegate to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
override
getAudio(String text, {TextToSpeechOptions? options, CancellationToken? cancellationToken}) Future<TextToSpeechResponse>
Synthesizes text into audio and returns the complete response.
override
getService<T>({Object? key}) → T?
Gets a service of the specified type.
override
getStreamingAudio(String text, {TextToSpeechOptions? options, CancellationToken? cancellationToken}) Stream<TextToSpeechResponseUpdate>
Synthesizes text into audio and returns a stream of response updates.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited