You are here: Home > Google Chrome Extensions & Plug-ins

Text-to-Speech API for Chrome extensions

October 31, 2011 06:17 PDT

Posted by Andrew.

Chrome now includes a Text-to-Speech (TTS) API that’s simple to use, powerful, and flexible for users. It provides native support for speech on Windows (using SAPI 5), Mac OS X, and Chrome OS, using speech synthesis capabilities provided by the operating system. On all platforms, the user can install extensions that register themselves as alternative speech engines.

If you are a Chrome developer, you can use the chrome.tts module to play synthesized text-to-speech from your extension or packaged app now. With the new API, you just need to add "tts" to your permissions and then write:

chrome.tts.speak("Hello, world!:);

It's also very easy to change the rate, pitch, and volume. Here's an example that speaks more slowly:

chrome.tts.speak("Can you understand me now?", {rate: 0.6});

A complete description of all options can be found in the speak() method documentation.

To stop speaking immediately, just call stop():


Text-to-Speech API for Chrome extensions

The examples of Chrome Text-to-Speech (TTS) API

Here are three examples you can try now:

  • TTS Demo (app) - Demo Chrome's synthesized text-to-speech capabilities.
  • Talking Alarm Clock (extension) - A clock with two configurable alarms that will play a sound and speak a phrase of your choice.
  • SpeakIt (extension) - Tired of reading? Select text you want to read and listen to it. SpeakIt converts text into speech so you no longer need to read.

Other resources about Text-to-Speech

#1  posted on November 02, 2011 09:19 PDT
That's great, but do you have any idea how to make it work in Google's Google Docs? I can edit a document with 50 fellow students, and we have a chat session, but we can't be looking at that and need it to do text to speech -and also not tell us when someone enters or leaves the document because that would be annoying.

#2  posted on November 29, 2011 22:22 PST
Super exicted to see more of this kind of stuff online.

Leave your comment
If you want to leave your comment on this article, simply fill out the next form:
Name: * Requirement
E-mail: Optional (won't be published)
Website / Blog: Optional
Are you a human? For anti spammer, please calculate following expression:
8 x 1 + 2 = * Requirement
* Requirement
You can use these tags:
[b] Text [/b]: Bold text
[quote] Text [/quote]: Quote text