Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: chrome/common/extensions/docs/static/tts.html

Issue 7258007: Move the tts and ttsEngine APIs out of experimental, and give (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/static/tts.html
===================================================================
--- chrome/common/extensions/docs/static/tts.html (revision 92693)
+++ chrome/common/extensions/docs/static/tts.html (working copy)
@@ -1,8 +1,8 @@
<p id="classSummary">
-Use the <code>chrome.experimental.tts</code> module to play synthesized
+Use the <code>chrome.tts</code> module to play synthesized
text-to-speech (TTS) from your extension or packaged app.
See also the related
-<a href="experimental.ttsEngine.html">experimental.ttsEngine</a>
+<a href="ttsEngine.html">ttsEngine</a>
module, which allows an extension to implement a speech engine.
</p>
@@ -14,8 +14,9 @@
<h2 id="overview">Overview</h2>
-<p>To enable this experimental API, visit
-<b>chrome://flags</b> and enable <b>Experimental Extension APIs</b>.
+<p>You must declare the "tts" permission
+in your extension's manifest to use this API.
+</p>
<p>Chrome provides native support for speech on Windows (using SAPI
5), Mac OS X, and Chrome OS, using speech synthesis capabilities
@@ -28,21 +29,21 @@
<p>Call <code>speak()</code> from your extension or
packaged app to speak. For example:</p>
-<pre>chrome.experimental.tts.speak('Hello, world.');</pre>
+<pre>chrome.tts.speak('Hello, world.');</pre>
<p>To stop speaking immediately, just call <code>stop()</code>:
-<pre>chrome.experimental.tts.stop();</pre>
+<pre>chrome.tts.stop();</pre>
<p>You can provide options that control various properties of the speech,
such as its rate, pitch, and more. For example:</p>
-<pre>chrome.experimental.tts.speak('Hello, world.', {'rate': 2.0});</pre>
+<pre>chrome.tts.speak('Hello, world.', {'rate': 2.0});</pre>
<p>It's also a good idea to specify the language so that a synthesizer
supporting that language (and regional dialect, if applicable) is chosen.</p>
-<pre>chrome.experimental.tts.speak(
+<pre>chrome.tts.speak(
'Hello, world.', {'lang': 'en-US', 'rate': 2.0});</pre>
<p>By default, each call to <code>speak()</code> interrupts any
@@ -52,9 +53,9 @@
utterance to be added to a queue of utterances that will be spoken
when the current utterance has finished.</p>
-<pre>chrome.experimental.tts.speak(
+<pre>chrome.tts.speak(
'Speak this first.');
-chrome.experimental.tts.speak(
+chrome.tts.speak(
'Speak this next, when the first sentence is done.', {'enqueue': true});
</pre>
@@ -68,7 +69,7 @@
<a href="extension.html#property-lastError">chrome.extension.lastError</a>
to see if there were any errors.</p>
-<pre>chrome.experimental.tts.speak(
+<pre>chrome.tts.speak(
utterance,
options,
function() {
@@ -89,7 +90,7 @@
<p>To get more real-time information about the status of synthesized speech,
pass an event listener in the options to <code>speak()</code>, like this:</p>
-<pre>chrome.experimental.tts.speak(
+<pre>chrome.tts.speak(
utterance,
{
onEvent: function(event) {
@@ -151,7 +152,7 @@
<p>For example:</p>
-<pre>chrome.experimental.tts.speak(
+<pre>chrome.tts.speak(
'&lt;?xml version="1.0"?&gt;' +
'&lt;speak&gt;' +
' The &lt;emphasis&gt;second&lt;/emphasis&gt; ' +
@@ -177,7 +178,7 @@
a function that receives an array of <code>TtsVoice</code> objects as its
argument:</p>
-<pre>chrome.experimental.tts.getVoices(
+<pre>chrome.tts.getVoices(
function(voices) {
for (var i = 0; i < voices.length; i++) {
console.log('Voice ' + i + ':');
« no previous file with comments | « chrome/common/extensions/docs/static/manifest.html ('k') | chrome/common/extensions/docs/static/ttsEngine.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698