| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | |
| 2 1) The <head> information in this page is significant, should be uniform | |
| 3 across api docs and should be edited only with knowledge of the | |
| 4 templating mechanism. | |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | |
| 6 browser, it will be re-generated from the template, json schema and | |
| 7 authored overview content. | |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | |
| 9 page may easily be indexed by search engines. | |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | |
| 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> | |
| 15 </script> | |
| 16 <script type="text/javascript" src="js/api_page_generator.js"></script> | |
| 17 <script type="text/javascript" src="js/bootstrap.js"></script> | |
| 18 <script type="text/javascript" src="js/sidebar.js"></script> | |
| 19 <title>chrome.experimental.ttsEngine - Google Chrome Extensions - Google Code<
/title></head> | |
| 20 <body> <div id="gc-container" class="labs"> | |
| 21 <div id="devModeWarning"> | |
| 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. | |
| 23 </div> | |
| 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | |
| 25 <!-- In particular, sub-templates that recurse, must be used by allowing | |
| 26 jstemplate to make a copy of the template in this section which | |
| 27 are not operated on by way of the jsskip="true" --> | |
| 28 <div style="display:none"> | |
| 29 | |
| 30 <!-- VALUE --> | |
| 31 <div id="valueTemplate"> | |
| 32 <dt> | |
| 33 <var>paramName</var> | |
| 34 <em> | |
| 35 | |
| 36 <!-- TYPE --> | |
| 37 <div style="display:inline"> | |
| 38 ( | |
| 39 <span class="optional">optional</span> | |
| 40 <span class="enum">enumerated</span> | |
| 41 <span id="typeTemplate"> | |
| 42 <span> | |
| 43 <a> Type</a> | |
| 44 </span> | |
| 45 <span> | |
| 46 <span> | |
| 47 array of <span><span></span></span> | |
| 48 </span> | |
| 49 <span>paramType</span> | |
| 50 <span></span> | |
| 51 </span> | |
| 52 </span> | |
| 53 ) | |
| 54 </div> | |
| 55 | |
| 56 </em> | |
| 57 </dt> | |
| 58 <dd class="todo"> | |
| 59 Undocumented. | |
| 60 </dd> | |
| 61 <dd> | |
| 62 Description of this parameter from the json schema. | |
| 63 </dd> | |
| 64 <dd> | |
| 65 This parameter was added in version | |
| 66 <b><span></span></b>. | |
| 67 You must omit this parameter in earlier versions, | |
| 68 and you may omit it in any version. If you require this | |
| 69 parameter, the manifest key | |
| 70 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 71 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 72 </dd> | |
| 73 | |
| 74 <!-- OBJECT PROPERTIES --> | |
| 75 <dd> | |
| 76 <dl> | |
| 77 <div> | |
| 78 <div> | |
| 79 </div> | |
| 80 </div> | |
| 81 </dl> | |
| 82 </dd> | |
| 83 | |
| 84 <!-- OBJECT METHODS --> | |
| 85 <dd> | |
| 86 <div></div> | |
| 87 </dd> | |
| 88 | |
| 89 <!-- OBJECT EVENT FIELDS --> | |
| 90 <dd> | |
| 91 <div></div> | |
| 92 </dd> | |
| 93 | |
| 94 <!-- FUNCTION PARAMETERS --> | |
| 95 <dd> | |
| 96 <div></div> | |
| 97 </dd> | |
| 98 | |
| 99 </div> <!-- /VALUE --> | |
| 100 | |
| 101 <div id="functionParametersTemplate"> | |
| 102 <h5>Parameters</h5> | |
| 103 <dl> | |
| 104 <div> | |
| 105 <div> | |
| 106 </div> | |
| 107 </div> | |
| 108 </dl> | |
| 109 </div> | |
| 110 </div> <!-- /SUBTEMPLATES --> | |
| 111 | |
| 112 <a id="top"></a> | |
| 113 <div id="skipto"> | |
| 114 <a href="#gc-pagecontent">Skip to page content</a> | |
| 115 <a href="#gc-toc">Skip to main navigation</a> | |
| 116 </div> | |
| 117 <!-- API HEADER --> | |
| 118 <table id="header" width="100%" cellspacing="0" border="0"> | |
| 119 <tbody><tr> | |
| 120 <td valign="middle"><a href="http://code.google.com/"><img src="images/c
ode_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:
0; margin:0;"></a></td> | |
| 121 <td valign="middle" width="100%" style="padding-left:0.6em;"> | |
| 122 <form action="http://www.google.com/cse" id="cse" style="margin-top:0.
5em"> | |
| 123 <div id="gsc-search-box"> | |
| 124 <input type="hidden" name="cx" value="002967670403910741006:61_cvz
fqtno"> | |
| 125 <input type="hidden" name="ie" value="UTF-8"> | |
| 126 <input type="text" name="q" value="" size="55"> | |
| 127 <input class="gsc-search-button" type="submit" name="sa" value="Se
arch"> | |
| 128 <br> | |
| 129 <span class="greytext">e.g. "page action" or "tabs"</span> | |
| 130 </div> | |
| 131 </form> | |
| 132 | |
| 133 <script type="text/javascript" src="http://www.google.com/jsapi"></scr
ipt> | |
| 134 <script type="text/javascript">google.load("elements", "1", {packages:
"transliteration"});</script> | |
| 135 <script type="text/javascript" src="http://www.google.com/coop/cse/t13
n?form=cse&t13n_langs=en"></script> | |
| 136 <script type="text/javascript" src="http://www.google.com/coop/cse/bra
nd?form=cse&lang=en"></script> | |
| 137 </td> | |
| 138 </tr> | |
| 139 </tbody></table> | |
| 140 | |
| 141 <div id="codesiteContent" class=""> | |
| 142 | |
| 143 <a id="gc-topnav-anchor"></a> | |
| 144 <div id="gc-topnav"> | |
| 145 <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Lab
s</a>)</h1> | |
| 146 <ul id="home" class="gc-topnav-tabs"> | |
| 147 <li id="home_link"> | |
| 148 <a href="index.html" title="Google Chrome Extensions home page">Home
</a> | |
| 149 </li> | |
| 150 <li id="docs_link"> | |
| 151 <a href="docs.html" title="Official Google Chrome Extensions documen
tation">Docs</a> | |
| 152 </li> | |
| 153 <li id="faq_link"> | |
| 154 <a href="faq.html" title="Answers to frequently asked questions abou
t Google Chrome Extensions">FAQ</a> | |
| 155 </li> | |
| 156 <li id="samples_link"> | |
| 157 <a href="samples.html" title="Sample extensions (with source code)">
Samples</a> | |
| 158 </li> | |
| 159 <li id="group_link"> | |
| 160 <a href="http://groups.google.com/a/chromium.org/group/chromium-exte
nsions" title="Google Chrome Extensions developer forum">Group</a> | |
| 161 </li> | |
| 162 </ul> | |
| 163 </div> <!-- end gc-topnav --> | |
| 164 | |
| 165 <div class="g-section g-tpl-170"> | |
| 166 <!-- SIDENAV --> | |
| 167 <div class="g-unit g-first" id="gc-toc"> | |
| 168 <ul> | |
| 169 <li><a href="getstarted.html">Getting Started</a></li> | |
| 170 <li><a href="overview.html">Overview</a></li> | |
| 171 <li><a href="whats_new.html">What's New?</a></li> | |
| 172 <li><h2><a href="devguide.html">Developer's Guide</a></h2> | |
| 173 <ul> | |
| 174 <li>Browser UI | |
| 175 <ul> | |
| 176 <li><a href="browserAction.html">Browser Actions</a></li> | |
| 177 <li><a href="contextMenus.html">Context Menus</a></li> | |
| 178 <li><a href="notifications.html">Desktop Notifications</a></li
> | |
| 179 <li><a href="omnibox.html">Omnibox</a></li> | |
| 180 <li><a href="options.html">Options Pages</a></li> | |
| 181 <li><a href="override.html">Override Pages</a></li> | |
| 182 <li><a href="pageAction.html">Page Actions</a></li> | |
| 183 </ul> | |
| 184 </li> | |
| 185 <li>Browser Interaction | |
| 186 <ul> | |
| 187 <li><a href="bookmarks.html">Bookmarks</a></li> | |
| 188 <li><a href="cookies.html">Cookies</a></li> | |
| 189 <li><a href="events.html">Events</a></li> | |
| 190 <li><a href="history.html">History</a></li> | |
| 191 <li><a href="management.html">Management</a></li> | |
| 192 <li><a href="tabs.html">Tabs</a></li> | |
| 193 <li><a href="windows.html">Windows</a></li> | |
| 194 </ul> | |
| 195 </li> | |
| 196 <li>Implementation | |
| 197 <ul> | |
| 198 <li><a href="a11y.html">Accessibility</a></li> | |
| 199 <li><a href="background_pages.html">Background Pages</a></li> | |
| 200 <li><a href="content_scripts.html">Content Scripts</a></li> | |
| 201 <li><a href="xhr.html">Cross-Origin XHR</a></li> | |
| 202 <li><a href="idle.html">Idle</a></li> | |
| 203 <li><a href="i18n.html">Internationalization</a></li> | |
| 204 <li><a href="messaging.html">Message Passing</a></li> | |
| 205 <li><a href="npapi.html">NPAPI Plugins</a></li> | |
| 206 </ul> | |
| 207 </li> | |
| 208 <li>Finishing | |
| 209 <ul> | |
| 210 <li><a href="hosting.html">Hosting</a></li> | |
| 211 <li><a href="external_extensions.html">Other Deployment Option
s</a></li> | |
| 212 </ul> | |
| 213 </li> | |
| 214 </ul> | |
| 215 </li> | |
| 216 <li><h2><a href="apps.html">Packaged Apps</a></h2></li> | |
| 217 <li><h2><a href="tutorials.html">Tutorials</a></h2> | |
| 218 <ul> | |
| 219 <li><a href="tut_debugging.html">Debugging</a></li> | |
| 220 <li><a href="tut_analytics.html">Google Analytics</a></li> | |
| 221 <li><a href="tut_oauth.html">OAuth</a></li> | |
| 222 </ul> | |
| 223 </li> | |
| 224 <li><h2>Reference</h2> | |
| 225 <ul> | |
| 226 <li>Formats | |
| 227 <ul> | |
| 228 <li><a href="manifest.html">Manifest Files</a></li> | |
| 229 <li><a href="match_patterns.html">Match Patterns</a></li> | |
| 230 </ul> | |
| 231 </li> | |
| 232 <li><a href="permission_warnings.html">Permission Warnings</a></li
> | |
| 233 <li><a href="api_index.html">chrome.* APIs</a></li> | |
| 234 <li><a href="api_other.html">Other APIs</a></li> | |
| 235 </ul> | |
| 236 </li> | |
| 237 <li><h2><a href="samples.html">Samples</a></h2></li> | |
| 238 <div class="line"> </div> | |
| 239 <li><h2>More</h2> | |
| 240 <ul> | |
| 241 <li><a href="http://code.google.com/chrome/webstore/docs/index.htm
l">Chrome Web Store</a></li> | |
| 242 <li><a href="http://code.google.com/chrome/apps/docs/developers_gu
ide.html">Hosted Apps</a></li> | |
| 243 <li><a href="themes.html">Themes</a></li> | |
| 244 </ul> | |
| 245 </li> | |
| 246 </ul> | |
| 247 </div> | |
| 248 <script> | |
| 249 initToggles(); | |
| 250 </script> | |
| 251 | |
| 252 <div class="g-unit" id="gc-pagecontent"> | |
| 253 <div id="pageTitle"> | |
| 254 <h1 class="page_title">chrome.experimental.ttsEngine</h1> | |
| 255 </div> | |
| 256 <!-- TABLE OF CONTENTS --> | |
| 257 <div id="toc"> | |
| 258 <h2>Contents</h2> | |
| 259 <ol> | |
| 260 <li> | |
| 261 <a href="#overview">Overview</a> | |
| 262 <ol> | |
| 263 <li style="display: none; "> | |
| 264 <a>h3Name</a> | |
| 265 </li> | |
| 266 </ol> | |
| 267 </li><li> | |
| 268 <a href="#manifest">Manifest</a> | |
| 269 <ol> | |
| 270 <li style="display: none; "> | |
| 271 <a>h3Name</a> | |
| 272 </li> | |
| 273 </ol> | |
| 274 </li><li> | |
| 275 <a href="#handling_speech_events">Handling speech events</a> | |
| 276 <ol> | |
| 277 <li style="display: none; "> | |
| 278 <a>h3Name</a> | |
| 279 </li> | |
| 280 </ol> | |
| 281 </li> | |
| 282 <li> | |
| 283 <a href="#apiReference">API reference: chrome.experimental.ttsEn
gine</a> | |
| 284 <ol> | |
| 285 <li style="display: none; "> | |
| 286 <a href="#properties">Properties</a> | |
| 287 <ol> | |
| 288 <li> | |
| 289 <a href="#property-anchor">propertyName</a> | |
| 290 </li> | |
| 291 </ol> | |
| 292 </li> | |
| 293 <li> | |
| 294 <a href="#global-methods">Methods</a> | |
| 295 <ol> | |
| 296 <li style="display: none; "> | |
| 297 <a href="#method-anchor">methodName</a> | |
| 298 </li> | |
| 299 </ol> | |
| 300 </li> | |
| 301 <li> | |
| 302 <a href="#global-events">Events</a> | |
| 303 <ol> | |
| 304 <li style="display: none; "> | |
| 305 <a href="#event-anchor">eventName</a> | |
| 306 </li><li> | |
| 307 <a href="#event-onSpeak">onSpeak</a> | |
| 308 </li><li> | |
| 309 <a href="#event-onStop">onStop</a> | |
| 310 </li> | |
| 311 </ol> | |
| 312 </li> | |
| 313 <li style="display: none; "> | |
| 314 <a href="#types">Types</a> | |
| 315 <ol> | |
| 316 <li> | |
| 317 <a href="#id-anchor">id</a> | |
| 318 </li> | |
| 319 </ol> | |
| 320 </li> | |
| 321 </ol> | |
| 322 </li> | |
| 323 </ol> | |
| 324 </div> | |
| 325 <!-- /TABLE OF CONTENTS --> | |
| 326 | |
| 327 <!-- Standard content lead-in for experimental API pages --> | |
| 328 <p id="classSummary"> | |
| 329 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | |
| 330 </p> | |
| 331 | |
| 332 <!-- STATIC CONTENT PLACEHOLDER --> | |
| 333 <div id="static"><p id="classSummary"> | |
| 334 Use the <code>chrome.experimental.ttsEngine</code> module to | |
| 335 implement a text-to-speech (TTS) engine using an extension. If your | |
| 336 extension registers using this API, it will receive events containing | |
| 337 an utterance to be spoken and other parameters when any extension or packaged | |
| 338 app uses the | |
| 339 <a href="experimental.tts.html">experimental.tts</a> | |
| 340 module to generate speech. Your extension can then use any available | |
| 341 web technology to synthesize and output the speech, and send events back | |
| 342 to the calling function to report the status. | |
| 343 </p> | |
| 344 | |
| 345 <p class="note"><b>Give us feedback:</b> If you have suggestions, | |
| 346 especially changes that should be made before stabilizing the first | |
| 347 version of this API, please send your ideas to the | |
| 348 <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions">chro
mium-extensions</a> | |
| 349 group.</p> | |
| 350 | |
| 351 <h2 id="overview">Overview</h2> | |
| 352 | |
| 353 <p>To enable this experimental API, visit | |
| 354 <b>chrome://flags</b> and enable <b>Experimental Extension APIs</b>. | |
| 355 | |
| 356 </p><p>An extension can register itself as a speech engine. By doing so, it | |
| 357 can intercept some or all calls to functions such as | |
| 358 <a href="experimental.tts.html#method-speak"><code>speak()</code></a> and | |
| 359 <a href="experimental.tts.html#method-stop"><code>stop()</code></a> | |
| 360 and provide an alternate implementation. | |
| 361 Extensions are free to use any available web technology | |
| 362 to provide speech, including streaming audio from a server, HTML5 audio, | |
| 363 Native Client, or Flash. An extension could even do something different | |
| 364 with the utterances, like display closed captions in a pop-up window or | |
| 365 send them as log messages to a remote server.</p> | |
| 366 | |
| 367 <h2 id="manifest">Manifest</h2> | |
| 368 | |
| 369 <p>To implement a TTS engine, an extension must first declare all voices | |
| 370 it provides in the extension manifest, like this:</p> | |
| 371 | |
| 372 <pre>{ | |
| 373 "name": "My TTS Engine", | |
| 374 "version": "1.0", | |
| 375 <b>"permissions": ["experimental"], | |
| 376 "tts_engine": { | |
| 377 "voices": [ | |
| 378 { | |
| 379 "voice_name": "Alice", | |
| 380 "lang": "en-US", | |
| 381 "gender": "female", | |
| 382 "event_types": ["start", "marker", "end"] | |
| 383 }, | |
| 384 { | |
| 385 "voice_name": "Pat", | |
| 386 "lang": "en-US", | |
| 387 "event_types": ["end"] | |
| 388 } | |
| 389 ] | |
| 390 },</b> | |
| 391 "background_page": "background.html", | |
| 392 }</pre> | |
| 393 | |
| 394 <p>An extension can specify any number of voices.</p> | |
| 395 | |
| 396 <p>The <code>voice_name</code> parameter is required. The name should be | |
| 397 descriptive enough that it identifies the name of the voice and the | |
| 398 engine used. In the unlikely event that two extensions register voices | |
| 399 with the same name, a client can specify the ID of the extension that | |
| 400 should do the synthesis.</p> | |
| 401 | |
| 402 <p>The <code>gender</code> parameter is optional. If your voice corresponds | |
| 403 to a male or female voice, you can use this parameter to help clients | |
| 404 choose the most appropriate voice for their application.</p> | |
| 405 | |
| 406 <p>The <code>lang</code> parameter is optional, but highly recommended. | |
| 407 Almost always, a voice can synthesize speech in just a single language. | |
| 408 When an engine supports more than one language, it can easily register a | |
| 409 separate voice for each language. Under rare circumstances where a single | |
| 410 voice can handle more than one language, it's easiest to just list two | |
| 411 separate voices and handle them using the same logic internally. However, | |
| 412 if you want to create a voice that will handle utterances in any language, | |
| 413 leave out the <code>lang</code> parameter from your extension's manifest.</p> | |
| 414 | |
| 415 <p>Finally, the <code>event_types</code> parameter is required if the engine can | |
| 416 send events to update the client on the progress of speech synthesis. | |
| 417 At a minimum, supporting the <code>'end'</code> event type to indicate | |
| 418 when speech is finished is highly recommended, otherwise Chrome cannot | |
| 419 schedule queued utterances.</p> | |
| 420 | |
| 421 <p class="note"> | |
| 422 <strong>Note:</strong> If your TTS engine does not support | |
| 423 the <code>'end'</code> event type, Chrome cannot queue utterances | |
| 424 because it has no way of knowing when your utterance has finished. To | |
| 425 help mitigate this, Chrome passes an additional boolean <code>enqueue</code> | |
| 426 option to your engine's onSpeak handler, giving you the option of | |
| 427 implementing your own queueing. This is discouraged because then | |
| 428 clients are unable to queue utterances that should get spoken by different | |
| 429 speech engines.</p> | |
| 430 | |
| 431 <p>The possible event types that you can send correspond to the event types | |
| 432 that the <code>speak()</code> method receives:</p> | |
| 433 | |
| 434 <ul> | |
| 435 <li><code>'start'</code>: The engine has started speaking the utterance. | |
| 436 </li><li><code>'word'</code>: A word boundary was reached. Use | |
| 437 <code>event.charIndex</code> to determine the current speech | |
| 438 position. | |
| 439 </li><li><code>'sentence'</code>: A sentence boundary was reached. Use | |
| 440 <code>event.charIndex</code> to determine the current speech | |
| 441 position. | |
| 442 </li><li><code>'marker'</code>: An SSML marker was reached. Use | |
| 443 <code>event.charIndex</code> to determine the current speech | |
| 444 position. | |
| 445 </li><li><code>'end'</code>: The engine has finished speaking the utterance. | |
| 446 </li><li><code>'error'</code>: An engine-specific error occurred and | |
| 447 this utterance cannot be spoken. | |
| 448 Pass more information in <code>event.errorMessage</code>. | |
| 449 </li></ul> | |
| 450 | |
| 451 <p>The <code>'interrupted'</code> and <code>'cancelled'</code> events are | |
| 452 not sent by the speech engine; they are generated automatically by Chrome.</p> | |
| 453 | |
| 454 <p>Text-to-speech clients can get the voice information from your | |
| 455 extension's manifest by calling | |
| 456 <a href="experimental.tts.html#method-getVoices">getVoices()</a>, | |
| 457 assuming you've registered speech event listeners as described below.</p> | |
| 458 | |
| 459 <h2 id="handling_speech_events">Handling speech events</h2> | |
| 460 | |
| 461 <p>To generate speech at the request of clients, your extension must | |
| 462 register listeners for both <code>onSpeak</code> and <code>onStop</code>, | |
| 463 like this:</p> | |
| 464 | |
| 465 <pre>var speakListener = function(utterance, options, sendTtsEvent) { | |
| 466 sendTtsEvent({'event_type': 'start', 'charIndex': 0}) | |
| 467 | |
| 468 // (start speaking) | |
| 469 | |
| 470 sendTtsEvent({'event_type': 'end', 'charIndex': utterance.length}) | |
| 471 }; | |
| 472 | |
| 473 var stopListener = function() { | |
| 474 // (stop all speech) | |
| 475 }; | |
| 476 | |
| 477 chrome.experimental.ttsEngine.onSpeak.addListener(speakListener); | |
| 478 chrome.experimental.ttsEngine.onStop.addListener(stopListener);</pre> | |
| 479 | |
| 480 <p class="warning"> | |
| 481 <b>Important:</b> | |
| 482 If your extension does not register listeners for both | |
| 483 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any | |
| 484 speech calls, regardless of what is in the manifest.</p> | |
| 485 | |
| 486 <p>The decision of whether or not to send a given speech request to an | |
| 487 extension is based solely on whether the extension supports the given voice | |
| 488 parameters in its manifest and has registered listeners | |
| 489 for <code>onSpeak</code> and <code>onStop</code>. In other words, | |
| 490 there's no way for an extension to receive a speech request and | |
| 491 dynamically decide whether to handle it.</p> | |
| 492 </div> | |
| 493 | |
| 494 <!-- API PAGE --> | |
| 495 <div class="apiPage"> | |
| 496 <a name="apiReference"></a> | |
| 497 <h2>API reference: chrome.experimental.ttsEngine</h2> | |
| 498 | |
| 499 <!-- PROPERTIES --> | |
| 500 <div class="apiGroup" style="display: none; "> | |
| 501 <a name="properties"></a> | |
| 502 <h3 id="properties">Properties</h3> | |
| 503 | |
| 504 <div> | |
| 505 <a></a> | |
| 506 <h4>getLastError</h4> | |
| 507 <div class="summary"> | |
| 508 <!-- Note: intentionally longer 80 columns --> | |
| 509 <span>chrome.extension</span><span>lastError</span> | |
| 510 </div> | |
| 511 <div> | |
| 512 </div> | |
| 513 </div> | |
| 514 | |
| 515 </div> <!-- /apiGroup --> | |
| 516 | |
| 517 <!-- METHODS --> | |
| 518 <div id="methodsTemplate" class="apiGroup"> | |
| 519 <a name="global-methods"></a> | |
| 520 <h3>Methods</h3> | |
| 521 | |
| 522 <!-- iterates over all functions --> | |
| 523 <div class="apiItem" style="display: none; "> | |
| 524 <a></a> <!-- method-anchor --> | |
| 525 <h4>method name</h4> | |
| 526 | |
| 527 <div class="summary"><span>void</span> | |
| 528 <!-- Note: intentionally longer 80 columns --> | |
| 529 <span>chrome.module.methodName</span>(<span><span>, </span><sp
an></span> | |
| 530 <var><span></span></var></span>)</div> | |
| 531 | |
| 532 <div class="description"> | |
| 533 <p class="todo">Undocumented.</p> | |
| 534 <p> | |
| 535 A description from the json schema def of the function goes he
re. | |
| 536 </p> | |
| 537 | |
| 538 <!-- PARAMETERS --> | |
| 539 <h4>Parameters</h4> | |
| 540 <dl> | |
| 541 <div> | |
| 542 <div> | |
| 543 </div> | |
| 544 </div> | |
| 545 </dl> | |
| 546 | |
| 547 <!-- RETURNS --> | |
| 548 <h4>Returns</h4> | |
| 549 <dl> | |
| 550 <div> | |
| 551 <div> | |
| 552 </div> | |
| 553 </div> | |
| 554 </dl> | |
| 555 | |
| 556 <!-- CALLBACK --> | |
| 557 <div> | |
| 558 <div> | |
| 559 <h4>Callback function</h4> | |
| 560 <p> | |
| 561 The callback <em>parameter</em> should specify a function | |
| 562 that looks like this: | |
| 563 </p> | |
| 564 <p> | |
| 565 If you specify the <em>callback</em> parameter, it should | |
| 566 specify a function that looks like this: | |
| 567 </p> | |
| 568 | |
| 569 <!-- Note: intentionally longer 80 columns --> | |
| 570 <pre>function(<span>Type param1, Type param2</span>) <span cla
ss="subdued">{...}</span>;</pre> | |
| 571 <dl> | |
| 572 <div> | |
| 573 <div> | |
| 574 </div> | |
| 575 </div> | |
| 576 </dl> | |
| 577 </div> | |
| 578 </div> | |
| 579 | |
| 580 <!-- MIN_VERSION --> | |
| 581 <p> | |
| 582 This function was added in version <b><span></span></b>. | |
| 583 If you require this function, the manifest key | |
| 584 <a href="manifest.html#minimum_chrome_version">minimum_chrome_
version</a> | |
| 585 can ensure that your extension won't be run in an earlier brow
ser version. | |
| 586 </p> | |
| 587 </div> <!-- /description --> | |
| 588 | |
| 589 </div> <!-- /apiItem --> | |
| 590 | |
| 591 </div> <!-- /apiGroup --> | |
| 592 | |
| 593 <!-- EVENTS --> | |
| 594 <div id="eventsTemplate" class="apiGroup"> | |
| 595 <a name="global-events"></a> | |
| 596 <h3>Events</h3> | |
| 597 <!-- iterates over all events --> | |
| 598 <div class="apiItem" style="display: none; "> | |
| 599 <a></a> | |
| 600 <h4>event name</h4> | |
| 601 | |
| 602 <div class="summary"> | |
| 603 <!-- Note: intentionally longer 80 columns --> | |
| 604 <span class="subdued">chrome.bookmarks</span><span>onEvent</span
><span class="subdued">.addListener</span>(function(<span>Type param1, Type para
m2</span>) <span class="subdued">{...}</span><span>, Type opt_param1, Type opt_p
aram2</span>)); | |
| 605 </div> | |
| 606 | |
| 607 <div class="description"> | |
| 608 <p class="todo">Undocumented.</p> | |
| 609 <p> | |
| 610 A description from the json schema def of the event goes here. | |
| 611 </p> | |
| 612 | |
| 613 <!-- LISTENER PARAMETERS --> | |
| 614 <div> | |
| 615 <h4>Listener parameters</h4> | |
| 616 <dl> | |
| 617 <div> | |
| 618 <div> | |
| 619 </div> | |
| 620 </div> | |
| 621 </dl> | |
| 622 </div> | |
| 623 | |
| 624 <!-- EXTRA PARAMETERS --> | |
| 625 <div> | |
| 626 <h4>Extra parameters to addListener</h4> | |
| 627 <dl> | |
| 628 <div> | |
| 629 <div> | |
| 630 </div> | |
| 631 </div> | |
| 632 </dl> | |
| 633 </div> | |
| 634 | |
| 635 <!-- LISTENER RETURN VALUE --> | |
| 636 <h4>Listener returns</h4> | |
| 637 <dl> | |
| 638 <div> | |
| 639 <div> | |
| 640 </div> | |
| 641 </div> | |
| 642 </dl> | |
| 643 | |
| 644 </div> <!-- /description --> | |
| 645 </div><div class="apiItem"> | |
| 646 <a name="event-onSpeak"></a> | |
| 647 <h4>onSpeak</h4> | |
| 648 | |
| 649 <div class="summary"> | |
| 650 <!-- Note: intentionally longer 80 columns --> | |
| 651 <span class="subdued">chrome.experimental.ttsEngine.</span><span
>onSpeak</span><span class="subdued">.addListener</span>(function(<span>string u
tterance, object options, function sendTtsEvent</span>) <span class="subdued">{.
..}</span><span></span>)); | |
| 652 </div> | |
| 653 | |
| 654 <div class="description"> | |
| 655 <p class="todo" style="display: none; ">Undocumented.</p> | |
| 656 <p>Called when the user makes a call to tts.speak() and one of t
he voices from this extension's manifest is the first to match the options objec
t.</p> | |
| 657 | |
| 658 <!-- LISTENER PARAMETERS --> | |
| 659 <div> | |
| 660 <h4>Listener parameters</h4> | |
| 661 <dl> | |
| 662 <div> | |
| 663 <div> | |
| 664 <dt> | |
| 665 <var>utterance</var> | |
| 666 <em> | |
| 667 | |
| 668 <!-- TYPE --> | |
| 669 <div style="display:inline"> | |
| 670 ( | |
| 671 <span class="optional" style="display: none; ">optional</spa
n> | |
| 672 <span class="enum" style="display: none; ">enumerated</span> | |
| 673 <span id="typeTemplate"> | |
| 674 <span style="display: none; "> | |
| 675 <a> Type</a> | |
| 676 </span> | |
| 677 <span> | |
| 678 <span style="display: none; "> | |
| 679 array of <span><span></span></span> | |
| 680 </span> | |
| 681 <span>string</span> | |
| 682 <span style="display: none; "></span> | |
| 683 </span> | |
| 684 </span> | |
| 685 ) | |
| 686 </div> | |
| 687 | |
| 688 </em> | |
| 689 </dt> | |
| 690 <dd class="todo" style="display: none; "> | |
| 691 Undocumented. | |
| 692 </dd> | |
| 693 <dd>The text to speak, specified as either plain text or an SSML docum
ent. If your engine does not support SSML, you should strip out all XML markup a
nd synthesize only the underlying text content. The value of this parameter is g
uaranteed to be no more than 32,768 characters. If this engine does not support
speaking that many characters at a time, the utterance should be split into smal
ler chunks and queued internally without returning an error.</dd> | |
| 694 <dd style="display: none; "> | |
| 695 This parameter was added in version | |
| 696 <b><span></span></b>. | |
| 697 You must omit this parameter in earlier versions, | |
| 698 and you may omit it in any version. If you require this | |
| 699 parameter, the manifest key | |
| 700 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 701 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 702 </dd> | |
| 703 | |
| 704 <!-- OBJECT PROPERTIES --> | |
| 705 <dd style="display: none; "> | |
| 706 <dl> | |
| 707 <div> | |
| 708 <div> | |
| 709 </div> | |
| 710 </div> | |
| 711 </dl> | |
| 712 </dd> | |
| 713 | |
| 714 <!-- OBJECT METHODS --> | |
| 715 <dd style="display: none; "> | |
| 716 <div></div> | |
| 717 </dd> | |
| 718 | |
| 719 <!-- OBJECT EVENT FIELDS --> | |
| 720 <dd style="display: none; "> | |
| 721 <div></div> | |
| 722 </dd> | |
| 723 | |
| 724 <!-- FUNCTION PARAMETERS --> | |
| 725 <dd style="display: none; "> | |
| 726 <div></div> | |
| 727 </dd> | |
| 728 | |
| 729 </div> | |
| 730 </div><div> | |
| 731 <div> | |
| 732 <dt> | |
| 733 <var>options</var> | |
| 734 <em> | |
| 735 | |
| 736 <!-- TYPE --> | |
| 737 <div style="display:inline"> | |
| 738 ( | |
| 739 <span class="optional" style="display: none; ">optional</spa
n> | |
| 740 <span class="enum" style="display: none; ">enumerated</span> | |
| 741 <span id="typeTemplate"> | |
| 742 <span style="display: none; "> | |
| 743 <a> Type</a> | |
| 744 </span> | |
| 745 <span> | |
| 746 <span style="display: none; "> | |
| 747 array of <span><span></span></span> | |
| 748 </span> | |
| 749 <span>object</span> | |
| 750 <span style="display: none; "></span> | |
| 751 </span> | |
| 752 </span> | |
| 753 ) | |
| 754 </div> | |
| 755 | |
| 756 </em> | |
| 757 </dt> | |
| 758 <dd class="todo" style="display: none; "> | |
| 759 Undocumented. | |
| 760 </dd> | |
| 761 <dd>Options specified to the tts.speak() method.</dd> | |
| 762 <dd style="display: none; "> | |
| 763 This parameter was added in version | |
| 764 <b><span></span></b>. | |
| 765 You must omit this parameter in earlier versions, | |
| 766 and you may omit it in any version. If you require this | |
| 767 parameter, the manifest key | |
| 768 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 769 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 770 </dd> | |
| 771 | |
| 772 <!-- OBJECT PROPERTIES --> | |
| 773 <dd> | |
| 774 <dl> | |
| 775 <div> | |
| 776 <div> | |
| 777 <dt> | |
| 778 <var>voiceName</var> | |
| 779 <em> | |
| 780 | |
| 781 <!-- TYPE --> | |
| 782 <div style="display:inline"> | |
| 783 ( | |
| 784 <span class="optional">optional</span> | |
| 785 <span class="enum" style="display: none; ">enumerated</span> | |
| 786 <span id="typeTemplate"> | |
| 787 <span style="display: none; "> | |
| 788 <a> Type</a> | |
| 789 </span> | |
| 790 <span> | |
| 791 <span style="display: none; "> | |
| 792 array of <span><span></span></span> | |
| 793 </span> | |
| 794 <span>string</span> | |
| 795 <span style="display: none; "></span> | |
| 796 </span> | |
| 797 </span> | |
| 798 ) | |
| 799 </div> | |
| 800 | |
| 801 </em> | |
| 802 </dt> | |
| 803 <dd class="todo" style="display: none; "> | |
| 804 Undocumented. | |
| 805 </dd> | |
| 806 <dd>The name of the voice to use for synthesis.</dd> | |
| 807 <dd style="display: none; "> | |
| 808 This parameter was added in version | |
| 809 <b><span></span></b>. | |
| 810 You must omit this parameter in earlier versions, | |
| 811 and you may omit it in any version. If you require this | |
| 812 parameter, the manifest key | |
| 813 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 814 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 815 </dd> | |
| 816 | |
| 817 <!-- OBJECT PROPERTIES --> | |
| 818 <dd style="display: none; "> | |
| 819 <dl> | |
| 820 <div> | |
| 821 <div> | |
| 822 </div> | |
| 823 </div> | |
| 824 </dl> | |
| 825 </dd> | |
| 826 | |
| 827 <!-- OBJECT METHODS --> | |
| 828 <dd style="display: none; "> | |
| 829 <div></div> | |
| 830 </dd> | |
| 831 | |
| 832 <!-- OBJECT EVENT FIELDS --> | |
| 833 <dd style="display: none; "> | |
| 834 <div></div> | |
| 835 </dd> | |
| 836 | |
| 837 <!-- FUNCTION PARAMETERS --> | |
| 838 <dd style="display: none; "> | |
| 839 <div></div> | |
| 840 </dd> | |
| 841 | |
| 842 </div> | |
| 843 </div><div> | |
| 844 <div> | |
| 845 <dt> | |
| 846 <var>lang</var> | |
| 847 <em> | |
| 848 | |
| 849 <!-- TYPE --> | |
| 850 <div style="display:inline"> | |
| 851 ( | |
| 852 <span class="optional">optional</span> | |
| 853 <span class="enum" style="display: none; ">enumerated</span> | |
| 854 <span id="typeTemplate"> | |
| 855 <span style="display: none; "> | |
| 856 <a> Type</a> | |
| 857 </span> | |
| 858 <span> | |
| 859 <span style="display: none; "> | |
| 860 array of <span><span></span></span> | |
| 861 </span> | |
| 862 <span>string</span> | |
| 863 <span style="display: none; "></span> | |
| 864 </span> | |
| 865 </span> | |
| 866 ) | |
| 867 </div> | |
| 868 | |
| 869 </em> | |
| 870 </dt> | |
| 871 <dd class="todo" style="display: none; "> | |
| 872 Undocumented. | |
| 873 </dd> | |
| 874 <dd>The language to be used for synthesis, in the form <em>language</e
m>-<em>region</em>. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'.</dd> | |
| 875 <dd style="display: none; "> | |
| 876 This parameter was added in version | |
| 877 <b><span></span></b>. | |
| 878 You must omit this parameter in earlier versions, | |
| 879 and you may omit it in any version. If you require this | |
| 880 parameter, the manifest key | |
| 881 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 882 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 883 </dd> | |
| 884 | |
| 885 <!-- OBJECT PROPERTIES --> | |
| 886 <dd style="display: none; "> | |
| 887 <dl> | |
| 888 <div> | |
| 889 <div> | |
| 890 </div> | |
| 891 </div> | |
| 892 </dl> | |
| 893 </dd> | |
| 894 | |
| 895 <!-- OBJECT METHODS --> | |
| 896 <dd style="display: none; "> | |
| 897 <div></div> | |
| 898 </dd> | |
| 899 | |
| 900 <!-- OBJECT EVENT FIELDS --> | |
| 901 <dd style="display: none; "> | |
| 902 <div></div> | |
| 903 </dd> | |
| 904 | |
| 905 <!-- FUNCTION PARAMETERS --> | |
| 906 <dd style="display: none; "> | |
| 907 <div></div> | |
| 908 </dd> | |
| 909 | |
| 910 </div> | |
| 911 </div><div> | |
| 912 <div> | |
| 913 <dt> | |
| 914 <var>gender</var> | |
| 915 <em> | |
| 916 | |
| 917 <!-- TYPE --> | |
| 918 <div style="display:inline"> | |
| 919 ( | |
| 920 <span class="optional">optional</span> | |
| 921 <span class="enum">enumerated</span> | |
| 922 <span id="typeTemplate"> | |
| 923 <span style="display: none; "> | |
| 924 <a> Type</a> | |
| 925 </span> | |
| 926 <span> | |
| 927 <span style="display: none; "> | |
| 928 array of <span><span></span></span> | |
| 929 </span> | |
| 930 <span>string</span> | |
| 931 <span>["male", "female"]</span> | |
| 932 </span> | |
| 933 </span> | |
| 934 ) | |
| 935 </div> | |
| 936 | |
| 937 </em> | |
| 938 </dt> | |
| 939 <dd class="todo" style="display: none; "> | |
| 940 Undocumented. | |
| 941 </dd> | |
| 942 <dd>Gender of voice for synthesized speech.</dd> | |
| 943 <dd style="display: none; "> | |
| 944 This parameter was added in version | |
| 945 <b><span></span></b>. | |
| 946 You must omit this parameter in earlier versions, | |
| 947 and you may omit it in any version. If you require this | |
| 948 parameter, the manifest key | |
| 949 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 950 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 951 </dd> | |
| 952 | |
| 953 <!-- OBJECT PROPERTIES --> | |
| 954 <dd style="display: none; "> | |
| 955 <dl> | |
| 956 <div> | |
| 957 <div> | |
| 958 </div> | |
| 959 </div> | |
| 960 </dl> | |
| 961 </dd> | |
| 962 | |
| 963 <!-- OBJECT METHODS --> | |
| 964 <dd style="display: none; "> | |
| 965 <div></div> | |
| 966 </dd> | |
| 967 | |
| 968 <!-- OBJECT EVENT FIELDS --> | |
| 969 <dd style="display: none; "> | |
| 970 <div></div> | |
| 971 </dd> | |
| 972 | |
| 973 <!-- FUNCTION PARAMETERS --> | |
| 974 <dd style="display: none; "> | |
| 975 <div></div> | |
| 976 </dd> | |
| 977 | |
| 978 </div> | |
| 979 </div><div> | |
| 980 <div> | |
| 981 <dt> | |
| 982 <var>rate</var> | |
| 983 <em> | |
| 984 | |
| 985 <!-- TYPE --> | |
| 986 <div style="display:inline"> | |
| 987 ( | |
| 988 <span class="optional">optional</span> | |
| 989 <span class="enum" style="display: none; ">enumerated</span> | |
| 990 <span id="typeTemplate"> | |
| 991 <span style="display: none; "> | |
| 992 <a> Type</a> | |
| 993 </span> | |
| 994 <span> | |
| 995 <span style="display: none; "> | |
| 996 array of <span><span></span></span> | |
| 997 </span> | |
| 998 <span>number</span> | |
| 999 <span style="display: none; "></span> | |
| 1000 </span> | |
| 1001 </span> | |
| 1002 ) | |
| 1003 </div> | |
| 1004 | |
| 1005 </em> | |
| 1006 </dt> | |
| 1007 <dd class="todo" style="display: none; "> | |
| 1008 Undocumented. | |
| 1009 </dd> | |
| 1010 <dd>Speaking rate relative to the default rate for this voice. 1.0 is
the default rate, normally around 180 to 220 words per minute. 2.0 is twice as f
ast, and 0.5 is half as fast. This value is guaranteed to be between 0.1 and 10.
0, inclusive. When a voice does not support this full range of rates, don't retu
rn an error. Instead, clip the rate to the range the voice supports.</dd> | |
| 1011 <dd style="display: none; "> | |
| 1012 This parameter was added in version | |
| 1013 <b><span></span></b>. | |
| 1014 You must omit this parameter in earlier versions, | |
| 1015 and you may omit it in any version. If you require this | |
| 1016 parameter, the manifest key | |
| 1017 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 1018 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 1019 </dd> | |
| 1020 | |
| 1021 <!-- OBJECT PROPERTIES --> | |
| 1022 <dd style="display: none; "> | |
| 1023 <dl> | |
| 1024 <div> | |
| 1025 <div> | |
| 1026 </div> | |
| 1027 </div> | |
| 1028 </dl> | |
| 1029 </dd> | |
| 1030 | |
| 1031 <!-- OBJECT METHODS --> | |
| 1032 <dd style="display: none; "> | |
| 1033 <div></div> | |
| 1034 </dd> | |
| 1035 | |
| 1036 <!-- OBJECT EVENT FIELDS --> | |
| 1037 <dd style="display: none; "> | |
| 1038 <div></div> | |
| 1039 </dd> | |
| 1040 | |
| 1041 <!-- FUNCTION PARAMETERS --> | |
| 1042 <dd style="display: none; "> | |
| 1043 <div></div> | |
| 1044 </dd> | |
| 1045 | |
| 1046 </div> | |
| 1047 </div><div> | |
| 1048 <div> | |
| 1049 <dt> | |
| 1050 <var>pitch</var> | |
| 1051 <em> | |
| 1052 | |
| 1053 <!-- TYPE --> | |
| 1054 <div style="display:inline"> | |
| 1055 ( | |
| 1056 <span class="optional">optional</span> | |
| 1057 <span class="enum" style="display: none; ">enumerated</span> | |
| 1058 <span id="typeTemplate"> | |
| 1059 <span style="display: none; "> | |
| 1060 <a> Type</a> | |
| 1061 </span> | |
| 1062 <span> | |
| 1063 <span style="display: none; "> | |
| 1064 array of <span><span></span></span> | |
| 1065 </span> | |
| 1066 <span>number</span> | |
| 1067 <span style="display: none; "></span> | |
| 1068 </span> | |
| 1069 </span> | |
| 1070 ) | |
| 1071 </div> | |
| 1072 | |
| 1073 </em> | |
| 1074 </dt> | |
| 1075 <dd class="todo" style="display: none; "> | |
| 1076 Undocumented. | |
| 1077 </dd> | |
| 1078 <dd>Speaking pitch between 0 and 2 inclusive, with 0 being lowest and
2 being highest. 1.0 corresponds to this voice's default pitch.</dd> | |
| 1079 <dd style="display: none; "> | |
| 1080 This parameter was added in version | |
| 1081 <b><span></span></b>. | |
| 1082 You must omit this parameter in earlier versions, | |
| 1083 and you may omit it in any version. If you require this | |
| 1084 parameter, the manifest key | |
| 1085 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 1086 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 1087 </dd> | |
| 1088 | |
| 1089 <!-- OBJECT PROPERTIES --> | |
| 1090 <dd style="display: none; "> | |
| 1091 <dl> | |
| 1092 <div> | |
| 1093 <div> | |
| 1094 </div> | |
| 1095 </div> | |
| 1096 </dl> | |
| 1097 </dd> | |
| 1098 | |
| 1099 <!-- OBJECT METHODS --> | |
| 1100 <dd style="display: none; "> | |
| 1101 <div></div> | |
| 1102 </dd> | |
| 1103 | |
| 1104 <!-- OBJECT EVENT FIELDS --> | |
| 1105 <dd style="display: none; "> | |
| 1106 <div></div> | |
| 1107 </dd> | |
| 1108 | |
| 1109 <!-- FUNCTION PARAMETERS --> | |
| 1110 <dd style="display: none; "> | |
| 1111 <div></div> | |
| 1112 </dd> | |
| 1113 | |
| 1114 </div> | |
| 1115 </div><div> | |
| 1116 <div> | |
| 1117 <dt> | |
| 1118 <var>volume</var> | |
| 1119 <em> | |
| 1120 | |
| 1121 <!-- TYPE --> | |
| 1122 <div style="display:inline"> | |
| 1123 ( | |
| 1124 <span class="optional">optional</span> | |
| 1125 <span class="enum" style="display: none; ">enumerated</span> | |
| 1126 <span id="typeTemplate"> | |
| 1127 <span style="display: none; "> | |
| 1128 <a> Type</a> | |
| 1129 </span> | |
| 1130 <span> | |
| 1131 <span style="display: none; "> | |
| 1132 array of <span><span></span></span> | |
| 1133 </span> | |
| 1134 <span>number</span> | |
| 1135 <span style="display: none; "></span> | |
| 1136 </span> | |
| 1137 </span> | |
| 1138 ) | |
| 1139 </div> | |
| 1140 | |
| 1141 </em> | |
| 1142 </dt> | |
| 1143 <dd class="todo" style="display: none; "> | |
| 1144 Undocumented. | |
| 1145 </dd> | |
| 1146 <dd>Speaking volume between 0 and 1 inclusive, with 0 being lowest and
1 being highest, with a default of 1.0.</dd> | |
| 1147 <dd style="display: none; "> | |
| 1148 This parameter was added in version | |
| 1149 <b><span></span></b>. | |
| 1150 You must omit this parameter in earlier versions, | |
| 1151 and you may omit it in any version. If you require this | |
| 1152 parameter, the manifest key | |
| 1153 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 1154 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 1155 </dd> | |
| 1156 | |
| 1157 <!-- OBJECT PROPERTIES --> | |
| 1158 <dd style="display: none; "> | |
| 1159 <dl> | |
| 1160 <div> | |
| 1161 <div> | |
| 1162 </div> | |
| 1163 </div> | |
| 1164 </dl> | |
| 1165 </dd> | |
| 1166 | |
| 1167 <!-- OBJECT METHODS --> | |
| 1168 <dd style="display: none; "> | |
| 1169 <div></div> | |
| 1170 </dd> | |
| 1171 | |
| 1172 <!-- OBJECT EVENT FIELDS --> | |
| 1173 <dd style="display: none; "> | |
| 1174 <div></div> | |
| 1175 </dd> | |
| 1176 | |
| 1177 <!-- FUNCTION PARAMETERS --> | |
| 1178 <dd style="display: none; "> | |
| 1179 <div></div> | |
| 1180 </dd> | |
| 1181 | |
| 1182 </div> | |
| 1183 </div> | |
| 1184 </dl> | |
| 1185 </dd> | |
| 1186 | |
| 1187 <!-- OBJECT METHODS --> | |
| 1188 <dd style="display: none; "> | |
| 1189 <div></div> | |
| 1190 </dd> | |
| 1191 | |
| 1192 <!-- OBJECT EVENT FIELDS --> | |
| 1193 <dd style="display: none; "> | |
| 1194 <div></div> | |
| 1195 </dd> | |
| 1196 | |
| 1197 <!-- FUNCTION PARAMETERS --> | |
| 1198 <dd style="display: none; "> | |
| 1199 <div></div> | |
| 1200 </dd> | |
| 1201 | |
| 1202 </div> | |
| 1203 </div><div> | |
| 1204 <div> | |
| 1205 <dt> | |
| 1206 <var>sendTtsEvent</var> | |
| 1207 <em> | |
| 1208 | |
| 1209 <!-- TYPE --> | |
| 1210 <div style="display:inline"> | |
| 1211 ( | |
| 1212 <span class="optional" style="display: none; ">optional</spa
n> | |
| 1213 <span class="enum" style="display: none; ">enumerated</span> | |
| 1214 <span id="typeTemplate"> | |
| 1215 <span style="display: none; "> | |
| 1216 <a> Type</a> | |
| 1217 </span> | |
| 1218 <span> | |
| 1219 <span style="display: none; "> | |
| 1220 array of <span><span></span></span> | |
| 1221 </span> | |
| 1222 <span>function</span> | |
| 1223 <span style="display: none; "></span> | |
| 1224 </span> | |
| 1225 </span> | |
| 1226 ) | |
| 1227 </div> | |
| 1228 | |
| 1229 </em> | |
| 1230 </dt> | |
| 1231 <dd class="todo" style="display: none; "> | |
| 1232 Undocumented. | |
| 1233 </dd> | |
| 1234 <dd>Call this function with events that occur in the process of speaki
ng the utterance.</dd> | |
| 1235 <dd style="display: none; "> | |
| 1236 This parameter was added in version | |
| 1237 <b><span></span></b>. | |
| 1238 You must omit this parameter in earlier versions, | |
| 1239 and you may omit it in any version. If you require this | |
| 1240 parameter, the manifest key | |
| 1241 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 1242 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 1243 </dd> | |
| 1244 | |
| 1245 <!-- OBJECT PROPERTIES --> | |
| 1246 <dd style="display: none; "> | |
| 1247 <dl> | |
| 1248 <div> | |
| 1249 <div> | |
| 1250 </div> | |
| 1251 </div> | |
| 1252 </dl> | |
| 1253 </dd> | |
| 1254 | |
| 1255 <!-- OBJECT METHODS --> | |
| 1256 <dd style="display: none; "> | |
| 1257 <div></div> | |
| 1258 </dd> | |
| 1259 | |
| 1260 <!-- OBJECT EVENT FIELDS --> | |
| 1261 <dd style="display: none; "> | |
| 1262 <div></div> | |
| 1263 </dd> | |
| 1264 | |
| 1265 <!-- FUNCTION PARAMETERS --> | |
| 1266 <dd> | |
| 1267 <div> | |
| 1268 <h5>Parameters</h5> | |
| 1269 <dl> | |
| 1270 <div> | |
| 1271 <div> | |
| 1272 <dt> | |
| 1273 <var>event</var> | |
| 1274 <em> | |
| 1275 | |
| 1276 <!-- TYPE --> | |
| 1277 <div style="display:inline"> | |
| 1278 ( | |
| 1279 <span class="optional" style="display: none; ">optional</spa
n> | |
| 1280 <span class="enum" style="display: none; ">enumerated</span> | |
| 1281 <span id="typeTemplate"> | |
| 1282 <span> | |
| 1283 <a href="experimental.tts.html#type-TtsEvent">TtsEvent</
a> | |
| 1284 </span> | |
| 1285 <span style="display: none; "> | |
| 1286 <span> | |
| 1287 array of <span><span></span></span> | |
| 1288 </span> | |
| 1289 <span>paramType</span> | |
| 1290 <span></span> | |
| 1291 </span> | |
| 1292 </span> | |
| 1293 ) | |
| 1294 </div> | |
| 1295 | |
| 1296 </em> | |
| 1297 </dt> | |
| 1298 <dd class="todo" style="display: none; "> | |
| 1299 Undocumented. | |
| 1300 </dd> | |
| 1301 <dd>The event from the text-to-speech engine indicating the status of
this utterance.</dd> | |
| 1302 <dd style="display: none; "> | |
| 1303 This parameter was added in version | |
| 1304 <b><span></span></b>. | |
| 1305 You must omit this parameter in earlier versions, | |
| 1306 and you may omit it in any version. If you require this | |
| 1307 parameter, the manifest key | |
| 1308 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> | |
| 1309 can ensure that your extension won't be run in an earlier browser ve
rsion. | |
| 1310 </dd> | |
| 1311 | |
| 1312 <!-- OBJECT PROPERTIES --> | |
| 1313 <dd style="display: none; "> | |
| 1314 <dl> | |
| 1315 <div> | |
| 1316 <div> | |
| 1317 </div> | |
| 1318 </div> | |
| 1319 </dl> | |
| 1320 </dd> | |
| 1321 | |
| 1322 <!-- OBJECT METHODS --> | |
| 1323 <dd style="display: none; "> | |
| 1324 <div></div> | |
| 1325 </dd> | |
| 1326 | |
| 1327 <!-- OBJECT EVENT FIELDS --> | |
| 1328 <dd style="display: none; "> | |
| 1329 <div></div> | |
| 1330 </dd> | |
| 1331 | |
| 1332 <!-- FUNCTION PARAMETERS --> | |
| 1333 <dd style="display: none; "> | |
| 1334 <div></div> | |
| 1335 </dd> | |
| 1336 | |
| 1337 </div> | |
| 1338 </div> | |
| 1339 </dl> | |
| 1340 </div> | |
| 1341 </dd> | |
| 1342 | |
| 1343 </div> | |
| 1344 </div> | |
| 1345 </dl> | |
| 1346 </div> | |
| 1347 | |
| 1348 <!-- EXTRA PARAMETERS --> | |
| 1349 <div style="display: none; "> | |
| 1350 <h4>Extra parameters to addListener</h4> | |
| 1351 <dl> | |
| 1352 <div> | |
| 1353 <div> | |
| 1354 </div> | |
| 1355 </div> | |
| 1356 </dl> | |
| 1357 </div> | |
| 1358 | |
| 1359 <!-- LISTENER RETURN VALUE --> | |
| 1360 <h4 style="display: none; ">Listener returns</h4> | |
| 1361 <dl> | |
| 1362 <div style="display: none; "> | |
| 1363 <div> | |
| 1364 </div> | |
| 1365 </div> | |
| 1366 </dl> | |
| 1367 | |
| 1368 </div> <!-- /description --> | |
| 1369 </div><div class="apiItem"> | |
| 1370 <a name="event-onStop"></a> | |
| 1371 <h4>onStop</h4> | |
| 1372 | |
| 1373 <div class="summary"> | |
| 1374 <!-- Note: intentionally longer 80 columns --> | |
| 1375 <span class="subdued">chrome.experimental.ttsEngine.</span><span
>onStop</span><span class="subdued">.addListener</span>(function(<span></span>)
<span class="subdued">{...}</span><span></span>)); | |
| 1376 </div> | |
| 1377 | |
| 1378 <div class="description"> | |
| 1379 <p class="todo" style="display: none; ">Undocumented.</p> | |
| 1380 <p>Fired when a call is made to tts.stop and this extension may
be in the middle of speaking. If an extension receives a call to onStop and spee
ch is already stopped, it should do nothing (not raise an error).</p> | |
| 1381 | |
| 1382 <!-- LISTENER PARAMETERS --> | |
| 1383 <div style="display: none; "> | |
| 1384 <h4>Listener parameters</h4> | |
| 1385 <dl> | |
| 1386 <div> | |
| 1387 <div> | |
| 1388 </div> | |
| 1389 </div> | |
| 1390 </dl> | |
| 1391 </div> | |
| 1392 | |
| 1393 <!-- EXTRA PARAMETERS --> | |
| 1394 <div style="display: none; "> | |
| 1395 <h4>Extra parameters to addListener</h4> | |
| 1396 <dl> | |
| 1397 <div> | |
| 1398 <div> | |
| 1399 </div> | |
| 1400 </div> | |
| 1401 </dl> | |
| 1402 </div> | |
| 1403 | |
| 1404 <!-- LISTENER RETURN VALUE --> | |
| 1405 <h4 style="display: none; ">Listener returns</h4> | |
| 1406 <dl> | |
| 1407 <div style="display: none; "> | |
| 1408 <div> | |
| 1409 </div> | |
| 1410 </div> | |
| 1411 </dl> | |
| 1412 | |
| 1413 </div> <!-- /description --> | |
| 1414 </div> <!-- /apiItem --> | |
| 1415 | |
| 1416 </div> <!-- /apiGroup --> | |
| 1417 | |
| 1418 <!-- TYPES --> | |
| 1419 <div class="apiGroup" style="display: none; "> | |
| 1420 <a name="types"></a> | |
| 1421 <h3 id="types">Types</h3> | |
| 1422 | |
| 1423 <!-- iterates over all types --> | |
| 1424 <div class="apiItem"> | |
| 1425 <a></a> | |
| 1426 <h4>type name</h4> | |
| 1427 | |
| 1428 <div> | |
| 1429 </div> | |
| 1430 | |
| 1431 </div> <!-- /apiItem --> | |
| 1432 | |
| 1433 </div> <!-- /apiGroup --> | |
| 1434 | |
| 1435 </div> <!-- /apiPage --> | |
| 1436 </div> <!-- /gc-pagecontent --> | |
| 1437 </div> <!-- /g-section --> | |
| 1438 </div> <!-- /codesiteContent --> | |
| 1439 <div id="gc-footer" --=""> | |
| 1440 <div class="text"> | |
| 1441 <p> | |
| 1442 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
| 1443 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
| 1444 Attribution 3.0 License</a>, and code samples are licensed under the | |
| 1445 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
| 1446 </p> | |
| 1447 <p> | |
| 1448 ©2011 Google | |
| 1449 </p> | |
| 1450 | |
| 1451 <!-- begin analytics --> | |
| 1452 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"><
/script> | |
| 1453 <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></scr
ipt> | |
| 1454 | |
| 1455 <script type="text/javascript"> | |
| 1456 // chrome doc tracking | |
| 1457 try { | |
| 1458 var engdocs = _gat._getTracker("YT-10763712-2"); | |
| 1459 engdocs._trackPageview(); | |
| 1460 } catch(err) {} | |
| 1461 | |
| 1462 // code.google.com site-wide tracking | |
| 1463 try { | |
| 1464 _uacct="UA-18071-1"; | |
| 1465 _uanchor=1; | |
| 1466 _uff=0; | |
| 1467 urchinTracker(); | |
| 1468 } | |
| 1469 catch(e) {/* urchinTracker not available. */} | |
| 1470 </script> | |
| 1471 <!-- end analytics --> | |
| 1472 </div> | |
| 1473 </div> <!-- /gc-footer --> | |
| 1474 </div> <!-- /gc-container --> | |
| 1475 </body></html> | |
| OLD | NEW |