|
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.tts_engine - 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.tts_engine</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.tts_e ngine</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.tts_engine</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 the intended utterance 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 manually specify the extension id to | |
kathyw
2011/07/13 20:39:58
manually specify the extension id to
->
specify th
dmazzoni
2011/07/14 06:50:55
Done.
| |
400 receive speech calls.</p> | |
401 | |
402 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. | |
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. | |
414 | |
415 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 recommend, otherwise it's impossible | |
kathyw
2011/07/13 20:39:58
recommend, otherwise
->
recommended; otherwise
it
dmazzoni
2011/07/14 06:50:55
Done.
| |
419 for Chrome to schedule queued utterances.</p> | |
420 | |
421 <p class="note">If your TTS engine does not support the <code>'end'</code> | |
kathyw
2011/07/13 20:39:58
<p...>If
->
<p...>
<strong>Note:</strong>
If
dmazzoni
2011/07/14 06:50:55
Done.
| |
422 event type, Chrome will pass the <code>enqueue</code> option to | |
kathyw
2011/07/13 20:39:58
will pass -> passes
I don't understand how it can
dmazzoni
2011/07/14 06:50:55
I tried to reword it, is it more clear now?
kathyw
2011/07/14 16:13:23
Yes, looks good.
| |
423 onSpeak, so that your engine can implement its own queuing. However, this is | |
kathyw
2011/07/13 20:39:58
queuing -> queueing
(both are correct, but the la
| |
424 discouraged because it means that users cannot queue utterances that get | |
kathyw
2011/07/13 20:39:58
users -> extensions?
or maybe -> users of your sp
dmazzoni
2011/07/14 06:50:55
Done.
| |
425 sent to different speech engines.</p> | |
426 | |
427 <p>The possible event types you can send correspond to the event types that | |
kathyw
2011/07/13 20:39:58
you -> that you
(missing 'that' tends to trip up
dmazzoni
2011/07/14 06:50:55
Done.
| |
428 the <code>speak()</code> method receives:</p> | |
429 | |
430 <ul> | |
431 <li><code>'start'</code>: the engine has started speaking the utterance. | |
kathyw
2011/07/13 20:39:58
the -> The
[and do the same capitalization for ev
dmazzoni
2011/07/14 06:50:55
Done.
| |
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>The information about your extensions's voices from your manifest | |
kathyw
2011/07/13 20:39:58
Turn this around to not have so much passive voice
dmazzoni
2011/07/14 06:50:55
Done.
| |
451 will be returned to any client that calls <code>getVoices</code>, assuming | |
452 you've also registered speech event listeners as described below.</p> | |
453 | |
454 <h2 id="handling_speech_events">Handling Speech Events</h2> | |
kathyw
2011/07/13 20:39:58
Speech Events -> speech events
dmazzoni
2011/07/14 06:50:55
Done.
| |
455 | |
456 <p>To generate speech at the request of clients, your extension must | |
457 register listeners for both <code>onSpeak</code> and <code>onStop</code>, | |
458 like this:</p> | |
459 | |
460 <pre>var speakListener = function(utterance, options, sendTtsEvent) { | |
461 sendTtsEvent({'event_type': 'start', 'charIndex': 0}) | |
462 | |
463 // (start speaking) | |
464 | |
465 sendTtsEvent({'event_type': 'end', 'charIndex': utterance.length}) | |
466 }; | |
467 | |
468 var stopListener = function() { | |
469 // (stop all speech) | |
470 }; | |
471 | |
472 chrome.experimental.tts.onSpeak.addListener(speakListener); | |
473 chrome.experimental.tts.onStop.addListener(stopListener);</pre> | |
474 | |
475 <p class="warning">If an extension does not register listeners for both | |
kathyw
2011/07/13 20:39:58
<p ...>
->
<p ...><b>Important:</b>
an extension
dmazzoni
2011/07/14 06:50:55
:)
| |
476 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any | |
477 speech calls, regardless of what is in the manifest.</p> | |
478 | |
479 <p>The decision of whether or not to send a given speech request to an | |
480 extension is based solely on whether the extension supports the given voice | |
481 parameters in its manifest and has registered listeners | |
482 for <code>onSpeak</code> and <code>onStop</code>. In other words, | |
483 there's no way for an extension to receive a speech request and | |
484 dynamically decide whether to handle it or not.</p> | |
kathyw
2011/07/13 20:39:58
delete "or not". Or change "whether" to "whether o
dmazzoni
2011/07/14 06:50:55
Done.
| |
485 </div> | |
486 | |
487 <!-- API PAGE --> | |
488 <div class="apiPage"> | |
489 <a name="apiReference"></a> | |
490 <h2>API reference: chrome.experimental.tts_engine</h2> | |
491 | |
492 <!-- PROPERTIES --> | |
493 <div class="apiGroup" style="display: none; "> | |
494 <a name="properties"></a> | |
495 <h3 id="properties">Properties</h3> | |
496 | |
497 <div> | |
498 <a></a> | |
499 <h4>getLastError</h4> | |
500 <div class="summary"> | |
501 <!-- Note: intentionally longer 80 columns --> | |
502 <span>chrome.extension</span><span>lastError</span> | |
503 </div> | |
504 <div> | |
505 </div> | |
506 </div> | |
507 | |
508 </div> <!-- /apiGroup --> | |
509 | |
510 <!-- METHODS --> | |
511 <div id="methodsTemplate" class="apiGroup"> | |
512 <a name="global-methods"></a> | |
513 <h3>Methods</h3> | |
514 | |
515 <!-- iterates over all functions --> | |
516 <div class="apiItem" style="display: none; "> | |
517 <a></a> <!-- method-anchor --> | |
518 <h4>method name</h4> | |
519 | |
520 <div class="summary"><span>void</span> | |
521 <!-- Note: intentionally longer 80 columns --> | |
522 <span>chrome.module.methodName</span>(<span><span>, </span><sp an></span> | |
523 <var><span></span></var></span>)</div> | |
524 | |
525 <div class="description"> | |
526 <p class="todo">Undocumented.</p> | |
527 <p> | |
528 A description from the json schema def of the function goes he re. | |
529 </p> | |
530 | |
531 <!-- PARAMETERS --> | |
532 <h4>Parameters</h4> | |
533 <dl> | |
534 <div> | |
535 <div> | |
536 </div> | |
537 </div> | |
538 </dl> | |
539 | |
540 <!-- RETURNS --> | |
541 <h4>Returns</h4> | |
542 <dl> | |
543 <div> | |
544 <div> | |
545 </div> | |
546 </div> | |
547 </dl> | |
548 | |
549 <!-- CALLBACK --> | |
550 <div> | |
551 <div> | |
552 <h4>Callback function</h4> | |
553 <p> | |
554 The callback <em>parameter</em> should specify a function | |
555 that looks like this: | |
556 </p> | |
557 <p> | |
558 If you specify the <em>callback</em> parameter, it should | |
559 specify a function that looks like this: | |
560 </p> | |
561 | |
562 <!-- Note: intentionally longer 80 columns --> | |
563 <pre>function(<span>Type param1, Type param2</span>) <span cla ss="subdued">{...}</span>;</pre> | |
564 <dl> | |
565 <div> | |
566 <div> | |
567 </div> | |
568 </div> | |
569 </dl> | |
570 </div> | |
571 </div> | |
572 | |
573 <!-- MIN_VERSION --> | |
574 <p> | |
575 This function was added in version <b><span></span></b>. | |
576 If you require this function, the manifest key | |
577 <a href="manifest.html#minimum_chrome_version">minimum_chrome_ version</a> | |
578 can ensure that your extension won't be run in an earlier brow ser version. | |
579 </p> | |
580 </div> <!-- /description --> | |
581 | |
582 </div> <!-- /apiItem --> | |
583 | |
584 </div> <!-- /apiGroup --> | |
585 | |
586 <!-- EVENTS --> | |
587 <div id="eventsTemplate" class="apiGroup"> | |
588 <a name="global-events"></a> | |
589 <h3>Events</h3> | |
590 <!-- iterates over all events --> | |
591 <div class="apiItem" style="display: none; "> | |
592 <a></a> | |
593 <h4>event name</h4> | |
594 | |
595 <div class="summary"> | |
596 <!-- Note: intentionally longer 80 columns --> | |
597 <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>)); | |
598 </div> | |
599 | |
600 <div class="description"> | |
601 <p class="todo">Undocumented.</p> | |
602 <p> | |
603 A description from the json schema def of the event goes here. | |
604 </p> | |
605 | |
606 <!-- LISTENER PARAMETERS --> | |
607 <div> | |
608 <h4>Listener parameters</h4> | |
609 <dl> | |
610 <div> | |
611 <div> | |
612 </div> | |
613 </div> | |
614 </dl> | |
615 </div> | |
616 | |
617 <!-- EXTRA PARAMETERS --> | |
618 <div> | |
619 <h4>Extra parameters to addListener</h4> | |
620 <dl> | |
621 <div> | |
622 <div> | |
623 </div> | |
624 </div> | |
625 </dl> | |
626 </div> | |
627 | |
628 <!-- LISTENER RETURN VALUE --> | |
629 <h4>Listener returns</h4> | |
630 <dl> | |
631 <div> | |
632 <div> | |
633 </div> | |
634 </div> | |
635 </dl> | |
636 | |
637 </div> <!-- /description --> | |
638 </div><div class="apiItem"> | |
639 <a name="event-onSpeak"></a> | |
640 <h4>onSpeak</h4> | |
641 | |
642 <div class="summary"> | |
643 <!-- Note: intentionally longer 80 columns --> | |
644 <span class="subdued">chrome.experimental.tts_engine.</span><spa n>onSpeak</span><span class="subdued">.addListener</span>(function(<span>string utterance, object options, function sendTtsEvent, number id</span>) <span class= "subdued">{...}</span><span></span>)); | |
645 </div> | |
646 | |
647 <div class="description"> | |
648 <p class="todo" style="display: none; ">Undocumented.</p> | |
649 <p>Called when the user makes a call to tts.speak and the option s matches one of the tts_voices from this extension's manifest.</p> | |
kathyw
2011/07/13 20:39:58
tts.speak -> tts.speak()
options matches -> optio
dmazzoni
2011/07/14 06:50:55
Thanks, I reworded it to say this will be called i
| |
650 | |
651 <!-- LISTENER PARAMETERS --> | |
652 <div> | |
653 <h4>Listener parameters</h4> | |
654 <dl> | |
655 <div> | |
656 <div> | |
657 <dt> | |
658 <var>utterance</var> | |
659 <em> | |
660 | |
661 <!-- TYPE --> | |
662 <div style="display:inline"> | |
663 ( | |
664 <span class="optional" style="display: none; ">optional</spa n> | |
665 <span class="enum" style="display: none; ">enumerated</span> | |
666 <span id="typeTemplate"> | |
667 <span style="display: none; "> | |
668 <a> Type</a> | |
669 </span> | |
670 <span> | |
671 <span style="display: none; "> | |
672 array of <span><span></span></span> | |
673 </span> | |
674 <span>string</span> | |
675 <span style="display: none; "></span> | |
676 </span> | |
677 </span> | |
678 ) | |
679 </div> | |
680 | |
681 </em> | |
682 </dt> | |
683 <dd class="todo" style="display: none; "> | |
684 Undocumented. | |
685 </dd> | |
686 <dd>The text to speak. This may include SSML, so if your engine does n ot support SSML, you should strip out all XML markup and synthesize only the und erlying text content. This is guaranteed to be no more than 32,768 characters. I f this engine does not support speaking that many characters at a time, the utte rance should be split into smaller chunks and queued internally without returnin g an error.</dd> | |
kathyw
2011/07/13 20:39:58
speak.
->
speak, specified as either plain text or
dmazzoni
2011/07/14 06:50:55
Done.
| |
687 <dd style="display: none; "> | |
688 This parameter was added in version | |
689 <b><span></span></b>. | |
690 You must omit this parameter in earlier versions, | |
691 and you may omit it in any version. If you require this | |
692 parameter, the manifest key | |
693 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
694 can ensure that your extension won't be run in an earlier browser ve rsion. | |
695 </dd> | |
696 | |
697 <!-- OBJECT PROPERTIES --> | |
698 <dd style="display: none; "> | |
699 <dl> | |
700 <div> | |
701 <div> | |
702 </div> | |
703 </div> | |
704 </dl> | |
705 </dd> | |
706 | |
707 <!-- OBJECT METHODS --> | |
708 <dd style="display: none; "> | |
709 <div></div> | |
710 </dd> | |
711 | |
712 <!-- OBJECT EVENT FIELDS --> | |
713 <dd style="display: none; "> | |
714 <div></div> | |
715 </dd> | |
716 | |
717 <!-- FUNCTION PARAMETERS --> | |
718 <dd style="display: none; "> | |
719 <div></div> | |
720 </dd> | |
721 | |
722 </div> | |
723 </div><div> | |
724 <div> | |
725 <dt> | |
726 <var>options</var> | |
727 <em> | |
728 | |
729 <!-- TYPE --> | |
730 <div style="display:inline"> | |
731 ( | |
732 <span class="optional" style="display: none; ">optional</spa n> | |
733 <span class="enum" style="display: none; ">enumerated</span> | |
734 <span id="typeTemplate"> | |
735 <span style="display: none; "> | |
736 <a> Type</a> | |
737 </span> | |
738 <span> | |
739 <span style="display: none; "> | |
740 array of <span><span></span></span> | |
741 </span> | |
742 <span>object</span> | |
743 <span style="display: none; "></span> | |
744 </span> | |
745 </span> | |
746 ) | |
747 </div> | |
748 | |
749 </em> | |
750 </dt> | |
751 <dd class="todo" style="display: none; "> | |
752 Undocumented. | |
753 </dd> | |
754 <dd>The speak options.</dd> | |
kathyw
2011/07/13 20:39:58
The speak options -> Options specified to the tts.
dmazzoni
2011/07/14 06:50:55
Done.
| |
755 <dd style="display: none; "> | |
756 This parameter was added in version | |
757 <b><span></span></b>. | |
758 You must omit this parameter in earlier versions, | |
759 and you may omit it in any version. If you require this | |
760 parameter, the manifest key | |
761 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
762 can ensure that your extension won't be run in an earlier browser ve rsion. | |
763 </dd> | |
764 | |
765 <!-- OBJECT PROPERTIES --> | |
766 <dd> | |
767 <dl> | |
768 <div> | |
769 <div> | |
770 <dt> | |
771 <var>voiceName</var> | |
772 <em> | |
773 | |
774 <!-- TYPE --> | |
775 <div style="display:inline"> | |
776 ( | |
777 <span class="optional">optional</span> | |
778 <span class="enum" style="display: none; ">enumerated</span> | |
779 <span id="typeTemplate"> | |
780 <span style="display: none; "> | |
781 <a> Type</a> | |
782 </span> | |
783 <span> | |
784 <span style="display: none; "> | |
785 array of <span><span></span></span> | |
786 </span> | |
787 <span>string</span> | |
788 <span style="display: none; "></span> | |
789 </span> | |
790 </span> | |
791 ) | |
792 </div> | |
793 | |
794 </em> | |
795 </dt> | |
796 <dd class="todo" style="display: none; "> | |
797 Undocumented. | |
798 </dd> | |
799 <dd>The name of the voice to use for synthesis.</dd> | |
800 <dd style="display: none; "> | |
801 This parameter was added in version | |
802 <b><span></span></b>. | |
803 You must omit this parameter in earlier versions, | |
804 and you may omit it in any version. If you require this | |
805 parameter, the manifest key | |
806 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
807 can ensure that your extension won't be run in an earlier browser ve rsion. | |
808 </dd> | |
809 | |
810 <!-- OBJECT PROPERTIES --> | |
811 <dd style="display: none; "> | |
812 <dl> | |
813 <div> | |
814 <div> | |
815 </div> | |
816 </div> | |
817 </dl> | |
818 </dd> | |
819 | |
820 <!-- OBJECT METHODS --> | |
821 <dd style="display: none; "> | |
822 <div></div> | |
823 </dd> | |
824 | |
825 <!-- OBJECT EVENT FIELDS --> | |
826 <dd style="display: none; "> | |
827 <div></div> | |
828 </dd> | |
829 | |
830 <!-- FUNCTION PARAMETERS --> | |
831 <dd style="display: none; "> | |
832 <div></div> | |
833 </dd> | |
834 | |
835 </div> | |
836 </div><div> | |
837 <div> | |
838 <dt> | |
839 <var>lang</var> | |
840 <em> | |
841 | |
842 <!-- TYPE --> | |
843 <div style="display:inline"> | |
844 ( | |
845 <span class="optional">optional</span> | |
846 <span class="enum" style="display: none; ">enumerated</span> | |
847 <span id="typeTemplate"> | |
848 <span style="display: none; "> | |
849 <a> Type</a> | |
850 </span> | |
851 <span> | |
852 <span style="display: none; "> | |
853 array of <span><span></span></span> | |
854 </span> | |
855 <span>string</span> | |
856 <span style="display: none; "></span> | |
857 </span> | |
858 </span> | |
859 ) | |
860 </div> | |
861 | |
862 </em> | |
863 </dt> | |
864 <dd class="todo" style="display: none; "> | |
865 Undocumented. | |
866 </dd> | |
867 <dd>The language to be used for synthesis, in the form <language>-<reg ion>, e.g. en-US, en-GB, fr-CA, zh-CN, etc.</region></language></dd> | |
kathyw
2011/07/13 20:39:58
Ha, all that shows is -!
Please change to <em>lan
dmazzoni
2011/07/14 06:50:55
Done.
| |
868 <dd style="display: none; "> | |
869 This parameter was added in version | |
870 <b><span></span></b>. | |
871 You must omit this parameter in earlier versions, | |
872 and you may omit it in any version. If you require this | |
873 parameter, the manifest key | |
874 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
875 can ensure that your extension won't be run in an earlier browser ve rsion. | |
876 </dd> | |
877 | |
878 <!-- OBJECT PROPERTIES --> | |
879 <dd style="display: none; "> | |
880 <dl> | |
881 <div> | |
882 <div> | |
883 </div> | |
884 </div> | |
885 </dl> | |
886 </dd> | |
887 | |
888 <!-- OBJECT METHODS --> | |
889 <dd style="display: none; "> | |
890 <div></div> | |
891 </dd> | |
892 | |
893 <!-- OBJECT EVENT FIELDS --> | |
894 <dd style="display: none; "> | |
895 <div></div> | |
896 </dd> | |
897 | |
898 <!-- FUNCTION PARAMETERS --> | |
899 <dd style="display: none; "> | |
900 <div></div> | |
901 </dd> | |
902 | |
903 </div> | |
904 </div><div> | |
905 <div> | |
906 <dt> | |
907 <var>gender</var> | |
908 <em> | |
909 | |
910 <!-- TYPE --> | |
911 <div style="display:inline"> | |
912 ( | |
913 <span class="optional">optional</span> | |
914 <span class="enum">enumerated</span> | |
915 <span id="typeTemplate"> | |
916 <span style="display: none; "> | |
917 <a> Type</a> | |
918 </span> | |
919 <span> | |
920 <span style="display: none; "> | |
921 array of <span><span></span></span> | |
922 </span> | |
923 <span>string</span> | |
924 <span>["male", "female"]</span> | |
925 </span> | |
926 </span> | |
927 ) | |
928 </div> | |
929 | |
930 </em> | |
931 </dt> | |
932 <dd class="todo" style="display: none; "> | |
933 Undocumented. | |
934 </dd> | |
935 <dd>Gender of voice for synthesized speech.</dd> | |
936 <dd style="display: none; "> | |
937 This parameter was added in version | |
938 <b><span></span></b>. | |
939 You must omit this parameter in earlier versions, | |
940 and you may omit it in any version. If you require this | |
941 parameter, the manifest key | |
942 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
943 can ensure that your extension won't be run in an earlier browser ve rsion. | |
944 </dd> | |
945 | |
946 <!-- OBJECT PROPERTIES --> | |
947 <dd style="display: none; "> | |
948 <dl> | |
949 <div> | |
950 <div> | |
951 </div> | |
952 </div> | |
953 </dl> | |
954 </dd> | |
955 | |
956 <!-- OBJECT METHODS --> | |
957 <dd style="display: none; "> | |
958 <div></div> | |
959 </dd> | |
960 | |
961 <!-- OBJECT EVENT FIELDS --> | |
962 <dd style="display: none; "> | |
963 <div></div> | |
964 </dd> | |
965 | |
966 <!-- FUNCTION PARAMETERS --> | |
967 <dd style="display: none; "> | |
968 <div></div> | |
969 </dd> | |
970 | |
971 </div> | |
972 </div><div> | |
973 <div> | |
974 <dt> | |
975 <var>rate</var> | |
976 <em> | |
977 | |
978 <!-- TYPE --> | |
979 <div style="display:inline"> | |
980 ( | |
981 <span class="optional">optional</span> | |
982 <span class="enum" style="display: none; ">enumerated</span> | |
983 <span id="typeTemplate"> | |
984 <span style="display: none; "> | |
985 <a> Type</a> | |
986 </span> | |
987 <span> | |
988 <span style="display: none; "> | |
989 array of <span><span></span></span> | |
990 </span> | |
991 <span>number</span> | |
992 <span style="display: none; "></span> | |
993 </span> | |
994 </span> | |
995 ) | |
996 </div> | |
997 | |
998 </em> | |
999 </dt> | |
1000 <dd class="todo" style="display: none; "> | |
1001 Undocumented. | |
1002 </dd> | |
1003 <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 would be twic e as fast, and 0.5 would be half as fast. This value is guaranteed to be betwee n 0.1 and 10.0, inclusive. When a voice does not support this full range of rate s, the actual rate should be clipped to the range that is supported without retu rning an error.</dd> | |
kathyw
2011/07/13 20:39:58
See comments for tts.
Also, change the last sente
dmazzoni
2011/07/14 06:50:55
Done.
| |
1004 <dd style="display: none; "> | |
1005 This parameter was added in version | |
1006 <b><span></span></b>. | |
1007 You must omit this parameter in earlier versions, | |
1008 and you may omit it in any version. If you require this | |
1009 parameter, the manifest key | |
1010 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1011 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1012 </dd> | |
1013 | |
1014 <!-- OBJECT PROPERTIES --> | |
1015 <dd style="display: none; "> | |
1016 <dl> | |
1017 <div> | |
1018 <div> | |
1019 </div> | |
1020 </div> | |
1021 </dl> | |
1022 </dd> | |
1023 | |
1024 <!-- OBJECT METHODS --> | |
1025 <dd style="display: none; "> | |
1026 <div></div> | |
1027 </dd> | |
1028 | |
1029 <!-- OBJECT EVENT FIELDS --> | |
1030 <dd style="display: none; "> | |
1031 <div></div> | |
1032 </dd> | |
1033 | |
1034 <!-- FUNCTION PARAMETERS --> | |
1035 <dd style="display: none; "> | |
1036 <div></div> | |
1037 </dd> | |
1038 | |
1039 </div> | |
1040 </div><div> | |
1041 <div> | |
1042 <dt> | |
1043 <var>pitch</var> | |
1044 <em> | |
1045 | |
1046 <!-- TYPE --> | |
1047 <div style="display:inline"> | |
1048 ( | |
1049 <span class="optional">optional</span> | |
1050 <span class="enum" style="display: none; ">enumerated</span> | |
1051 <span id="typeTemplate"> | |
1052 <span style="display: none; "> | |
1053 <a> Type</a> | |
1054 </span> | |
1055 <span> | |
1056 <span style="display: none; "> | |
1057 array of <span><span></span></span> | |
1058 </span> | |
1059 <span>number</span> | |
1060 <span style="display: none; "></span> | |
1061 </span> | |
1062 </span> | |
1063 ) | |
1064 </div> | |
1065 | |
1066 </em> | |
1067 </dt> | |
1068 <dd class="todo" style="display: none; "> | |
1069 Undocumented. | |
1070 </dd> | |
1071 <dd>Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 1 being highest, with 1.0 being the default pitch of this particular voice.</dd> | |
kathyw
2011/07/13 20:39:58
See comments for tts
dmazzoni
2011/07/14 06:50:55
Done.
| |
1072 <dd style="display: none; "> | |
1073 This parameter was added in version | |
1074 <b><span></span></b>. | |
1075 You must omit this parameter in earlier versions, | |
1076 and you may omit it in any version. If you require this | |
1077 parameter, the manifest key | |
1078 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1079 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1080 </dd> | |
1081 | |
1082 <!-- OBJECT PROPERTIES --> | |
1083 <dd style="display: none; "> | |
1084 <dl> | |
1085 <div> | |
1086 <div> | |
1087 </div> | |
1088 </div> | |
1089 </dl> | |
1090 </dd> | |
1091 | |
1092 <!-- OBJECT METHODS --> | |
1093 <dd style="display: none; "> | |
1094 <div></div> | |
1095 </dd> | |
1096 | |
1097 <!-- OBJECT EVENT FIELDS --> | |
1098 <dd style="display: none; "> | |
1099 <div></div> | |
1100 </dd> | |
1101 | |
1102 <!-- FUNCTION PARAMETERS --> | |
1103 <dd style="display: none; "> | |
1104 <div></div> | |
1105 </dd> | |
1106 | |
1107 </div> | |
1108 </div><div> | |
1109 <div> | |
1110 <dt> | |
1111 <var>volume</var> | |
1112 <em> | |
1113 | |
1114 <!-- TYPE --> | |
1115 <div style="display:inline"> | |
1116 ( | |
1117 <span class="optional">optional</span> | |
1118 <span class="enum" style="display: none; ">enumerated</span> | |
1119 <span id="typeTemplate"> | |
1120 <span style="display: none; "> | |
1121 <a> Type</a> | |
1122 </span> | |
1123 <span> | |
1124 <span style="display: none; "> | |
1125 array of <span><span></span></span> | |
1126 </span> | |
1127 <span>number</span> | |
1128 <span style="display: none; "></span> | |
1129 </span> | |
1130 </span> | |
1131 ) | |
1132 </div> | |
1133 | |
1134 </em> | |
1135 </dt> | |
1136 <dd class="todo" style="display: none; "> | |
1137 Undocumented. | |
1138 </dd> | |
1139 <dd>Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0.</dd> | |
1140 <dd style="display: none; "> | |
1141 This parameter was added in version | |
1142 <b><span></span></b>. | |
1143 You must omit this parameter in earlier versions, | |
1144 and you may omit it in any version. If you require this | |
1145 parameter, the manifest key | |
1146 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1147 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1148 </dd> | |
1149 | |
1150 <!-- OBJECT PROPERTIES --> | |
1151 <dd style="display: none; "> | |
1152 <dl> | |
1153 <div> | |
1154 <div> | |
1155 </div> | |
1156 </div> | |
1157 </dl> | |
1158 </dd> | |
1159 | |
1160 <!-- OBJECT METHODS --> | |
1161 <dd style="display: none; "> | |
1162 <div></div> | |
1163 </dd> | |
1164 | |
1165 <!-- OBJECT EVENT FIELDS --> | |
1166 <dd style="display: none; "> | |
1167 <div></div> | |
1168 </dd> | |
1169 | |
1170 <!-- FUNCTION PARAMETERS --> | |
1171 <dd style="display: none; "> | |
1172 <div></div> | |
1173 </dd> | |
1174 | |
1175 </div> | |
1176 </div> | |
1177 </dl> | |
1178 </dd> | |
1179 | |
1180 <!-- OBJECT METHODS --> | |
1181 <dd style="display: none; "> | |
1182 <div></div> | |
1183 </dd> | |
1184 | |
1185 <!-- OBJECT EVENT FIELDS --> | |
1186 <dd style="display: none; "> | |
1187 <div></div> | |
1188 </dd> | |
1189 | |
1190 <!-- FUNCTION PARAMETERS --> | |
1191 <dd style="display: none; "> | |
1192 <div></div> | |
1193 </dd> | |
1194 | |
1195 </div> | |
1196 </div><div> | |
1197 <div> | |
1198 <dt> | |
1199 <var>sendTtsEvent</var> | |
1200 <em> | |
1201 | |
1202 <!-- TYPE --> | |
1203 <div style="display:inline"> | |
1204 ( | |
1205 <span class="optional" style="display: none; ">optional</spa n> | |
1206 <span class="enum" style="display: none; ">enumerated</span> | |
1207 <span id="typeTemplate"> | |
1208 <span style="display: none; "> | |
1209 <a> Type</a> | |
1210 </span> | |
1211 <span> | |
1212 <span style="display: none; "> | |
1213 array of <span><span></span></span> | |
1214 </span> | |
1215 <span>function</span> | |
1216 <span style="display: none; "></span> | |
1217 </span> | |
1218 </span> | |
1219 ) | |
1220 </div> | |
1221 | |
1222 </em> | |
1223 </dt> | |
1224 <dd class="todo" style="display: none; "> | |
1225 Undocumented. | |
1226 </dd> | |
1227 <dd>Call this function with events that occur in the process of speaki ng the utterance.</dd> | |
1228 <dd style="display: none; "> | |
1229 This parameter was added in version | |
1230 <b><span></span></b>. | |
1231 You must omit this parameter in earlier versions, | |
1232 and you may omit it in any version. If you require this | |
1233 parameter, the manifest key | |
1234 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1235 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1236 </dd> | |
1237 | |
1238 <!-- OBJECT PROPERTIES --> | |
1239 <dd style="display: none; "> | |
1240 <dl> | |
1241 <div> | |
1242 <div> | |
1243 </div> | |
1244 </div> | |
1245 </dl> | |
1246 </dd> | |
1247 | |
1248 <!-- OBJECT METHODS --> | |
1249 <dd style="display: none; "> | |
1250 <div></div> | |
1251 </dd> | |
1252 | |
1253 <!-- OBJECT EVENT FIELDS --> | |
1254 <dd style="display: none; "> | |
1255 <div></div> | |
1256 </dd> | |
1257 | |
1258 <!-- FUNCTION PARAMETERS --> | |
1259 <dd> | |
1260 <div> | |
1261 <h5>Parameters</h5> | |
1262 <dl> | |
1263 <div> | |
1264 <div> | |
1265 <dt> | |
1266 <var>event</var> | |
1267 <em> | |
1268 | |
1269 <!-- TYPE --> | |
1270 <div style="display:inline"> | |
1271 ( | |
1272 <span class="optional" style="display: none; ">optional</spa n> | |
1273 <span class="enum" style="display: none; ">enumerated</span> | |
1274 <span id="typeTemplate"> | |
1275 <span> | |
1276 <a href="experimental.tts.html#type-TtsEvent">TtsEvent</ a> | |
1277 </span> | |
1278 <span style="display: none; "> | |
1279 <span> | |
1280 array of <span><span></span></span> | |
1281 </span> | |
1282 <span>paramType</span> | |
1283 <span></span> | |
1284 </span> | |
1285 </span> | |
1286 ) | |
1287 </div> | |
1288 | |
1289 </em> | |
1290 </dt> | |
1291 <dd class="todo" style="display: none; "> | |
1292 Undocumented. | |
1293 </dd> | |
1294 <dd>The event from the text-to-speech engine indicating the status of this utterance.</dd> | |
1295 <dd style="display: none; "> | |
1296 This parameter was added in version | |
1297 <b><span></span></b>. | |
1298 You must omit this parameter in earlier versions, | |
1299 and you may omit it in any version. If you require this | |
1300 parameter, the manifest key | |
1301 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1302 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1303 </dd> | |
1304 | |
1305 <!-- OBJECT PROPERTIES --> | |
1306 <dd style="display: none; "> | |
1307 <dl> | |
1308 <div> | |
1309 <div> | |
1310 </div> | |
1311 </div> | |
1312 </dl> | |
1313 </dd> | |
1314 | |
1315 <!-- OBJECT METHODS --> | |
1316 <dd style="display: none; "> | |
1317 <div></div> | |
1318 </dd> | |
1319 | |
1320 <!-- OBJECT EVENT FIELDS --> | |
1321 <dd style="display: none; "> | |
1322 <div></div> | |
1323 </dd> | |
1324 | |
1325 <!-- FUNCTION PARAMETERS --> | |
1326 <dd style="display: none; "> | |
1327 <div></div> | |
1328 </dd> | |
1329 | |
1330 </div> | |
1331 </div> | |
1332 </dl> | |
1333 </div> | |
1334 </dd> | |
1335 | |
1336 </div> | |
1337 </div><div> | |
1338 <div> | |
1339 <dt> | |
1340 <var>id</var> | |
1341 <em> | |
1342 | |
1343 <!-- TYPE --> | |
1344 <div style="display:inline"> | |
1345 ( | |
1346 <span class="optional">optional</span> | |
1347 <span class="enum" style="display: none; ">enumerated</span> | |
1348 <span id="typeTemplate"> | |
1349 <span style="display: none; "> | |
1350 <a> Type</a> | |
1351 </span> | |
1352 <span> | |
1353 <span style="display: none; "> | |
1354 array of <span><span></span></span> | |
1355 </span> | |
1356 <span>number</span> | |
1357 <span style="display: none; "></span> | |
1358 </span> | |
1359 </span> | |
1360 ) | |
1361 </div> | |
1362 | |
1363 </em> | |
1364 </dt> | |
1365 <dd class="todo" style="display: none; "> | |
1366 Undocumented. | |
1367 </dd> | |
1368 <dd>The utterance id, used internally.</dd> | |
1369 <dd style="display: none; "> | |
1370 This parameter was added in version | |
1371 <b><span></span></b>. | |
1372 You must omit this parameter in earlier versions, | |
1373 and you may omit it in any version. If you require this | |
1374 parameter, the manifest key | |
1375 <a href="manifest.html#minimum_chrome_version">minimum_chrome_versio n</a> | |
1376 can ensure that your extension won't be run in an earlier browser ve rsion. | |
1377 </dd> | |
1378 | |
1379 <!-- OBJECT PROPERTIES --> | |
1380 <dd style="display: none; "> | |
1381 <dl> | |
1382 <div> | |
1383 <div> | |
1384 </div> | |
1385 </div> | |
1386 </dl> | |
1387 </dd> | |
1388 | |
1389 <!-- OBJECT METHODS --> | |
1390 <dd style="display: none; "> | |
1391 <div></div> | |
1392 </dd> | |
1393 | |
1394 <!-- OBJECT EVENT FIELDS --> | |
1395 <dd style="display: none; "> | |
1396 <div></div> | |
1397 </dd> | |
1398 | |
1399 <!-- FUNCTION PARAMETERS --> | |
1400 <dd style="display: none; "> | |
1401 <div></div> | |
1402 </dd> | |
1403 | |
1404 </div> | |
1405 </div> | |
1406 </dl> | |
1407 </div> | |
1408 | |
1409 <!-- EXTRA PARAMETERS --> | |
1410 <div style="display: none; "> | |
1411 <h4>Extra parameters to addListener</h4> | |
1412 <dl> | |
1413 <div> | |
1414 <div> | |
1415 </div> | |
1416 </div> | |
1417 </dl> | |
1418 </div> | |
1419 | |
1420 <!-- LISTENER RETURN VALUE --> | |
1421 <h4 style="display: none; ">Listener returns</h4> | |
1422 <dl> | |
1423 <div style="display: none; "> | |
1424 <div> | |
1425 </div> | |
1426 </div> | |
1427 </dl> | |
1428 | |
1429 </div> <!-- /description --> | |
1430 </div><div class="apiItem"> | |
1431 <a name="event-onStop"></a> | |
1432 <h4>onStop</h4> | |
1433 | |
1434 <div class="summary"> | |
1435 <!-- Note: intentionally longer 80 columns --> | |
1436 <span class="subdued">chrome.experimental.tts_engine.</span><spa n>onStop</span><span class="subdued">.addListener</span>(function(<span></span>) <span class="subdued">{...}</span><span></span>)); | |
1437 </div> | |
1438 | |
1439 <div class="description"> | |
1440 <p class="todo" style="display: none; ">Undocumented.</p> | |
1441 <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> | |
1442 | |
1443 <!-- LISTENER PARAMETERS --> | |
1444 <div style="display: none; "> | |
1445 <h4>Listener parameters</h4> | |
1446 <dl> | |
1447 <div> | |
1448 <div> | |
1449 </div> | |
1450 </div> | |
1451 </dl> | |
1452 </div> | |
1453 | |
1454 <!-- EXTRA PARAMETERS --> | |
1455 <div style="display: none; "> | |
1456 <h4>Extra parameters to addListener</h4> | |
1457 <dl> | |
1458 <div> | |
1459 <div> | |
1460 </div> | |
1461 </div> | |
1462 </dl> | |
1463 </div> | |
1464 | |
1465 <!-- LISTENER RETURN VALUE --> | |
1466 <h4 style="display: none; ">Listener returns</h4> | |
1467 <dl> | |
1468 <div style="display: none; "> | |
1469 <div> | |
1470 </div> | |
1471 </div> | |
1472 </dl> | |
1473 | |
1474 </div> <!-- /description --> | |
1475 </div> <!-- /apiItem --> | |
1476 | |
1477 </div> <!-- /apiGroup --> | |
1478 | |
1479 <!-- TYPES --> | |
1480 <div class="apiGroup" style="display: none; "> | |
1481 <a name="types"></a> | |
1482 <h3 id="types">Types</h3> | |
1483 | |
1484 <!-- iterates over all types --> | |
1485 <div class="apiItem"> | |
1486 <a></a> | |
1487 <h4>type name</h4> | |
1488 | |
1489 <div> | |
1490 </div> | |
1491 | |
1492 </div> <!-- /apiItem --> | |
1493 | |
1494 </div> <!-- /apiGroup --> | |
1495 | |
1496 </div> <!-- /apiPage --> | |
1497 </div> <!-- /gc-pagecontent --> | |
1498 </div> <!-- /g-section --> | |
1499 </div> <!-- /codesiteContent --> | |
1500 <div id="gc-footer" --=""> | |
1501 <div class="text"> | |
1502 <p> | |
1503 Except as otherwise <a href="http://code.google.com/policies.html#restrictions ">noted</a>, | |
1504 the content of this page is licensed under the <a rel="license" href="http://c reativecommons.org/licenses/by/3.0/">Creative Commons | |
1505 Attribution 3.0 License</a>, and code samples are licensed under the | |
1506 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic ense</a>. | |
1507 </p> | |
1508 <p> | |
1509 ©2011 Google | |
1510 </p> | |
1511 | |
1512 <!-- begin analytics --> | |
1513 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">< /script> | |
1514 <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></scr ipt> | |
1515 | |
1516 <script type="text/javascript"> | |
1517 // chrome doc tracking | |
1518 try { | |
1519 var engdocs = _gat._getTracker("YT-10763712-2"); | |
1520 engdocs._trackPageview(); | |
1521 } catch(err) {} | |
1522 | |
1523 // code.google.com site-wide tracking | |
1524 try { | |
1525 _uacct="UA-18071-1"; | |
1526 _uanchor=1; | |
1527 _uff=0; | |
1528 urchinTracker(); | |
1529 } | |
1530 catch(e) {/* urchinTracker not available. */} | |
1531 </script> | |
1532 <!-- end analytics --> | |
1533 </div> | |
1534 </div> <!-- /gc-footer --> | |
1535 </div> <!-- /gc-container --> | |
1536 </body></html> | |
OLD | NEW |