TextToSpeechClient class abstract

Represents a text-to-speech client.

Implementations must be thread-safe for concurrent use. Consumers should not share TextToSpeechOptions instances across concurrent calls, as implementations may mutate the options.

This is an experimental feature.

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

Constructors

TextToSpeechClient()

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

dispose() → void
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
inherited
getAudio(String text, {TextToSpeechOptions? options, CancellationToken? cancellationToken}) Future<TextToSpeechResponse>
Synthesizes text into audio and returns the complete response.
getService<T>({Object? key}) → T?
Gets a service of the specified type.
getStreamingAudio(String text, {TextToSpeechOptions? options, CancellationToken? cancellationToken}) Stream<TextToSpeechResponseUpdate>
Synthesizes text into audio and returns a stream of response updates.
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