TextToSpeechClientBuilder class
Builds a pipeline of text-to-speech client middleware.
The pipeline is composed by calling use one or more times, then build to produce the final TextToSpeechClient. Middleware factories are applied in reverse order so that the first use call produces the outermost wrapper.
This is an experimental feature.
- Available extensions
- Annotations
-
- @Source(name: 'TextToSpeechClientBuilder.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI/TextToSpeech/')
Constructors
- TextToSpeechClientBuilder(TextToSpeechClient innerClient)
-
Creates a new TextToSpeechClientBuilder wrapping
innerClient. - TextToSpeechClientBuilder.fromFactory(InnerTextToSpeechClientFactory innerFactory)
-
Creates a new TextToSpeechClientBuilder from a factory function.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
[ServiceProvider? services]) → TextToSpeechClient - Builds the pipeline and returns the outermost TextToSpeechClient.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
use(
TextToSpeechClient factory(TextToSpeechClient)) → TextToSpeechClientBuilder - Adds a middleware factory to the pipeline.
-
useConfigureOptions(
void configure(TextToSpeechOptions options)) → TextToSpeechClientBuilder -
Available on TextToSpeechClientBuilder, provided by the ConfigureOptionsTextToSpeechClientBuilderExtensions extension
Adds a callback that configures the TextToSpeechOptions passed to each request. -
useLogging(
{String? loggerName}) → TextToSpeechClientBuilder -
Available on TextToSpeechClientBuilder, provided by the LoggingTextToSpeechClientBuilderExtensions extension
Adds logging around text-to-speech operations. -
useOpenTelemetry(
{String? modelId, String? system}) → TextToSpeechClientBuilder -
Available on TextToSpeechClientBuilder, provided by the OpenTelemetryTextToSpeechClientBuilderExtensions extension
Adds an OpenTelemetryTextToSpeechClient to the pipeline. -
useWithServices(
TextToSpeechClient factory(TextToSpeechClient inner, ServiceProvider services)) → TextToSpeechClientBuilder - Adds a middleware factory that also receives the active ServiceProvider.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited