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

Side by Side Diff: content/public/common/speech_recognition_result.h

Issue 9663066: Refactoring of chrome speech recognition architecture (CL1.3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation issues on windows. Created 8 years, 9 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 SpeechRecognitionHypothesis(const string16 utterance_value, 22 SpeechRecognitionHypothesis(const string16 utterance_value,
23 double confidence_value) 23 double confidence_value)
24 : utterance(utterance_value), 24 : utterance(utterance_value),
25 confidence(confidence_value) { 25 confidence(confidence_value) {
26 } 26 }
27 }; 27 };
28 28
29 typedef std::vector<SpeechRecognitionHypothesis> 29 typedef std::vector<SpeechRecognitionHypothesis>
30 SpeechRecognitionHypothesisArray; 30 SpeechRecognitionHypothesisArray;
31 31
32 // This enumeration follows the values described here:
33 // http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html#spe ech-input-error
34 enum SpeechRecognitionErrorCode {
35 // There was no error.
36 SPEECH_RECOGNITION_ERROR_NONE = 0,
37 // The user or a script aborted speech input.
38 SPEECH_RECOGNITION_ERROR_ABORTED,
39 // There was an error with recording audio.
40 SPEECH_RECOGNITION_ERROR_AUDIO,
41 // There was a network error.
42 SPEECH_RECOGNITION_ERROR_NETWORK,
43 // No speech heard before timeout.
44 SPEECH_RECOGNITION_ERROR_NO_SPEECH,
45 // Speech was heard, but could not be interpreted.
46 SPEECH_RECOGNITION_ERROR_NO_MATCH,
47 // There was an error in the speech recognition grammar.
48 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR,
49 };
50
51 struct CONTENT_EXPORT SpeechRecognitionResult { 32 struct CONTENT_EXPORT SpeechRecognitionResult {
52 SpeechRecognitionErrorCode error;
53 SpeechRecognitionHypothesisArray hypotheses; 33 SpeechRecognitionHypothesisArray hypotheses;
54 34
55 SpeechRecognitionResult(); 35 SpeechRecognitionResult();
56 ~SpeechRecognitionResult(); 36 ~SpeechRecognitionResult();
57 }; 37 };
58 38
59 } // namespace content 39 } // namespace content
60 40
61 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 41 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
OLDNEW
« no previous file with comments | « content/public/common/speech_recognition_error.h ('k') | content/public/common/speech_recognition_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698