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

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

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

Powered by Google App Engine
This is Rietveld 408576698