| 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 // A Java counterpart will be generated for this enum. | 10 // A Java counterpart will be generated for this enum. |
| 11 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content_public.common | 11 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.content_public.common |
| 12 // GENERATED_JAVA_PREFIX_TO_STRIP: SPEECH_RECOGNITION_ERROR_ | 12 // GENERATED_JAVA_PREFIX_TO_STRIP: SPEECH_RECOGNITION_ERROR_ |
| 13 enum SpeechRecognitionErrorCode { | 13 enum SpeechRecognitionErrorCode { |
| 14 // There was no error. | 14 // There was no error. |
| 15 SPEECH_RECOGNITION_ERROR_NONE, | 15 SPEECH_RECOGNITION_ERROR_NONE, |
| 16 | 16 |
| 17 // No speech heard before timeout. |
| 18 SPEECH_RECOGNITION_ERROR_NO_SPEECH, |
| 19 |
| 17 // The user or a script aborted speech input. | 20 // The user or a script aborted speech input. |
| 18 SPEECH_RECOGNITION_ERROR_ABORTED, | 21 SPEECH_RECOGNITION_ERROR_ABORTED, |
| 19 | 22 |
| 20 // There was an error with recording audio. | 23 // There was an error with recording audio. |
| 21 SPEECH_RECOGNITION_ERROR_AUDIO, | 24 SPEECH_RECOGNITION_ERROR_AUDIO, |
| 22 | 25 |
| 23 // There was a network error. | 26 // There was a network error. |
| 24 SPEECH_RECOGNITION_ERROR_NETWORK, | 27 SPEECH_RECOGNITION_ERROR_NETWORK, |
| 25 | 28 |
| 26 // Not allowed for privacy or security reasons. | 29 // Not allowed for privacy or security reasons. |
| 27 SPEECH_RECOGNITION_ERROR_NOT_ALLOWED, | 30 SPEECH_RECOGNITION_ERROR_NOT_ALLOWED, |
| 28 | 31 |
| 29 // No speech heard before timeout. | 32 // Speech service is not allowed for privacy or security reasons. |
| 30 SPEECH_RECOGNITION_ERROR_NO_SPEECH, | 33 SPEECH_RECOGNITION_ERROR_SERVICE_NOT_ALLOWED, |
| 34 |
| 35 // There was an error in the speech recognition grammar. |
| 36 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR, |
| 37 |
| 38 // The language was not supported. |
| 39 SPEECH_RECOGNITION_ERROR_LANGUAGE_NOT_SUPPORTED, |
| 31 | 40 |
| 32 // Speech was heard, but could not be interpreted. | 41 // Speech was heard, but could not be interpreted. |
| 33 SPEECH_RECOGNITION_ERROR_NO_MATCH, | 42 SPEECH_RECOGNITION_ERROR_NO_MATCH, |
| 34 | 43 |
| 35 // There was an error in the speech recognition grammar. | 44 SPEECH_RECOGNITION_ERROR_LAST = SPEECH_RECOGNITION_ERROR_NO_MATCH, |
| 36 SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR, | |
| 37 SPEECH_RECOGNITION_ERROR_LAST = SPEECH_RECOGNITION_ERROR_BAD_GRAMMAR, | |
| 38 }; | 45 }; |
| 39 | 46 |
| 40 // Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error. | 47 // Error details for the SPEECH_RECOGNITION_ERROR_AUDIO error. |
| 41 enum SpeechAudioErrorDetails { | 48 enum SpeechAudioErrorDetails { |
| 42 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0, | 49 SPEECH_AUDIO_ERROR_DETAILS_NONE = 0, |
| 43 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC, | 50 SPEECH_AUDIO_ERROR_DETAILS_NO_MIC, |
| 44 SPEECH_AUDIO_ERROR_DETAILS_LAST = SPEECH_AUDIO_ERROR_DETAILS_NO_MIC | 51 SPEECH_AUDIO_ERROR_DETAILS_LAST = SPEECH_AUDIO_ERROR_DETAILS_NO_MIC |
| 45 }; | 52 }; |
| 46 | 53 |
| 47 struct CONTENT_EXPORT SpeechRecognitionError { | 54 struct CONTENT_EXPORT SpeechRecognitionError { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 59 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, | 66 SpeechRecognitionError(SpeechRecognitionErrorCode code_value, |
| 60 SpeechAudioErrorDetails details_value) | 67 SpeechAudioErrorDetails details_value) |
| 61 : code(code_value), | 68 : code(code_value), |
| 62 details(details_value) { | 69 details(details_value) { |
| 63 } | 70 } |
| 64 }; | 71 }; |
| 65 | 72 |
| 66 } // namespace content | 73 } // namespace content |
| 67 | 74 |
| 68 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ | 75 #endif // CONTENT_PUBLIC_COMMON_SPEECH_RECOGNITION_ERROR_H_ |
| OLD | NEW |