OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INPUT_RESULT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_TRAITS_H_ |
Satish
2012/03/05 13:32:33
suggest naming this file as 'speech_recognition_re
Primiano Tucci (use gerrit)
2012/03/05 17:37:52
Done.
| |
6 #define CONTENT_PUBLIC_COMMON_SPEECH_INPUT_RESULT_H_ | 6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_TRAITS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 struct SpeechInputHypothesis { | 16 struct SpeechInputHypothesis { |
Satish
2012/03/05 13:32:33
could also rename these 'Input' to 'Recognition',
Primiano Tucci (use gerrit)
2012/03/05 17:37:52
Done.
| |
17 string16 utterance; | 17 string16 utterance; |
18 double confidence; | 18 double confidence; |
19 | 19 |
20 SpeechInputHypothesis() : confidence(0.0) {} | 20 SpeechInputHypothesis() : confidence(0.0) {} |
21 | 21 |
22 SpeechInputHypothesis(const string16 utterance_value, double confidence_value) | 22 SpeechInputHypothesis(const string16 utterance_value, double confidence_value) |
23 : utterance(utterance_value), | 23 : utterance(utterance_value), |
24 confidence(confidence_value) { | 24 confidence(confidence_value) { |
25 } | 25 } |
26 }; | 26 }; |
(...skipping 12 matching lines...) Expand all Loading... | |
39 // There was a network error. | 39 // There was a network error. |
40 SPEECH_INPUT_ERROR_NETWORK, | 40 SPEECH_INPUT_ERROR_NETWORK, |
41 // No speech heard before timeout. | 41 // No speech heard before timeout. |
42 SPEECH_INPUT_ERROR_NO_SPEECH, | 42 SPEECH_INPUT_ERROR_NO_SPEECH, |
43 // Speech was heard, but could not be interpreted. | 43 // Speech was heard, but could not be interpreted. |
44 SPEECH_INPUT_ERROR_NO_MATCH, | 44 SPEECH_INPUT_ERROR_NO_MATCH, |
45 // There was an error in the speech recognition grammar. | 45 // There was an error in the speech recognition grammar. |
46 SPEECH_INPUT_ERROR_BAD_GRAMMAR, | 46 SPEECH_INPUT_ERROR_BAD_GRAMMAR, |
47 }; | 47 }; |
48 | 48 |
49 struct CONTENT_EXPORT SpeechInputResult { | 49 struct CONTENT_EXPORT SpeechInputResult { |
hans
2012/03/05 13:26:33
looking at this file's name, I would expect it to
Primiano Tucci (use gerrit)
2012/03/05 17:37:52
Done.
| |
50 SpeechInputError error; | 50 SpeechInputError error; |
51 SpeechInputHypothesisArray hypotheses; | 51 SpeechInputHypothesisArray hypotheses; |
52 | 52 |
53 SpeechInputResult(); | 53 SpeechInputResult() : error(SPEECH_INPUT_ERROR_NONE) {} |
54 ~SpeechInputResult(); | 54 ~SpeechInputResult() {} |
55 }; | 55 }; |
56 | 56 |
57 } // namespace content | 57 } // namespace content |
58 | 58 |
59 #endif // CONTENT_PUBLIC_COMMON_SPEECH_INPUT_RESULT_H_ | 59 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_TRAITS_H_ |
OLD | NEW |