TextToSpeech Docs

Include the JavaScript file after <head> Tag:

<script id="tautant-tts" src="https://tautant.com/api/1/1.0.0a/textToSpeech.js?key=YOUR_API_KEY"></script>

Now you can call speak() function:

tautantTextToSpeech.speak("Hello, world!");

You can also send options, like voice, pitch, rate and gender:

tautantTextToSpeech.speak("Hello, how are you?", {voice: "en-US", pitch: 1, rate: 0.8, gender: "female"});

You can stop speech:

tautantTextToSpeech.cancel();

Or pause:

tautantTextToSpeech.pause();

And then resume:

tautantTextToSpeech.resume();

voice option contains one of the BCP 47 languages:

de-DE German Germany
en-US English United States
en-GB English United Kingdom
es-ES Spanish Spain
fr-FR French France
hi-IN Hindi India
id-ID Indonesian Indonesia
it-IT Italian Italy
ja-JP Japanese Japan
ko-KR Korean Republic of Korea
nl-NL Dutch Netherlands
pl-PL Polish Poland
pt-BR Portuguese Brazil
ru-RU Russian Russian Federation
zh-CN Chinese China
zh-HK Chinese Hong Kong
zh-TW Chinese Taiwan