Google has
implemented Text-to-Speech APIs in the browser, so now any application or Chrome extension is able to read text aloud. Synthesis of speech from the expansion is carried out by an elementary command
chrome.tts.speak('Hello, world!');
(you first need to add tts to the list of permissions for this extension).
Using the
chrome.ttsEngine module,
you can bolt your own speech synthesis engine to the browser, for example, for the Russian language.
The speech synthesis engine connected to Chrome is allowed to use any web technology to play sound, including HTML5 Audio, Web Audio API or Native Client. Allowed and even encouraged to install in the browser of different engines (voices).
')
The interface supports parameters for volume (volume), speech speed (rate) and pitch (pitch).
chrome.tts.speak('Can you understand me now?', {rate: 0.6});
The extension can even synchronize the actions on the screen with the words that the speech synthesis program utters, because the TTS API allows you to receive feedback after each spoken word.
TTS API documentationSee
talking clock ,
reading selected text in the browser and
other examples .