AzureNeuralTTS<T>
Models & Types · AiDotNet.TextToSpeech.ProprietaryAPI
A client of the Azure AI Speech text-to-speech REST API.
Inheritance: CloudTtsClientBase<T> → AzureNeuralTTS<T>
For Beginners
new AzureNeuralTTS<float>(new AzureNeuralTTSOptions { ApiKey = "…", Region = "westeurope" }) .Synthesize("Hello") returns the spoken audio.
How It Works
Sends POST https://{region}.tts.speech.microsoft.com/cognitiveservices/v1 with the SSML
<speak version='1.0' xml:lang='…'><voice name='…'>text</voice></speak>, the headers
Ocp-Apim-Subscription-Key (or Authorization: Bearer), X-Microsoft-OutputFormat: raw-{rate}-16bit-mono-pcm and User-Agent; the response is signed 16-bit little-endian mono PCM.
Constructors
| Constructor | Summary |
|---|---|
AzureNeuralTTS(AzureNeuralTTSOptions options, HttpClient httpClient) |
Creates the client; a supplied HttpClient is used as is and not disposed. |
Properties
| Property | Summary |
|---|---|
string ProviderName { get; } |