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.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.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.ttsEngine</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> |
| 305 <a href="#event-onSpeak">onSpeak</a> |
| 306 </li><li> |
| 307 <a href="#event-onStop">onStop</a> |
| 308 </li> |
| 309 </ol> |
| 310 </li> |
| 311 <li style="display: none; "> |
| 312 <a href="#types">Types</a> |
| 313 <ol> |
| 314 <li> |
| 315 <a href="#id-anchor">id</a> |
| 316 </li> |
| 317 </ol> |
| 318 </li> |
| 319 </ol> |
| 320 </li> |
| 321 </ol> |
| 322 </div> |
| 323 <!-- /TABLE OF CONTENTS --> |
| 324 |
| 325 <!-- Standard content lead-in for experimental API pages --> |
| 326 <p id="classSummary" style="display: none; "> |
| 327 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 328 </p> |
| 329 |
| 330 <!-- STATIC CONTENT PLACEHOLDER --> |
| 331 <div id="static"><p id="classSummary"> |
| 332 Use the <code>chrome.ttsEngine</code> module to |
| 333 implement a text-to-speech (TTS) engine using an extension. If your |
| 334 extension registers using this API, it will receive events containing |
| 335 an utterance to be spoken and other parameters when any extension or packaged |
| 336 app uses the |
| 337 <a href="tts.html">tts</a> |
| 338 module to generate speech. Your extension can then use any available |
| 339 web technology to synthesize and output the speech, and send events back |
| 340 to the calling function to report the status. |
| 341 </p> |
| 342 |
| 343 <p class="note"><b>Give us feedback:</b> If you have suggestions, |
| 344 especially changes that should be made before stabilizing the first |
| 345 version of this API, please send your ideas to the |
| 346 <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions">chro
mium-extensions</a> |
| 347 group.</p> |
| 348 |
| 349 <h2 id="overview">Overview</h2> |
| 350 |
| 351 <p>An extension can register itself as a speech engine. By doing so, it |
| 352 can intercept some or all calls to functions such as |
| 353 <a href="tts.html#method-speak"><code>speak()</code></a> and |
| 354 <a href="tts.html#method-stop"><code>stop()</code></a> |
| 355 and provide an alternate implementation. |
| 356 Extensions are free to use any available web technology |
| 357 to provide speech, including streaming audio from a server, HTML5 audio, |
| 358 Native Client, or Flash. An extension could even do something different |
| 359 with the utterances, like display closed captions in a pop-up window or |
| 360 send them as log messages to a remote server.</p> |
| 361 |
| 362 <h2 id="manifest">Manifest</h2> |
| 363 |
| 364 <p>To implement a TTS engine, an extension must |
| 365 declare the "ttsEngine" permission and then declare all voices |
| 366 it provides in the extension manifest, like this:</p> |
| 367 |
| 368 <pre>{ |
| 369 "name": "My TTS Engine", |
| 370 "version": "1.0", |
| 371 <b>"permissions": ["ttsEngine"], |
| 372 "tts_engine": { |
| 373 "voices": [ |
| 374 { |
| 375 "voice_name": "Alice", |
| 376 "lang": "en-US", |
| 377 "gender": "female", |
| 378 "event_types": ["start", "marker", "end"] |
| 379 }, |
| 380 { |
| 381 "voice_name": "Pat", |
| 382 "lang": "en-US", |
| 383 "event_types": ["end"] |
| 384 } |
| 385 ] |
| 386 },</b> |
| 387 "background_page": "background.html", |
| 388 }</pre> |
| 389 |
| 390 <p>An extension can specify any number of voices.</p> |
| 391 |
| 392 <p>The <code>voice_name</code> parameter is required. The name should be |
| 393 descriptive enough that it identifies the name of the voice and the |
| 394 engine used. In the unlikely event that two extensions register voices |
| 395 with the same name, a client can specify the ID of the extension that |
| 396 should do the synthesis.</p> |
| 397 |
| 398 <p>The <code>gender</code> parameter is optional. If your voice corresponds |
| 399 to a male or female voice, you can use this parameter to help clients |
| 400 choose the most appropriate voice for their application.</p> |
| 401 |
| 402 <p>The <code>lang</code> parameter is optional, but highly recommended. |
| 403 Almost always, a voice can synthesize speech in just a single language. |
| 404 When an engine supports more than one language, it can easily register a |
| 405 separate voice for each language. Under rare circumstances where a single |
| 406 voice can handle more than one language, it's easiest to just list two |
| 407 separate voices and handle them using the same logic internally. However, |
| 408 if you want to create a voice that will handle utterances in any language, |
| 409 leave out the <code>lang</code> parameter from your extension's manifest.</p> |
| 410 |
| 411 <p>Finally, the <code>event_types</code> parameter is required if the engine can |
| 412 send events to update the client on the progress of speech synthesis. |
| 413 At a minimum, supporting the <code>'end'</code> event type to indicate |
| 414 when speech is finished is highly recommended, otherwise Chrome cannot |
| 415 schedule queued utterances.</p> |
| 416 |
| 417 <p class="note"> |
| 418 <strong>Note:</strong> If your TTS engine does not support |
| 419 the <code>'end'</code> event type, Chrome cannot queue utterances |
| 420 because it has no way of knowing when your utterance has finished. To |
| 421 help mitigate this, Chrome passes an additional boolean <code>enqueue</code> |
| 422 option to your engine's onSpeak handler, giving you the option of |
| 423 implementing your own queueing. This is discouraged because then |
| 424 clients are unable to queue utterances that should get spoken by different |
| 425 speech engines.</p> |
| 426 |
| 427 <p>The possible event types that you can send correspond to the event types |
| 428 that the <code>speak()</code> method receives:</p> |
| 429 |
| 430 <ul> |
| 431 <li><code>'start'</code>: The engine has started speaking the utterance. |
| 432 </li><li><code>'word'</code>: A word boundary was reached. Use |
| 433 <code>event.charIndex</code> to determine the current speech |
| 434 position. |
| 435 </li><li><code>'sentence'</code>: A sentence boundary was reached. Use |
| 436 <code>event.charIndex</code> to determine the current speech |
| 437 position. |
| 438 </li><li><code>'marker'</code>: An SSML marker was reached. Use |
| 439 <code>event.charIndex</code> to determine the current speech |
| 440 position. |
| 441 </li><li><code>'end'</code>: The engine has finished speaking the utterance. |
| 442 </li><li><code>'error'</code>: An engine-specific error occurred and |
| 443 this utterance cannot be spoken. |
| 444 Pass more information in <code>event.errorMessage</code>. |
| 445 </li></ul> |
| 446 |
| 447 <p>The <code>'interrupted'</code> and <code>'cancelled'</code> events are |
| 448 not sent by the speech engine; they are generated automatically by Chrome.</p> |
| 449 |
| 450 <p>Text-to-speech clients can get the voice information from your |
| 451 extension's manifest by calling |
| 452 <a href="tts.html#method-getVoices">getVoices()</a>, |
| 453 assuming you've registered speech event listeners as described below.</p> |
| 454 |
| 455 <h2 id="handling_speech_events">Handling speech events</h2> |
| 456 |
| 457 <p>To generate speech at the request of clients, your extension must |
| 458 register listeners for both <code>onSpeak</code> and <code>onStop</code>, |
| 459 like this:</p> |
| 460 |
| 461 <pre>var speakListener = function(utterance, options, sendTtsEvent) { |
| 462 sendTtsEvent({'event_type': 'start', 'charIndex': 0}) |
| 463 |
| 464 // (start speaking) |
| 465 |
| 466 sendTtsEvent({'event_type': 'end', 'charIndex': utterance.length}) |
| 467 }; |
| 468 |
| 469 var stopListener = function() { |
| 470 // (stop all speech) |
| 471 }; |
| 472 |
| 473 chrome.ttsEngine.onSpeak.addListener(speakListener); |
| 474 chrome.ttsEngine.onStop.addListener(stopListener);</pre> |
| 475 |
| 476 <p class="warning"> |
| 477 <b>Important:</b> |
| 478 If your extension does not register listeners for both |
| 479 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any |
| 480 speech calls, regardless of what is in the manifest.</p> |
| 481 |
| 482 <p>The decision of whether or not to send a given speech request to an |
| 483 extension is based solely on whether the extension supports the given voice |
| 484 parameters in its manifest and has registered listeners |
| 485 for <code>onSpeak</code> and <code>onStop</code>. In other words, |
| 486 there's no way for an extension to receive a speech request and |
| 487 dynamically decide whether to handle it.</p> |
| 488 </div> |
| 489 |
| 490 <!-- API PAGE --> |
| 491 <div class="apiPage"> |
| 492 <a name="apiReference"></a> |
| 493 <h2>API reference: chrome.ttsEngine</h2> |
| 494 |
| 495 <!-- PROPERTIES --> |
| 496 <div class="apiGroup" style="display: none; "> |
| 497 <a name="properties"></a> |
| 498 <h3 id="properties">Properties</h3> |
| 499 |
| 500 <div> |
| 501 <a></a> |
| 502 <h4>getLastError</h4> |
| 503 <div class="summary"> |
| 504 <!-- Note: intentionally longer 80 columns --> |
| 505 <span>chrome.extension</span><span>lastError</span> |
| 506 </div> |
| 507 <div> |
| 508 </div> |
| 509 </div> |
| 510 |
| 511 </div> <!-- /apiGroup --> |
| 512 |
| 513 <!-- METHODS --> |
| 514 <div id="methodsTemplate" class="apiGroup"> |
| 515 <a name="global-methods"></a> |
| 516 <h3>Methods</h3> |
| 517 |
| 518 <!-- iterates over all functions --> |
| 519 <div class="apiItem" style="display: none; "> |
| 520 <a></a> <!-- method-anchor --> |
| 521 <h4>method name</h4> |
| 522 |
| 523 <div class="summary"><span>void</span> |
| 524 <!-- Note: intentionally longer 80 columns --> |
| 525 <span>chrome.module.methodName</span>(<span><span>, </span><sp
an></span> |
| 526 <var><span></span></var></span>)</div> |
| 527 |
| 528 <div class="description"> |
| 529 <p class="todo">Undocumented.</p> |
| 530 <p> |
| 531 A description from the json schema def of the function goes he
re. |
| 532 </p> |
| 533 |
| 534 <!-- PARAMETERS --> |
| 535 <h4>Parameters</h4> |
| 536 <dl> |
| 537 <div> |
| 538 <div> |
| 539 </div> |
| 540 </div> |
| 541 </dl> |
| 542 |
| 543 <!-- RETURNS --> |
| 544 <h4>Returns</h4> |
| 545 <dl> |
| 546 <div> |
| 547 <div> |
| 548 </div> |
| 549 </div> |
| 550 </dl> |
| 551 |
| 552 <!-- CALLBACK --> |
| 553 <div> |
| 554 <div> |
| 555 <h4>Callback function</h4> |
| 556 <p> |
| 557 The callback <em>parameter</em> should specify a function |
| 558 that looks like this: |
| 559 </p> |
| 560 <p> |
| 561 If you specify the <em>callback</em> parameter, it should |
| 562 specify a function that looks like this: |
| 563 </p> |
| 564 |
| 565 <!-- Note: intentionally longer 80 columns --> |
| 566 <pre>function(<span>Type param1, Type param2</span>) <span cla
ss="subdued">{...}</span>;</pre> |
| 567 <dl> |
| 568 <div> |
| 569 <div> |
| 570 </div> |
| 571 </div> |
| 572 </dl> |
| 573 </div> |
| 574 </div> |
| 575 |
| 576 <!-- MIN_VERSION --> |
| 577 <p> |
| 578 This function was added in version <b><span></span></b>. |
| 579 If you require this function, the manifest key |
| 580 <a href="manifest.html#minimum_chrome_version">minimum_chrome_
version</a> |
| 581 can ensure that your extension won't be run in an earlier brow
ser version. |
| 582 </p> |
| 583 </div> <!-- /description --> |
| 584 |
| 585 </div> <!-- /apiItem --> |
| 586 |
| 587 </div> <!-- /apiGroup --> |
| 588 |
| 589 <!-- EVENTS --> |
| 590 <div id="eventsTemplate" class="apiGroup"> |
| 591 <a name="global-events"></a> |
| 592 <h3>Events</h3> |
| 593 <!-- iterates over all events --> |
| 594 <div class="apiItem"> |
| 595 <a name="event-onSpeak"></a> |
| 596 <h4>onSpeak</h4> |
| 597 |
| 598 <div class="summary"> |
| 599 <!-- Note: intentionally longer 80 columns --> |
| 600 <span class="subdued">chrome.ttsEngine.</span><span>onSpeak</spa
n><span class="subdued">.addListener</span>(function(<span>string utterance, obj
ect options, function sendTtsEvent</span>) <span class="subdued">{...}</span><sp
an></span>)); |
| 601 </div> |
| 602 |
| 603 <div class="description"> |
| 604 <p class="todo" style="display: none; ">Undocumented.</p> |
| 605 <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> |
| 606 |
| 607 <!-- LISTENER PARAMETERS --> |
| 608 <div> |
| 609 <h4>Listener parameters</h4> |
| 610 <dl> |
| 611 <div> |
| 612 <div> |
| 613 <dt> |
| 614 <var>utterance</var> |
| 615 <em> |
| 616 |
| 617 <!-- TYPE --> |
| 618 <div style="display:inline"> |
| 619 ( |
| 620 <span class="optional" style="display: none; ">optional</spa
n> |
| 621 <span class="enum" style="display: none; ">enumerated</span> |
| 622 <span id="typeTemplate"> |
| 623 <span style="display: none; "> |
| 624 <a> Type</a> |
| 625 </span> |
| 626 <span> |
| 627 <span style="display: none; "> |
| 628 array of <span><span></span></span> |
| 629 </span> |
| 630 <span>string</span> |
| 631 <span style="display: none; "></span> |
| 632 </span> |
| 633 </span> |
| 634 ) |
| 635 </div> |
| 636 |
| 637 </em> |
| 638 </dt> |
| 639 <dd class="todo" style="display: none; "> |
| 640 Undocumented. |
| 641 </dd> |
| 642 <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> |
| 643 <dd style="display: none; "> |
| 644 This parameter was added in version |
| 645 <b><span></span></b>. |
| 646 You must omit this parameter in earlier versions, |
| 647 and you may omit it in any version. If you require this |
| 648 parameter, the manifest key |
| 649 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 650 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 651 </dd> |
| 652 |
| 653 <!-- OBJECT PROPERTIES --> |
| 654 <dd style="display: none; "> |
| 655 <dl> |
| 656 <div> |
| 657 <div> |
| 658 </div> |
| 659 </div> |
| 660 </dl> |
| 661 </dd> |
| 662 |
| 663 <!-- OBJECT METHODS --> |
| 664 <dd style="display: none; "> |
| 665 <div></div> |
| 666 </dd> |
| 667 |
| 668 <!-- OBJECT EVENT FIELDS --> |
| 669 <dd style="display: none; "> |
| 670 <div></div> |
| 671 </dd> |
| 672 |
| 673 <!-- FUNCTION PARAMETERS --> |
| 674 <dd style="display: none; "> |
| 675 <div></div> |
| 676 </dd> |
| 677 |
| 678 </div> |
| 679 </div><div> |
| 680 <div> |
| 681 <dt> |
| 682 <var>options</var> |
| 683 <em> |
| 684 |
| 685 <!-- TYPE --> |
| 686 <div style="display:inline"> |
| 687 ( |
| 688 <span class="optional" style="display: none; ">optional</spa
n> |
| 689 <span class="enum" style="display: none; ">enumerated</span> |
| 690 <span id="typeTemplate"> |
| 691 <span style="display: none; "> |
| 692 <a> Type</a> |
| 693 </span> |
| 694 <span> |
| 695 <span style="display: none; "> |
| 696 array of <span><span></span></span> |
| 697 </span> |
| 698 <span>object</span> |
| 699 <span style="display: none; "></span> |
| 700 </span> |
| 701 </span> |
| 702 ) |
| 703 </div> |
| 704 |
| 705 </em> |
| 706 </dt> |
| 707 <dd class="todo" style="display: none; "> |
| 708 Undocumented. |
| 709 </dd> |
| 710 <dd>Options specified to the tts.speak() method.</dd> |
| 711 <dd style="display: none; "> |
| 712 This parameter was added in version |
| 713 <b><span></span></b>. |
| 714 You must omit this parameter in earlier versions, |
| 715 and you may omit it in any version. If you require this |
| 716 parameter, the manifest key |
| 717 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 718 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 719 </dd> |
| 720 |
| 721 <!-- OBJECT PROPERTIES --> |
| 722 <dd> |
| 723 <dl> |
| 724 <div> |
| 725 <div> |
| 726 <dt> |
| 727 <var>voiceName</var> |
| 728 <em> |
| 729 |
| 730 <!-- TYPE --> |
| 731 <div style="display:inline"> |
| 732 ( |
| 733 <span class="optional">optional</span> |
| 734 <span class="enum" style="display: none; ">enumerated</span> |
| 735 <span id="typeTemplate"> |
| 736 <span style="display: none; "> |
| 737 <a> Type</a> |
| 738 </span> |
| 739 <span> |
| 740 <span style="display: none; "> |
| 741 array of <span><span></span></span> |
| 742 </span> |
| 743 <span>string</span> |
| 744 <span style="display: none; "></span> |
| 745 </span> |
| 746 </span> |
| 747 ) |
| 748 </div> |
| 749 |
| 750 </em> |
| 751 </dt> |
| 752 <dd class="todo" style="display: none; "> |
| 753 Undocumented. |
| 754 </dd> |
| 755 <dd>The name of the voice to use for synthesis.</dd> |
| 756 <dd style="display: none; "> |
| 757 This parameter was added in version |
| 758 <b><span></span></b>. |
| 759 You must omit this parameter in earlier versions, |
| 760 and you may omit it in any version. If you require this |
| 761 parameter, the manifest key |
| 762 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 763 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 764 </dd> |
| 765 |
| 766 <!-- OBJECT PROPERTIES --> |
| 767 <dd style="display: none; "> |
| 768 <dl> |
| 769 <div> |
| 770 <div> |
| 771 </div> |
| 772 </div> |
| 773 </dl> |
| 774 </dd> |
| 775 |
| 776 <!-- OBJECT METHODS --> |
| 777 <dd style="display: none; "> |
| 778 <div></div> |
| 779 </dd> |
| 780 |
| 781 <!-- OBJECT EVENT FIELDS --> |
| 782 <dd style="display: none; "> |
| 783 <div></div> |
| 784 </dd> |
| 785 |
| 786 <!-- FUNCTION PARAMETERS --> |
| 787 <dd style="display: none; "> |
| 788 <div></div> |
| 789 </dd> |
| 790 |
| 791 </div> |
| 792 </div><div> |
| 793 <div> |
| 794 <dt> |
| 795 <var>lang</var> |
| 796 <em> |
| 797 |
| 798 <!-- TYPE --> |
| 799 <div style="display:inline"> |
| 800 ( |
| 801 <span class="optional">optional</span> |
| 802 <span class="enum" style="display: none; ">enumerated</span> |
| 803 <span id="typeTemplate"> |
| 804 <span style="display: none; "> |
| 805 <a> Type</a> |
| 806 </span> |
| 807 <span> |
| 808 <span style="display: none; "> |
| 809 array of <span><span></span></span> |
| 810 </span> |
| 811 <span>string</span> |
| 812 <span style="display: none; "></span> |
| 813 </span> |
| 814 </span> |
| 815 ) |
| 816 </div> |
| 817 |
| 818 </em> |
| 819 </dt> |
| 820 <dd class="todo" style="display: none; "> |
| 821 Undocumented. |
| 822 </dd> |
| 823 <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> |
| 824 <dd style="display: none; "> |
| 825 This parameter was added in version |
| 826 <b><span></span></b>. |
| 827 You must omit this parameter in earlier versions, |
| 828 and you may omit it in any version. If you require this |
| 829 parameter, the manifest key |
| 830 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 831 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 832 </dd> |
| 833 |
| 834 <!-- OBJECT PROPERTIES --> |
| 835 <dd style="display: none; "> |
| 836 <dl> |
| 837 <div> |
| 838 <div> |
| 839 </div> |
| 840 </div> |
| 841 </dl> |
| 842 </dd> |
| 843 |
| 844 <!-- OBJECT METHODS --> |
| 845 <dd style="display: none; "> |
| 846 <div></div> |
| 847 </dd> |
| 848 |
| 849 <!-- OBJECT EVENT FIELDS --> |
| 850 <dd style="display: none; "> |
| 851 <div></div> |
| 852 </dd> |
| 853 |
| 854 <!-- FUNCTION PARAMETERS --> |
| 855 <dd style="display: none; "> |
| 856 <div></div> |
| 857 </dd> |
| 858 |
| 859 </div> |
| 860 </div><div> |
| 861 <div> |
| 862 <dt> |
| 863 <var>gender</var> |
| 864 <em> |
| 865 |
| 866 <!-- TYPE --> |
| 867 <div style="display:inline"> |
| 868 ( |
| 869 <span class="optional">optional</span> |
| 870 <span class="enum">enumerated</span> |
| 871 <span id="typeTemplate"> |
| 872 <span style="display: none; "> |
| 873 <a> Type</a> |
| 874 </span> |
| 875 <span> |
| 876 <span style="display: none; "> |
| 877 array of <span><span></span></span> |
| 878 </span> |
| 879 <span>string</span> |
| 880 <span>["male", "female"]</span> |
| 881 </span> |
| 882 </span> |
| 883 ) |
| 884 </div> |
| 885 |
| 886 </em> |
| 887 </dt> |
| 888 <dd class="todo" style="display: none; "> |
| 889 Undocumented. |
| 890 </dd> |
| 891 <dd>Gender of voice for synthesized speech.</dd> |
| 892 <dd style="display: none; "> |
| 893 This parameter was added in version |
| 894 <b><span></span></b>. |
| 895 You must omit this parameter in earlier versions, |
| 896 and you may omit it in any version. If you require this |
| 897 parameter, the manifest key |
| 898 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 899 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 900 </dd> |
| 901 |
| 902 <!-- OBJECT PROPERTIES --> |
| 903 <dd style="display: none; "> |
| 904 <dl> |
| 905 <div> |
| 906 <div> |
| 907 </div> |
| 908 </div> |
| 909 </dl> |
| 910 </dd> |
| 911 |
| 912 <!-- OBJECT METHODS --> |
| 913 <dd style="display: none; "> |
| 914 <div></div> |
| 915 </dd> |
| 916 |
| 917 <!-- OBJECT EVENT FIELDS --> |
| 918 <dd style="display: none; "> |
| 919 <div></div> |
| 920 </dd> |
| 921 |
| 922 <!-- FUNCTION PARAMETERS --> |
| 923 <dd style="display: none; "> |
| 924 <div></div> |
| 925 </dd> |
| 926 |
| 927 </div> |
| 928 </div><div> |
| 929 <div> |
| 930 <dt> |
| 931 <var>rate</var> |
| 932 <em> |
| 933 |
| 934 <!-- TYPE --> |
| 935 <div style="display:inline"> |
| 936 ( |
| 937 <span class="optional">optional</span> |
| 938 <span class="enum" style="display: none; ">enumerated</span> |
| 939 <span id="typeTemplate"> |
| 940 <span style="display: none; "> |
| 941 <a> Type</a> |
| 942 </span> |
| 943 <span> |
| 944 <span style="display: none; "> |
| 945 array of <span><span></span></span> |
| 946 </span> |
| 947 <span>number</span> |
| 948 <span style="display: none; "></span> |
| 949 </span> |
| 950 </span> |
| 951 ) |
| 952 </div> |
| 953 |
| 954 </em> |
| 955 </dt> |
| 956 <dd class="todo" style="display: none; "> |
| 957 Undocumented. |
| 958 </dd> |
| 959 <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> |
| 960 <dd style="display: none; "> |
| 961 This parameter was added in version |
| 962 <b><span></span></b>. |
| 963 You must omit this parameter in earlier versions, |
| 964 and you may omit it in any version. If you require this |
| 965 parameter, the manifest key |
| 966 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 967 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 968 </dd> |
| 969 |
| 970 <!-- OBJECT PROPERTIES --> |
| 971 <dd style="display: none; "> |
| 972 <dl> |
| 973 <div> |
| 974 <div> |
| 975 </div> |
| 976 </div> |
| 977 </dl> |
| 978 </dd> |
| 979 |
| 980 <!-- OBJECT METHODS --> |
| 981 <dd style="display: none; "> |
| 982 <div></div> |
| 983 </dd> |
| 984 |
| 985 <!-- OBJECT EVENT FIELDS --> |
| 986 <dd style="display: none; "> |
| 987 <div></div> |
| 988 </dd> |
| 989 |
| 990 <!-- FUNCTION PARAMETERS --> |
| 991 <dd style="display: none; "> |
| 992 <div></div> |
| 993 </dd> |
| 994 |
| 995 </div> |
| 996 </div><div> |
| 997 <div> |
| 998 <dt> |
| 999 <var>pitch</var> |
| 1000 <em> |
| 1001 |
| 1002 <!-- TYPE --> |
| 1003 <div style="display:inline"> |
| 1004 ( |
| 1005 <span class="optional">optional</span> |
| 1006 <span class="enum" style="display: none; ">enumerated</span> |
| 1007 <span id="typeTemplate"> |
| 1008 <span style="display: none; "> |
| 1009 <a> Type</a> |
| 1010 </span> |
| 1011 <span> |
| 1012 <span style="display: none; "> |
| 1013 array of <span><span></span></span> |
| 1014 </span> |
| 1015 <span>number</span> |
| 1016 <span style="display: none; "></span> |
| 1017 </span> |
| 1018 </span> |
| 1019 ) |
| 1020 </div> |
| 1021 |
| 1022 </em> |
| 1023 </dt> |
| 1024 <dd class="todo" style="display: none; "> |
| 1025 Undocumented. |
| 1026 </dd> |
| 1027 <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> |
| 1028 <dd style="display: none; "> |
| 1029 This parameter was added in version |
| 1030 <b><span></span></b>. |
| 1031 You must omit this parameter in earlier versions, |
| 1032 and you may omit it in any version. If you require this |
| 1033 parameter, the manifest key |
| 1034 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1035 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1036 </dd> |
| 1037 |
| 1038 <!-- OBJECT PROPERTIES --> |
| 1039 <dd style="display: none; "> |
| 1040 <dl> |
| 1041 <div> |
| 1042 <div> |
| 1043 </div> |
| 1044 </div> |
| 1045 </dl> |
| 1046 </dd> |
| 1047 |
| 1048 <!-- OBJECT METHODS --> |
| 1049 <dd style="display: none; "> |
| 1050 <div></div> |
| 1051 </dd> |
| 1052 |
| 1053 <!-- OBJECT EVENT FIELDS --> |
| 1054 <dd style="display: none; "> |
| 1055 <div></div> |
| 1056 </dd> |
| 1057 |
| 1058 <!-- FUNCTION PARAMETERS --> |
| 1059 <dd style="display: none; "> |
| 1060 <div></div> |
| 1061 </dd> |
| 1062 |
| 1063 </div> |
| 1064 </div><div> |
| 1065 <div> |
| 1066 <dt> |
| 1067 <var>volume</var> |
| 1068 <em> |
| 1069 |
| 1070 <!-- TYPE --> |
| 1071 <div style="display:inline"> |
| 1072 ( |
| 1073 <span class="optional">optional</span> |
| 1074 <span class="enum" style="display: none; ">enumerated</span> |
| 1075 <span id="typeTemplate"> |
| 1076 <span style="display: none; "> |
| 1077 <a> Type</a> |
| 1078 </span> |
| 1079 <span> |
| 1080 <span style="display: none; "> |
| 1081 array of <span><span></span></span> |
| 1082 </span> |
| 1083 <span>number</span> |
| 1084 <span style="display: none; "></span> |
| 1085 </span> |
| 1086 </span> |
| 1087 ) |
| 1088 </div> |
| 1089 |
| 1090 </em> |
| 1091 </dt> |
| 1092 <dd class="todo" style="display: none; "> |
| 1093 Undocumented. |
| 1094 </dd> |
| 1095 <dd>Speaking volume between 0 and 1 inclusive, with 0 being lowest and
1 being highest, with a default of 1.0.</dd> |
| 1096 <dd style="display: none; "> |
| 1097 This parameter was added in version |
| 1098 <b><span></span></b>. |
| 1099 You must omit this parameter in earlier versions, |
| 1100 and you may omit it in any version. If you require this |
| 1101 parameter, the manifest key |
| 1102 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1103 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1104 </dd> |
| 1105 |
| 1106 <!-- OBJECT PROPERTIES --> |
| 1107 <dd style="display: none; "> |
| 1108 <dl> |
| 1109 <div> |
| 1110 <div> |
| 1111 </div> |
| 1112 </div> |
| 1113 </dl> |
| 1114 </dd> |
| 1115 |
| 1116 <!-- OBJECT METHODS --> |
| 1117 <dd style="display: none; "> |
| 1118 <div></div> |
| 1119 </dd> |
| 1120 |
| 1121 <!-- OBJECT EVENT FIELDS --> |
| 1122 <dd style="display: none; "> |
| 1123 <div></div> |
| 1124 </dd> |
| 1125 |
| 1126 <!-- FUNCTION PARAMETERS --> |
| 1127 <dd style="display: none; "> |
| 1128 <div></div> |
| 1129 </dd> |
| 1130 |
| 1131 </div> |
| 1132 </div> |
| 1133 </dl> |
| 1134 </dd> |
| 1135 |
| 1136 <!-- OBJECT METHODS --> |
| 1137 <dd style="display: none; "> |
| 1138 <div></div> |
| 1139 </dd> |
| 1140 |
| 1141 <!-- OBJECT EVENT FIELDS --> |
| 1142 <dd style="display: none; "> |
| 1143 <div></div> |
| 1144 </dd> |
| 1145 |
| 1146 <!-- FUNCTION PARAMETERS --> |
| 1147 <dd style="display: none; "> |
| 1148 <div></div> |
| 1149 </dd> |
| 1150 |
| 1151 </div> |
| 1152 </div><div> |
| 1153 <div> |
| 1154 <dt> |
| 1155 <var>sendTtsEvent</var> |
| 1156 <em> |
| 1157 |
| 1158 <!-- TYPE --> |
| 1159 <div style="display:inline"> |
| 1160 ( |
| 1161 <span class="optional" style="display: none; ">optional</spa
n> |
| 1162 <span class="enum" style="display: none; ">enumerated</span> |
| 1163 <span id="typeTemplate"> |
| 1164 <span style="display: none; "> |
| 1165 <a> Type</a> |
| 1166 </span> |
| 1167 <span> |
| 1168 <span style="display: none; "> |
| 1169 array of <span><span></span></span> |
| 1170 </span> |
| 1171 <span>function</span> |
| 1172 <span style="display: none; "></span> |
| 1173 </span> |
| 1174 </span> |
| 1175 ) |
| 1176 </div> |
| 1177 |
| 1178 </em> |
| 1179 </dt> |
| 1180 <dd class="todo" style="display: none; "> |
| 1181 Undocumented. |
| 1182 </dd> |
| 1183 <dd>Call this function with events that occur in the process of speaki
ng the utterance.</dd> |
| 1184 <dd style="display: none; "> |
| 1185 This parameter was added in version |
| 1186 <b><span></span></b>. |
| 1187 You must omit this parameter in earlier versions, |
| 1188 and you may omit it in any version. If you require this |
| 1189 parameter, the manifest key |
| 1190 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1191 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1192 </dd> |
| 1193 |
| 1194 <!-- OBJECT PROPERTIES --> |
| 1195 <dd style="display: none; "> |
| 1196 <dl> |
| 1197 <div> |
| 1198 <div> |
| 1199 </div> |
| 1200 </div> |
| 1201 </dl> |
| 1202 </dd> |
| 1203 |
| 1204 <!-- OBJECT METHODS --> |
| 1205 <dd style="display: none; "> |
| 1206 <div></div> |
| 1207 </dd> |
| 1208 |
| 1209 <!-- OBJECT EVENT FIELDS --> |
| 1210 <dd style="display: none; "> |
| 1211 <div></div> |
| 1212 </dd> |
| 1213 |
| 1214 <!-- FUNCTION PARAMETERS --> |
| 1215 <dd> |
| 1216 <div> |
| 1217 <h5>Parameters</h5> |
| 1218 <dl> |
| 1219 <div> |
| 1220 <div> |
| 1221 <dt> |
| 1222 <var>event</var> |
| 1223 <em> |
| 1224 |
| 1225 <!-- TYPE --> |
| 1226 <div style="display:inline"> |
| 1227 ( |
| 1228 <span class="optional" style="display: none; ">optional</spa
n> |
| 1229 <span class="enum" style="display: none; ">enumerated</span> |
| 1230 <span id="typeTemplate"> |
| 1231 <span> |
| 1232 <a href="tts.html#type-TtsEvent">TtsEvent</a> |
| 1233 </span> |
| 1234 <span style="display: none; "> |
| 1235 <span> |
| 1236 array of <span><span></span></span> |
| 1237 </span> |
| 1238 <span>paramType</span> |
| 1239 <span></span> |
| 1240 </span> |
| 1241 </span> |
| 1242 ) |
| 1243 </div> |
| 1244 |
| 1245 </em> |
| 1246 </dt> |
| 1247 <dd class="todo" style="display: none; "> |
| 1248 Undocumented. |
| 1249 </dd> |
| 1250 <dd>The event from the text-to-speech engine indicating the status of
this utterance.</dd> |
| 1251 <dd style="display: none; "> |
| 1252 This parameter was added in version |
| 1253 <b><span></span></b>. |
| 1254 You must omit this parameter in earlier versions, |
| 1255 and you may omit it in any version. If you require this |
| 1256 parameter, the manifest key |
| 1257 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio
n</a> |
| 1258 can ensure that your extension won't be run in an earlier browser ve
rsion. |
| 1259 </dd> |
| 1260 |
| 1261 <!-- OBJECT PROPERTIES --> |
| 1262 <dd style="display: none; "> |
| 1263 <dl> |
| 1264 <div> |
| 1265 <div> |
| 1266 </div> |
| 1267 </div> |
| 1268 </dl> |
| 1269 </dd> |
| 1270 |
| 1271 <!-- OBJECT METHODS --> |
| 1272 <dd style="display: none; "> |
| 1273 <div></div> |
| 1274 </dd> |
| 1275 |
| 1276 <!-- OBJECT EVENT FIELDS --> |
| 1277 <dd style="display: none; "> |
| 1278 <div></div> |
| 1279 </dd> |
| 1280 |
| 1281 <!-- FUNCTION PARAMETERS --> |
| 1282 <dd style="display: none; "> |
| 1283 <div></div> |
| 1284 </dd> |
| 1285 |
| 1286 </div> |
| 1287 </div> |
| 1288 </dl> |
| 1289 </div> |
| 1290 </dd> |
| 1291 |
| 1292 </div> |
| 1293 </div> |
| 1294 </dl> |
| 1295 </div> |
| 1296 |
| 1297 <!-- EXTRA PARAMETERS --> |
| 1298 <div style="display: none; "> |
| 1299 <h4>Extra parameters to addListener</h4> |
| 1300 <dl> |
| 1301 <div> |
| 1302 <div> |
| 1303 </div> |
| 1304 </div> |
| 1305 </dl> |
| 1306 </div> |
| 1307 |
| 1308 <!-- LISTENER RETURN VALUE --> |
| 1309 <h4 style="display: none; ">Listener returns</h4> |
| 1310 <dl> |
| 1311 <div style="display: none; "> |
| 1312 <div> |
| 1313 </div> |
| 1314 </div> |
| 1315 </dl> |
| 1316 |
| 1317 </div> <!-- /description --> |
| 1318 </div><div class="apiItem"> |
| 1319 <a name="event-onStop"></a> |
| 1320 <h4>onStop</h4> |
| 1321 |
| 1322 <div class="summary"> |
| 1323 <!-- Note: intentionally longer 80 columns --> |
| 1324 <span class="subdued">chrome.ttsEngine.</span><span>onStop</span
><span class="subdued">.addListener</span>(function(<span></span>) <span class="
subdued">{...}</span><span></span>)); |
| 1325 </div> |
| 1326 |
| 1327 <div class="description"> |
| 1328 <p class="todo" style="display: none; ">Undocumented.</p> |
| 1329 <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> |
| 1330 |
| 1331 <!-- LISTENER PARAMETERS --> |
| 1332 <div style="display: none; "> |
| 1333 <h4>Listener parameters</h4> |
| 1334 <dl> |
| 1335 <div> |
| 1336 <div> |
| 1337 </div> |
| 1338 </div> |
| 1339 </dl> |
| 1340 </div> |
| 1341 |
| 1342 <!-- EXTRA PARAMETERS --> |
| 1343 <div style="display: none; "> |
| 1344 <h4>Extra parameters to addListener</h4> |
| 1345 <dl> |
| 1346 <div> |
| 1347 <div> |
| 1348 </div> |
| 1349 </div> |
| 1350 </dl> |
| 1351 </div> |
| 1352 |
| 1353 <!-- LISTENER RETURN VALUE --> |
| 1354 <h4 style="display: none; ">Listener returns</h4> |
| 1355 <dl> |
| 1356 <div style="display: none; "> |
| 1357 <div> |
| 1358 </div> |
| 1359 </div> |
| 1360 </dl> |
| 1361 |
| 1362 </div> <!-- /description --> |
| 1363 </div> <!-- /apiItem --> |
| 1364 |
| 1365 </div> <!-- /apiGroup --> |
| 1366 |
| 1367 <!-- TYPES --> |
| 1368 <div class="apiGroup" style="display: none; "> |
| 1369 <a name="types"></a> |
| 1370 <h3 id="types">Types</h3> |
| 1371 |
| 1372 <!-- iterates over all types --> |
| 1373 <div class="apiItem"> |
| 1374 <a></a> |
| 1375 <h4>type name</h4> |
| 1376 |
| 1377 <div> |
| 1378 </div> |
| 1379 |
| 1380 </div> <!-- /apiItem --> |
| 1381 |
| 1382 </div> <!-- /apiGroup --> |
| 1383 |
| 1384 </div> <!-- /apiPage --> |
| 1385 </div> <!-- /gc-pagecontent --> |
| 1386 </div> <!-- /g-section --> |
| 1387 </div> <!-- /codesiteContent --> |
| 1388 <div id="gc-footer" --=""> |
| 1389 <div class="text"> |
| 1390 <p> |
| 1391 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, |
| 1392 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons |
| 1393 Attribution 3.0 License</a>, and code samples are licensed under the |
| 1394 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. |
| 1395 </p> |
| 1396 <p> |
| 1397 ©2011 Google |
| 1398 </p> |
| 1399 |
| 1400 <!-- begin analytics --> |
| 1401 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"><
/script> |
| 1402 <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></scr
ipt> |
| 1403 |
| 1404 <script type="text/javascript"> |
| 1405 // chrome doc tracking |
| 1406 try { |
| 1407 var engdocs = _gat._getTracker("YT-10763712-2"); |
| 1408 engdocs._trackPageview(); |
| 1409 } catch(err) {} |
| 1410 |
| 1411 // code.google.com site-wide tracking |
| 1412 try { |
| 1413 _uacct="UA-18071-1"; |
| 1414 _uanchor=1; |
| 1415 _uff=0; |
| 1416 urchinTracker(); |
| 1417 } |
| 1418 catch(e) {/* urchinTracker not available. */} |
| 1419 </script> |
| 1420 <!-- end analytics --> |
| 1421 </div> |
| 1422 </div> <!-- /gc-footer --> |
| 1423 </div> <!-- /gc-container --> |
| 1424 </body></html> |
OLD | NEW |