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

Side by Side Diff: chrome/common/extensions/docs/server2/templates/intros/experimental_speechInput.html

Issue 10832042: Extensions Docs Server: Doc conversion script (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: script/build.py fixes Created 8 years, 4 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
1 <!-- BEGIN AUTHORED CONTENT -->
2 <p id="classSummary"> 1 <p id="classSummary">
3 The <code>chrome.experimental.speechInput</code> module provides 2 The <code>chrome.experimental.speechInput</code> module provides
4 one-shot speech recognition to Chrome extensions. 3 one-shot speech recognition to Chrome extensions.
5 This module is still experimental. For information on how to use experimental 4 This module is still experimental. For information on how to use experimental
6 APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page. 5 APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
7 </p> 6 </p>
8 <h2 id="manifest">Manifest</h2> 7 <h2 id="manifest">Manifest</h2>
9 <p>You must declare the "experimental" permission in the <a 8 <p>You must declare the "experimental" permission in the <a
10 href="manifest.html">extension manifest</a> to use the speech input 9 href="manifest.html">extension manifest</a> to use the speech input
11 API. 10 API.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 76 }
78 function recognitionFailed(error) { 77 function recognitionFailed(error) {
79 alert("Speech input failed: " + error.code); 78 alert("Speech input failed: " + error.code);
80 } 79 }
81 function recognitionSucceeded(result) { 80 function recognitionSucceeded(result) {
82 alert("Recognized '" + result.hypotheses[0].utterance + "' with confidence " + result.hypotheses[0].confidence); 81 alert("Recognized '" + result.hypotheses[0].utterance + "' with confidence " + result.hypotheses[0].confidence);
83 } 82 }
84 chrome.experimental.speechInput.onError.addListener(recognitionFailed); 83 chrome.experimental.speechInput.onError.addListener(recognitionFailed);
85 chrome.experimental.speechInput.onResult.addListener(recognitionSucceeded); 84 chrome.experimental.speechInput.onResult.addListener(recognitionSucceeded);
86 chrome.experimental.speechInput.start({ "language": "en" }, checkStart); 85 chrome.experimental.speechInput.start({ "language": "en" }, checkStart);
87 </pre> 86 </pre>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698