Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <table class="intro"> | |
| 2 <tr> | |
| 3 <th scope="col"></th> | |
| 4 <th scope="col"></th> | |
| 5 </tr> | |
| 6 <tr> | |
| 7 <td><strong>Description:</strong></td> | |
| 8 <td>Use the <code>chrome.tts</code> module to play synthesized | |
| 9 text-to-speech (TTS). | |
| 10 See also the related | |
| 11 <a href="http://developer.chrome.com/extensions/ttsEngine.html">ttsEngine</a > | |
| 12 module, which allows an extension to implement a speech engine.</td> | |
|
saroop
2012/12/21 00:39:44
extenstion or an app ?
| |
| 13 </tr> | |
| 14 <tr> | |
| 15 <td><strong>Availability:</strong></td> | |
| 16 <td>Google Chrome 14</td> | |
| 17 </tr> | |
| 18 <tr> | |
| 19 <td><strong>Permissions:</strong></td> | |
| 20 <td><code>"tts"</code></td> | |
| 21 </tr> | |
| 22 <tr> | |
| 23 <td><strong>Learn more:</strong></td> | |
| 24 <td><a href="https://developers.google.com/live/shows/7320022-7001/">Chrome Office Hours: Text to Speech API</a></td> | |
| 25 </tr> | |
| 26 </table> | |
| 27 | |
| 1 <p id="classSummary"> | 28 <p id="classSummary"> |
| 2 Use the <code>chrome.tts</code> module to play synthesized | 29 |
| 3 text-to-speech (TTS). | |
| 4 See also the related | |
| 5 <a href="ttsEngine.html">ttsEngine</a> | |
| 6 module, which allows an extension to implement a speech engine. | |
| 7 </p> | 30 </p> |
| 8 | 31 |
| 9 | 32 |
| 10 <h2 id="overview">Overview</h2> | 33 <h2 id="overview">Overview</h2> |
| 11 | 34 |
| 12 <p>You must declare the "tts" permission | |
| 13 in your extension's manifest to use this API. | |
| 14 </p> | |
| 15 | |
| 16 <p>Chrome provides native support for speech on Windows (using SAPI | 35 <p>Chrome provides native support for speech on Windows (using SAPI |
| 17 5), Mac OS X, and Chrome OS, using speech synthesis capabilities | 36 5), Mac OS X, and Chrome OS, using speech synthesis capabilities |
| 18 provided by the operating system. On all platforms, the user can | 37 provided by the operating system. On all platforms, the user can |
| 19 install extensions that register themselves as alternative speech | 38 install extensions that register themselves as alternative speech |
| 20 engines.</p> | 39 engines.</p> |
| 21 | 40 |
| 22 <h2 id="generating_speech">Generating speech</h2> | 41 <h2 id="generating_speech">Generating speech</h2> |
| 23 | 42 |
| 24 <p>Call <code>speak()</code> from your extension or | 43 <p>Call <code>speak()</code> from your extension or |
| 25 packaged app to speak. For example:</p> | 44 packaged app to speak. For example:</p> |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 function(voices) { | 196 function(voices) { |
| 178 for (var i = 0; i < voices.length; i++) { | 197 for (var i = 0; i < voices.length; i++) { |
| 179 console.log('Voice ' + i + ':'); | 198 console.log('Voice ' + i + ':'); |
| 180 console.log(' name: ' + voices[i].voiceName); | 199 console.log(' name: ' + voices[i].voiceName); |
| 181 console.log(' lang: ' + voices[i].lang); | 200 console.log(' lang: ' + voices[i].lang); |
| 182 console.log(' gender: ' + voices[i].gender); | 201 console.log(' gender: ' + voices[i].gender); |
| 183 console.log(' extension id: ' + voices[i].extensionId); | 202 console.log(' extension id: ' + voices[i].extensionId); |
| 184 console.log(' event types: ' + voices[i].eventTypes); | 203 console.log(' event types: ' + voices[i].eventTypes); |
| 185 } | 204 } |
| 186 });</pre> | 205 });</pre> |
| OLD | NEW |