GoogleCloudTTS<T>

Models & Types · AiDotNet.TextToSpeech.ProprietaryAPI

A client of the Google Cloud Text-to-Speech API.

Inheritance: CloudTtsClientBase<T> → GoogleCloudTTS<T>

For Beginners

new GoogleCloudTTS<float>(new GoogleCloudTTSOptions { ApiKey = "…" }).Synthesize("Hello") returns the spoken audio.

How It Works

Sends POST https://texttospeech.googleapis.com/v1/text:synthesize with { input: { text | ssml }, voice: { languageCode, name }, audioConfig: { audioEncoding: "LINEAR16", sampleRateHertz } }; the response’s audioContent is a base64 WAV file (LINEAR16 includes the header).

Constructors

Constructor Summary
GoogleCloudTTS(GoogleCloudTTSOptions options, HttpClient httpClient) Creates the client; a supplied HttpClient is used as is and not disposed.

Properties

Property Summary
string ProviderName { get; }