CloudTtsOptions

Options & Configuration · AiDotNet.TextToSpeech.ProprietaryAPI

Options every hosted text-to-speech client shares: credentials, the endpoint, the voice, the requested sample rate, retries and the time limit of a request.

Known derived types: AmazonPollyOptions, AzureNeuralTTSOptions, ElevenLabsTTSOptions, GoogleCloudTTSOptions, MurfOptions, NVIDIARivaTTSOptions, WellSaidLabsOptions

For Beginners

A hosted voice service synthesizes speech on its own servers; these options say which account (API key), which server (endpoint), which voice and what audio format to ask for.

Properties

Property Summary
double TimeoutSeconds { get; set; } Gets or sets the time limit of one request, in seconds.
int InitialRetryDelayMs { get; set; } Gets or sets the first retry delay in milliseconds (doubled per retry unless the service sends Retry-After).
int MaxRetries { get; set; } Gets or sets the retries after a rate limit (429) or a server error (5xx).
int MaxTextLength { get; set; } Gets or sets the longest text the service accepts in one request.
int SampleRate { get; set; } Gets or sets the sample rate to request, in Hz.
string ApiEndpoint { get; set; } Gets or sets the service’s base URL; empty uses the service’s public endpoint.
string ApiKey { get; set; } Gets or sets the service’s API key.
string VoiceId { get; set; } Gets or sets the voice to synthesize with (the service’s identifier).