OLD | NEW |
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_ERROR_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ |
6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ | 6 #define CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 // This enumeration follows the values described here: | |
11 // http://www.w3.org/2005/Incubator/htmlspeech/2010/10/google-api-draft.html#spe
ech-input-error | |
12 enum SpeechRecognitionErrorCode { | 10 enum SpeechRecognitionErrorCode { |
13 // There was no error. | 11 // There was no error. |
14 SPEECH_RECOGNITION_ERROR_NONE = 0, | 12 SPEECH_RECOGNITION_ERROR_NONE = 0, |
15 // The user or a script aborted speech input. | 13 // The user or a script aborted speech input. |
16 SPEECH_RECOGNITION_ERROR_ABORTED, | 14 SPEECH_RECOGNITION_ERROR_ABORTED, |
17 // There was an error with recording audio. | 15 // There was an error with recording audio. |
18 SPEECH_RECOGNITION_ERROR_AUDIO, | 16 SPEECH_RECOGNITION_ERROR_AUDIO, |
19 // There was a network error. | 17 // There was a network error. |
20 SPEECH_RECOGNITION_ERROR_NETWORK, | 18 SPEECH_RECOGNITION_ERROR_NETWORK, |
21 // No speech heard before timeout. | 19 // No speech heard before timeout. |
(...skipping 26 matching lines...) Expand all Loading... |
48 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, | 46 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, |
49 SpeechAudioErrorDetails details_value) | 47 SpeechAudioErrorDetails details_value) |
50 : code(code_value), | 48 : code(code_value), |
51 details(details_value) { | 49 details(details_value) { |
52 } | 50 } |
53 }; | 51 }; |
54 | 52 |
55 } // namespace content | 53 } // namespace content |
56 | 54 |
57 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ | 55 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ |
OLD | NEW |