| OLD | NEW |
| 1 <h2 id="overview">Overview</h2> | 1 <h2 id="overview">Overview</h2> |
| 2 | 2 |
| 3 <p>An extension can register itself as a speech engine. By doing so, it | 3 <p>An extension can register itself as a speech engine. By doing so, it |
| 4 can intercept some or all calls to functions such as | 4 can intercept some or all calls to functions such as |
| 5 $(ref:tts.speak) and | 5 $(ref:tts.speak) and |
| 6 $(ref:tts.stop) | 6 $(ref:tts.stop) |
| 7 and provide an alternate implementation. | 7 and provide an alternate implementation. |
| 8 Extensions are free to use any available web technology | 8 Extensions are free to use any available web technology |
| 9 to provide speech, including streaming audio from a server, HTML5 audio, | 9 to provide speech, including streaming audio from a server, HTML5 audio, |
| 10 Native Client, or Flash. An extension could even do something different | 10 Native Client, or Flash. An extension could even do something different |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 "event_types": ["start", "marker", "end"] | 31 "event_types": ["start", "marker", "end"] |
| 32 }, | 32 }, |
| 33 { | 33 { |
| 34 "voice_name": "Pat", | 34 "voice_name": "Pat", |
| 35 "lang": "en-US", | 35 "lang": "en-US", |
| 36 "event_types": ["end"] | 36 "event_types": ["end"] |
| 37 } | 37 } |
| 38 ] | 38 ] |
| 39 },</b> | 39 },</b> |
| 40 "background": { | 40 "background": { |
| 41 "page": "background.html", | 41 "page": "background", |
| 42 "persistent": false | 42 "persistent": false |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 </pre> | 45 </pre> |
| 46 | 46 |
| 47 <p>An extension can specify any number of voices.</p> | 47 <p>An extension can specify any number of voices.</p> |
| 48 | 48 |
| 49 <p>The <code>voice_name</code> parameter is required. The name should be | 49 <p>The <code>voice_name</code> parameter is required. The name should be |
| 50 descriptive enough that it identifies the name of the voice and the | 50 descriptive enough that it identifies the name of the voice and the |
| 51 engine used. In the unlikely event that two extensions register voices | 51 engine used. In the unlikely event that two extensions register voices |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 If your extension does not register listeners for both | 135 If your extension does not register listeners for both |
| 136 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any | 136 <code>onSpeak</code> and <code>onStop</code>, it will not intercept any |
| 137 speech calls, regardless of what is in the manifest.</p> | 137 speech calls, regardless of what is in the manifest.</p> |
| 138 | 138 |
| 139 <p>The decision of whether or not to send a given speech request to an | 139 <p>The decision of whether or not to send a given speech request to an |
| 140 extension is based solely on whether the extension supports the given voice | 140 extension is based solely on whether the extension supports the given voice |
| 141 parameters in its manifest and has registered listeners | 141 parameters in its manifest and has registered listeners |
| 142 for <code>onSpeak</code> and <code>onStop</code>. In other words, | 142 for <code>onSpeak</code> and <code>onStop</code>. In other words, |
| 143 there's no way for an extension to receive a speech request and | 143 there's no way for an extension to receive a speech request and |
| 144 dynamically decide whether to handle it.</p> | 144 dynamically decide whether to handle it.</p> |
| OLD | NEW |