Returns this TTS's capabilities
Get the model name/identifier for this TTS instance.
The model name if available, "unknown" otherwise.
Plugins should override this property to provide their model information.
Returns the channel count of audio frames returned by this TTS
Get the provider name for this TTS instance.
The provider name if available, "unknown" otherwise.
Plugins should override this property to provide their provider information.
Returns the sample rate of audio frames returned by this TTS
Release idle pooled provider connections without closing the TTS.
The framework calls this once nothing uses the TTS any more: every activity and session that
uses an instance counts as a user, and the last one to close, or an Agent.updateOptions
that swaps the instance out, triggers the release. Those connections would otherwise sit idle
until the process exits.
Nothing in flight is interrupted: an in-flight synthesis keeps its connection, which then
closes when it finishes instead of rejoining the pool. The TTS stays usable and reconnects
on the next synthesis.
Providers without a connection pool need not override this.
Returns a SynthesizeStream that can be used to push text and receive audio data
Optional options: { Optional configuration including connection options
Optional connReceives text and returns synthesis in the form of a ChunkedStream
Optional connOptions: APIConnectOptionsOptional abortSignal: AbortSignal
An instance of a text-to-speech adapter.
Remarks
This class is abstract, and as such cannot be used directly. Instead, use a provider plugin that exports its own child TTS class, which inherits this class's methods.