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

Side by Side Diff: chrome/common/extensions/docs/ttsEngine.html

Issue 10642015: Basic setup for generating app docs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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="../../../../third_party/json_minify/mini fy-sans-regexp.js">
17 </script>
18 <script type="text/javascript" src="js/api_page_generator.js"></script>
19 <script type="text/javascript" src="js/bootstrap.js"></script>
20 <script type="text/javascript" src="js/sidebar.js"></script>
21 <meta name="description" content="Documentation for the chrome.ttsEngine modul e, which is part of the Google Chrome extension APIs."><title>chrome.ttsEngine - Google Chrome Extensions - Google Code</title></head>
22 <body> <div id="devModeWarning" class="displayModeWarning">
23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp ecting to see local changes when you refresh? You'll need run chrome with --allo w-file-access-from-files.
24 </div>
25 <div id="branchWarning" class="displayModeWarning">
26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation.
27 It may not work with the stable release of Chrome.</span>
28 <select id="branchChooser">
29 <option>Choose a different version...
30 </option><option value="">Stable
31 </option><option value="beta">Beta
32 </option><option value="dev">Dev
33 </option><option value="trunk">Trunk
34 </option></select>
35 </div>
36 <div id="unofficialWarning" class="displayModeWarning">
37 <span>WARNING: This is unofficial documentation. It may not work with the
38 current release of Chrome.</span>
39 <button id="goToOfficialDocs">Go to the official docs</button>
40 </div>
41 <div id="gc-container" class="labs">
42 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
43 <!-- In particular, sub-templates that recurse, must be used by allowing
44 jstemplate to make a copy of the template in this section which
45 are not operated on by way of the jsskip="true" -->
46 <!-- /SUBTEMPLATES -->
47 <a id="top"></a>
48 <div id="skipto">
49 <a href="#gc-pagecontent">Skip to page content</a>
50 <a href="#gc-toc">Skip to main navigation</a>
51 </div>
52 <!-- API HEADER -->
53 <table id="header" width="100%" cellspacing="0" border="0">
54 <tbody><tr>
55 <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>
56 <td valign="middle" width="100%" style="padding-left:0.6em;">
57 <form action="http://www.google.com/cse" id="cse" style="margin-top:0. 5em">
58 <div id="gsc-search-box">
59 <input type="hidden" name="cx" value="002967670403910741006:61_cvz fqtno">
60 <input type="hidden" name="ie" value="UTF-8">
61 <input type="text" name="q" value="" size="55">
62 <input class="gsc-search-button" type="submit" name="sa" value="Se arch">
63 <br>
64 <span class="greytext">e.g. "page action" or "tabs"</span>
65 </div>
66 </form>
67 <script type="text/javascript" src="https://www.google.com/jsapi"></sc ript>
68 <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
69 <script type="text/javascript" src="https://www.google.com/coop/cse/t1 3n?form=cse&amp;t13n_langs=en"></script>
70 <script type="text/javascript" src="https://www.google.com/coop/cse/br and?form=cse&amp;lang=en"></script>
71 </td>
72 </tr>
73 </tbody></table>
74 <div id="codesiteContent" class="">
75 <a id="gc-topnav-anchor"></a>
76 <div id="gc-topnav">
77 <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Lab s</a>)</h1>
78 <ul id="home" class="gc-topnav-tabs">
79 <li id="home_link">
80 <a href="index.html" title="Google Chrome Extensions home page">Home </a>
81 </li>
82 <li id="docs_link">
83 <a href="docs.html" title="Official Google Chrome Extensions documen tation">Docs</a>
84 </li>
85 <li id="faq_link">
86 <a href="faq.html" title="Answers to frequently asked questions abou t Google Chrome Extensions">FAQ</a>
87 </li>
88 <li id="samples_link">
89 <a href="samples.html" title="Sample extensions (with source code)"> Samples</a>
90 </li>
91 <li id="group_link">
92 <a href="http://groups.google.com/a/chromium.org/group/chromium-exte nsions" title="Google Chrome Extensions developer forum">Group</a>
93 </li>
94 <li id="so_link">
95 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext ension" title="[google-chrome-extension] tag on Stack Overflow">Questions?</a>
96 </li>
97 </ul>
98 </div> <!-- end gc-topnav -->
99 <div class="g-section g-tpl-170">
100 <!-- SIDENAV -->
101 <div class="g-unit g-first" id="gc-toc">
102 <ul>
103 <li><a href="getstarted.html">Getting Started</a></li>
104 <li><a href="overview.html">Overview</a></li>
105 <li><a href="whats_new.html">What's New?</a></li>
106 <li><h2><a href="devguide.html">Developer's Guide</a></h2>
107 <ul>
108 <li>Browser UI
109 <ul>
110 <li><a href="browserAction.html">Browser Actions</a></li>
111 <li><a href="contextMenus.html">Context Menus</a></li>
112 <li><a href="notifications.html">Desktop Notifications</a></li >
113 <li><a href="omnibox.html">Omnibox</a></li>
114 <li><a href="options.html">Options Pages</a></li>
115 <li><a href="override.html">Override Pages</a></li>
116 <li><a href="pageAction.html">Page Actions</a></li>
117 </ul>
118 </li>
119 <li>Browser Interaction
120 <ul>
121 <li><a href="bookmarks.html">Bookmarks</a></li>
122 <li><a href="cookies.html">Cookies</a></li>
123 <li><a href="devtools.html">Developer Tools</a></li>
124 <li><a href="events.html">Events</a></li>
125 <li><a href="history.html">History</a></li>
126 <li><a href="management.html">Management</a></li>
127 <li><a href="tabs.html">Tabs</a></li>
128 <li><a href="windows.html">Windows</a></li>
129 </ul>
130 </li>
131 <li>Implementation
132 <ul>
133 <li><a href="a11y.html">Accessibility</a></li>
134 <li><a href="background_pages.html">Background Pages</a></li>
135 <li><a href="content_scripts.html">Content Scripts</a></li>
136 <li><a href="xhr.html">Cross-Origin XHR</a></li>
137 <li><a href="i18n.html">Internationalization</a></li>
138 <li><a href="messaging.html">Message Passing</a></li>
139 <li><a href="permissions.html">Optional Permissions</a></li>
140 <li><a href="npapi.html">NPAPI Plugins</a></li>
141 </ul>
142 </li>
143 <li>Finishing
144 <ul>
145 <li><a href="hosting.html">Hosting</a></li>
146 <li><a href="external_extensions.html">Other Deployment Option s</a></li>
147 </ul>
148 </li>
149 </ul>
150 </li>
151 <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
152 <li><h2><a href="tutorials.html">Tutorials</a></h2>
153 <ul>
154 <li><a href="tut_debugging.html">Debugging</a></li>
155 <li><a href="tut_analytics.html">Google Analytics</a></li>
156 <li><a href="tut_oauth.html">OAuth</a></li>
157 </ul>
158 </li>
159 <li><h2>Reference</h2>
160 <ul>
161 <li>Formats
162 <ul>
163 <li><a href="manifest.html">Manifest Files</a></li>
164 <li><a href="match_patterns.html">Match Patterns</a></li>
165 </ul>
166 </li>
167 <li><a href="permission_warnings.html">Permission Warnings</a></li >
168 <li><a href="api_index.html">chrome.* APIs</a></li>
169 <li><a href="api_other.html">Other APIs</a></li>
170 </ul>
171 </li>
172 <li><h2><a href="samples.html">Samples</a></h2></li>
173 <div class="line"> </div>
174 <li><h2>More</h2>
175 <ul>
176 <li><a href="http://code.google.com/chrome/webstore/docs/index.htm l">Chrome Web Store</a></li>
177 <li><a href="http://code.google.com/chrome/apps/docs/developers_gu ide.html">Hosted Apps</a></li>
178 <li><a href="themes.html">Themes</a></li>
179 </ul>
180 </li>
181 </ul>
182 </div>
183 <script>
184 initToggles();
185 </script>
186 <div class="g-unit" id="gc-pagecontent">
187 <div id="pageTitle">
188 <h1 class="page_title">chrome.ttsEngine</h1>
189 </div>
190 <!-- TABLE OF CONTENTS -->
191 <div id="toc">
192 <h2>Contents</h2>
193 <ol>
194 <li>
195 <a href="#overview">Overview</a>
196 <ol>
197 </ol>
198 </li><li>
199 <a href="#manifest">Manifest</a>
200 <ol>
201 </ol>
202 </li><li>
203 <a href="#handling_speech_events">Handling speech events</a>
204 <ol>
205 </ol>
206 </li>
207 <li>
208 <a href="#apiReference">API reference: chrome.ttsEngine</a>
209 <ol>
210 <li>
211 <a href="#global-events">Events</a>
212 <ol>
213 <li>
214 <a href="#event-onSpeak">onSpeak</a>
215 </li><li>
216 <a href="#event-onStop">onStop</a>
217 </li>
218 </ol>
219 </li>
220 </ol>
221 </li>
222 </ol>
223 </div>
224 <!-- /TABLE OF CONTENTS -->
225 <!-- Standard content lead-in for experimental API pages -->
226 <!-- STATIC CONTENT PLACEHOLDER -->
227 <div id="static"><p id="classSummary">
228 Use the <code>chrome.ttsEngine</code> module to
229 implement a text-to-speech (TTS) engine using an extension. If your
230 extension registers using this API, it will receive events containing
231 an utterance to be spoken and other parameters when any extension or packaged
232 app uses the
233 <a href="tts.html">tts</a>
234 module to generate speech. Your extension can then use any available
235 web technology to synthesize and output the speech, and send events back
236 to the calling function to report the status.
237 </p>
238 <h2 id="overview">Overview</h2>
239 <p>An extension can register itself as a speech engine. By doing so, it
240 can intercept some or all calls to functions such as
241 <a href="tts.html#method-speak"><code>speak()</code></a> and
242 <a href="tts.html#method-stop"><code>stop()</code></a>
243 and provide an alternate implementation.
244 Extensions are free to use any available web technology
245 to provide speech, including streaming audio from a server, HTML5 audio,
246 Native Client, or Flash. An extension could even do something different
247 with the utterances, like display closed captions in a pop-up window or
248 send them as log messages to a remote server.</p>
249 <h2 id="manifest">Manifest</h2>
250 <p>To implement a TTS engine, an extension must
251 declare the "ttsEngine" permission and then declare all voices
252 it provides in the extension manifest, like this:</p>
253 <pre>{
254 "name": "My TTS Engine",
255 "version": "1.0",
256 <b>"permissions": ["ttsEngine"],
257 "tts_engine": {
258 "voices": [
259 {
260 "voice_name": "Alice",
261 "lang": "en-US",
262 "gender": "female",
263 "event_types": ["start", "marker", "end"]
264 },
265 {
266 "voice_name": "Pat",
267 "lang": "en-US",
268 "event_types": ["end"]
269 }
270 ]
271 },</b>
272 "background_page": "background.html",
273 }</pre>
274 <p>An extension can specify any number of voices.</p>
275 <p>The <code>voice_name</code> parameter is required. The name should be
276 descriptive enough that it identifies the name of the voice and the
277 engine used. In the unlikely event that two extensions register voices
278 with the same name, a client can specify the ID of the extension that
279 should do the synthesis.</p>
280 <p>The <code>gender</code> parameter is optional. If your voice corresponds
281 to a male or female voice, you can use this parameter to help clients
282 choose the most appropriate voice for their application.</p>
283 <p>The <code>lang</code> parameter is optional, but highly recommended.
284 Almost always, a voice can synthesize speech in just a single language.
285 When an engine supports more than one language, it can easily register a
286 separate voice for each language. Under rare circumstances where a single
287 voice can handle more than one language, it's easiest to just list two
288 separate voices and handle them using the same logic internally. However,
289 if you want to create a voice that will handle utterances in any language,
290 leave out the <code>lang</code> parameter from your extension's manifest.</p>
291 <p>Finally, the <code>event_types</code> parameter is required if the engine can
292 send events to update the client on the progress of speech synthesis.
293 At a minimum, supporting the <code>'end'</code> event type to indicate
294 when speech is finished is highly recommended, otherwise Chrome cannot
295 schedule queued utterances.</p>
296 <p class="note">
297 <strong>Note:</strong> If your TTS engine does not support
298 the <code>'end'</code> event type, Chrome cannot queue utterances
299 because it has no way of knowing when your utterance has finished. To
300 help mitigate this, Chrome passes an additional boolean <code>enqueue</code>
301 option to your engine's onSpeak handler, giving you the option of
302 implementing your own queueing. This is discouraged because then
303 clients are unable to queue utterances that should get spoken by different
304 speech engines.</p>
305 <p>The possible event types that you can send correspond to the event types
306 that the <code>speak()</code> method receives:</p>
307 <ul>
308 <li><code>'start'</code>: The engine has started speaking the utterance.
309 </li><li><code>'word'</code>: A word boundary was reached. Use
310 <code>event.charIndex</code> to determine the current speech
311 position.
312 </li><li><code>'sentence'</code>: A sentence boundary was reached. Use
313 <code>event.charIndex</code> to determine the current speech
314 position.
315 </li><li><code>'marker'</code>: An SSML marker was reached. Use
316 <code>event.charIndex</code> to determine the current speech
317 position.
318 </li><li><code>'end'</code>: The engine has finished speaking the utterance.
319 </li><li><code>'error'</code>: An engine-specific error occurred and
320 this utterance cannot be spoken.
321 Pass more information in <code>event.errorMessage</code>.
322 </li></ul>
323 <p>The <code>'interrupted'</code> and <code>'cancelled'</code> events are
324 not sent by the speech engine; they are generated automatically by Chrome.</p>
325 <p>Text-to-speech clients can get the voice information from your
326 extension's manifest by calling
327 <a href="tts.html#method-getVoices">getVoices()</a>,
328 assuming you've registered speech event listeners as described below.</p>
329 <h2 id="handling_speech_events">Handling speech events</h2>
330 <p>To generate speech at the request of clients, your extension must
331 register listeners for both <code>onSpeak</code> and <code>onStop</code>,
332 like this:</p>
333 <pre>var speakListener = function(utterance, options, sendTtsEvent) {
334 sendTtsEvent({'event_type': 'start', 'charIndex': 0})
335 // (start speaking)
336 sendTtsEvent({'event_type': 'end', 'charIndex': utterance.length})
337 };
338 var stopListener = function() {
339 // (stop all speech)
340 };
341 chrome.ttsEngine.onSpeak.addListener(speakListener);
342 chrome.ttsEngine.onStop.addListener(stopListener);</pre>
343 <p class="warning">
344 <b>Important:</b>
345 If your extension does not register listeners for both
346 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any
347 speech calls, regardless of what is in the manifest.</p>
348 <p>The decision of whether or not to send a given speech request to an
349 extension is based solely on whether the extension supports the given voice
350 parameters in its manifest and has registered listeners
351 for <code>onSpeak</code> and <code>onStop</code>. In other words,
352 there's no way for an extension to receive a speech request and
353 dynamically decide whether to handle it.</p>
354 </div>
355 <!-- API PAGE -->
356 <div class="apiPage">
357 <a name="apiReference"></a>
358 <h2>API reference: chrome.ttsEngine</h2>
359 <!-- PROPERTIES -->
360 <!-- /apiGroup -->
361 <!-- METHODS -->
362 <!-- /apiGroup -->
363 <!-- EVENTS -->
364 <div id="eventsTemplate" class="apiGroup">
365 <a name="global-events"></a>
366 <h3>Events</h3>
367 <!-- iterates over all events -->
368 <div class="apiItem">
369 <a name="event-onSpeak"></a>
370 <h4>onSpeak</h4>
371 <div class="summary">
372 <!-- Note: intentionally longer 80 columns -->
373 <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>);
374 </div>
375 <div class="description">
376 <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>
377 <!-- LISTENER PARAMETERS -->
378 <div>
379 <h4>Listener parameters</h4>
380 <dl>
381 <div>
382 <div>
383 <dt>
384 <var>utterance</var>
385 <em>
386 <!-- TYPE -->
387 <div style="display:inline">
388 (
389 <span id="typeTemplate">
390 <span>
391 <span>string</span>
392 </span>
393 </span>
394 )
395 </div>
396 </em>
397 </dt>
398 <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>
399 <!-- OBJECT PROPERTIES -->
400 <!-- OBJECT METHODS -->
401 <!-- OBJECT EVENT FIELDS -->
402 <!-- FUNCTION PARAMETERS -->
403 </div>
404 </div><div>
405 <div>
406 <dt>
407 <var>options</var>
408 <em>
409 <!-- TYPE -->
410 <div style="display:inline">
411 (
412 <span id="typeTemplate">
413 <span>
414 <span>object</span>
415 </span>
416 </span>
417 )
418 </div>
419 </em>
420 </dt>
421 <dd>Options specified to the tts.speak() method.</dd>
422 <!-- OBJECT PROPERTIES -->
423 <dd>
424 <dl>
425 <div>
426 <div>
427 <dt>
428 <var>voiceName</var>
429 <em>
430 <!-- TYPE -->
431 <div style="display:inline">
432 (
433 <span class="optional">optional</span>
434 <span id="typeTemplate">
435 <span>
436 <span>string</span>
437 </span>
438 </span>
439 )
440 </div>
441 </em>
442 </dt>
443 <dd>The name of the voice to use for synthesis.</dd>
444 <!-- OBJECT PROPERTIES -->
445 <!-- OBJECT METHODS -->
446 <!-- OBJECT EVENT FIELDS -->
447 <!-- FUNCTION PARAMETERS -->
448 </div>
449 </div><div>
450 <div>
451 <dt>
452 <var>lang</var>
453 <em>
454 <!-- TYPE -->
455 <div style="display:inline">
456 (
457 <span class="optional">optional</span>
458 <span id="typeTemplate">
459 <span>
460 <span>string</span>
461 </span>
462 </span>
463 )
464 </div>
465 </em>
466 </dt>
467 <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>
468 <!-- OBJECT PROPERTIES -->
469 <!-- OBJECT METHODS -->
470 <!-- OBJECT EVENT FIELDS -->
471 <!-- FUNCTION PARAMETERS -->
472 </div>
473 </div><div>
474 <div>
475 <dt>
476 <var>gender</var>
477 <em>
478 <!-- TYPE -->
479 <div style="display:inline">
480 (
481 <span class="optional">optional</span>
482 <span class="enum">enumerated</span>
483 <span id="typeTemplate">
484 <span>
485 <span>string</span>
486 <span>["male", "female"]</span>
487 </span>
488 </span>
489 )
490 </div>
491 </em>
492 </dt>
493 <dd>Gender of voice for synthesized speech.</dd>
494 <!-- OBJECT PROPERTIES -->
495 <!-- OBJECT METHODS -->
496 <!-- OBJECT EVENT FIELDS -->
497 <!-- FUNCTION PARAMETERS -->
498 </div>
499 </div><div>
500 <div>
501 <dt>
502 <var>rate</var>
503 <em>
504 <!-- TYPE -->
505 <div style="display:inline">
506 (
507 <span class="optional">optional</span>
508 <span id="typeTemplate">
509 <span>
510 <span>number</span>
511 </span>
512 </span>
513 )
514 </div>
515 </em>
516 </dt>
517 <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>
518 <!-- OBJECT PROPERTIES -->
519 <!-- OBJECT METHODS -->
520 <!-- OBJECT EVENT FIELDS -->
521 <!-- FUNCTION PARAMETERS -->
522 </div>
523 </div><div>
524 <div>
525 <dt>
526 <var>pitch</var>
527 <em>
528 <!-- TYPE -->
529 <div style="display:inline">
530 (
531 <span class="optional">optional</span>
532 <span id="typeTemplate">
533 <span>
534 <span>number</span>
535 </span>
536 </span>
537 )
538 </div>
539 </em>
540 </dt>
541 <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>
542 <!-- OBJECT PROPERTIES -->
543 <!-- OBJECT METHODS -->
544 <!-- OBJECT EVENT FIELDS -->
545 <!-- FUNCTION PARAMETERS -->
546 </div>
547 </div><div>
548 <div>
549 <dt>
550 <var>volume</var>
551 <em>
552 <!-- TYPE -->
553 <div style="display:inline">
554 (
555 <span class="optional">optional</span>
556 <span id="typeTemplate">
557 <span>
558 <span>number</span>
559 </span>
560 </span>
561 )
562 </div>
563 </em>
564 </dt>
565 <dd>Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0.</dd>
566 <!-- OBJECT PROPERTIES -->
567 <!-- OBJECT METHODS -->
568 <!-- OBJECT EVENT FIELDS -->
569 <!-- FUNCTION PARAMETERS -->
570 </div>
571 </div>
572 </dl>
573 </dd>
574 <!-- OBJECT METHODS -->
575 <!-- OBJECT EVENT FIELDS -->
576 <!-- FUNCTION PARAMETERS -->
577 </div>
578 </div><div>
579 <div>
580 <dt>
581 <var>sendTtsEvent</var>
582 <em>
583 <!-- TYPE -->
584 <div style="display:inline">
585 (
586 <span id="typeTemplate">
587 <span>
588 <span>function</span>
589 </span>
590 </span>
591 )
592 </div>
593 </em>
594 </dt>
595 <dd>Call this function with events that occur in the process of speaki ng the utterance.</dd>
596 <!-- OBJECT PROPERTIES -->
597 <!-- OBJECT METHODS -->
598 <!-- OBJECT EVENT FIELDS -->
599 <!-- FUNCTION PARAMETERS -->
600 <dd>
601 <div>
602 <h5>Parameters</h5>
603 <dl>
604 <div>
605 <div>
606 <dt>
607 <var>event</var>
608 <em>
609 <!-- TYPE -->
610 <div style="display:inline">
611 (
612 <span id="typeTemplate">
613 <span>
614 <a>tts.TtsEvent</a>
615 </span>
616 </span>
617 )
618 </div>
619 </em>
620 </dt>
621 <dd>The event from the text-to-speech engine indicating the status of this utterance.</dd>
622 <!-- OBJECT PROPERTIES -->
623 <!-- OBJECT METHODS -->
624 <!-- OBJECT EVENT FIELDS -->
625 <!-- FUNCTION PARAMETERS -->
626 </div>
627 </div>
628 </dl>
629 </div>
630 </dd>
631 </div>
632 </div>
633 </dl>
634 </div>
635 <!-- EXTRA PARAMETERS -->
636 <!-- LISTENER RETURN VALUE -->
637 <dl>
638 </dl>
639 </div> <!-- /description -->
640 <!-- /description -->
641 </div><div class="apiItem">
642 <a name="event-onStop"></a>
643 <h4>onStop</h4>
644 <div class="summary">
645 <!-- Note: intentionally longer 80 columns -->
646 <span class="subdued">chrome.ttsEngine.</span><span>onStop</span ><span class="subdued">.addListener</span>(function(<span></span>) <span class=" subdued">{...}</span><span></span>);
647 </div>
648 <div class="description">
649 <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>
650 <!-- LISTENER PARAMETERS -->
651 <!-- EXTRA PARAMETERS -->
652 <!-- LISTENER RETURN VALUE -->
653 <dl>
654 </dl>
655 </div> <!-- /description -->
656 <!-- /description -->
657 </div> <!-- /apiItem -->
658 </div> <!-- /apiGroup -->
659 <!-- TYPES -->
660 <!-- /apiGroup -->
661 </div> <!-- /apiPage -->
662 </div> <!-- /gc-pagecontent -->
663 </div> <!-- /g-section -->
664 </div> <!-- /codesiteContent -->
665 <div id="gc-footer" --="">
666 <div class="text">
667 <p>
668 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>,
669 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons
670 Attribution 3.0 License</a>, and code samples are licensed under the
671 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>.
672 </p>
673 <p>
674 ©2011 Google
675 </p>
676 <!-- begin analytics -->
677 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript"> </script>
678 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc ript>
679 <script type="text/javascript">
680 // chrome doc tracking
681 try {
682 var engdocs = _gat._getTracker("YT-10763712-2");
683 engdocs._trackPageview();
684 } catch(err) {}
685 // code.google.com site-wide tracking
686 try {
687 _uacct="UA-18071-1";
688 _uanchor=1;
689 _uff=0;
690 urchinTracker();
691 }
692 catch(e) {/* urchinTracker not available. */}
693 </script>
694 <!-- end analytics -->
695 </div>
696 </div> <!-- /gc-footer -->
697 </div> <!-- /gc-container -->
698 </body></html>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/tts.html ('k') | chrome/common/extensions/docs/tut_analytics.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698