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

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: Final review fixes. 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 30 matching lines...) Expand all
41 // There was a network error. 41 // There was a network error.
42 SPEECH_RECOGNITION_ERROR_NETWORK, 42 SPEECH_RECOGNITION_ERROR_NETWORK,
43 // No speech heard before timeout. 43 // No speech heard before timeout.
44 SPEECH_RECOGNITION_ERROR_NO_SPEECH, 44 SPEECH_RECOGNITION_ERROR_NO_SPEECH,
45 // Speech was heard, but could not be interpreted. 45 // Speech was heard, but could not be interpreted.
46 SPEECH_RECOGNITION_ERROR_NO_MATCH, 46 SPEECH_RECOGNITION_ERROR_NO_MATCH,
47 // There was an error in the speech recognition grammar. 47 // There was an error in the speech recognition grammar.
48 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR, 48 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR,
49 }; 49 };
50 50
51 // Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error.
52 enum SpeechAudioErrorDetails {
53 AUDIO_ERROR_UNKNOWN = 0,
54 AUDIO_ERROR_NO_MIC,
55 AUDIO_ERROR_MIC_IN_USE
56 };
57
58 struct CONTENT_EXPORT SpeechRecognitionError {
jam 2012/03/22 17:31:08 please see http://www.chromium.org/developers/cont
59 SpeechRecognitionErrorCode code;
60 int details;
61
62 SpeechRecognitionError();
63 SpeechRecognitionError(SpeechRecognitionErrorCode code_value);
64 SpeechRecognitionError(SpeechRecognitionErrorCode code_val, int details_val);
65 };
66
51 struct CONTENT_EXPORT SpeechRecognitionResult { 67 struct CONTENT_EXPORT SpeechRecognitionResult {
52 SpeechRecognitionErrorCode error; 68 SpeechRecognitionErrorCode error; // TODO(primiano) This is transitional.
53 SpeechRecognitionHypothesisArray hypotheses; 69 SpeechRecognitionHypothesisArray hypotheses;
54 70
55 SpeechRecognitionResult(); 71 SpeechRecognitionResult();
56 ~SpeechRecognitionResult(); 72 ~SpeechRecognitionResult();
57 }; 73 };
58 74
59 } // namespace content 75 } // namespace content
60 76
61 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_ 77 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_RESULT_H_
OLDNEW
« no previous file with comments | « content/public/browser/speech_recognizer.h ('k') | content/public/common/speech_recognition_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698