Chromium Code Reviews| Index: content/common/speech_input_result.h |
| diff --git a/content/common/speech_input_result.h b/content/common/speech_input_result.h |
| index ed85959dca334ace84233c8ff57ee3a01a9dc4e5..fb4232eef450d6437318b6166529b765b3987142 100644 |
| --- a/content/common/speech_input_result.h |
| +++ b/content/common/speech_input_result.h |
| @@ -12,21 +12,39 @@ |
| namespace speech_input { |
| -struct SpeechInputResultItem { |
| +struct SpeechInputHypothesis { |
| string16 utterance; |
| double confidence; |
| - SpeechInputResultItem() |
| - : confidence(0.0) { |
| - } |
| + SpeechInputHypothesis() : confidence(0.0) {} |
| - SpeechInputResultItem(const string16 utterance_value, double confidence_value) |
| + SpeechInputHypothesis(const string16 utterance_value, double confidence_value) |
| : utterance(utterance_value), |
| confidence(confidence_value) { |
| } |
| }; |
| -typedef std::vector<SpeechInputResultItem> SpeechInputResultArray; |
| +typedef std::vector<SpeechInputHypothesis> SpeechInputHypothesisArray; |
| + |
| +// This enumeration follows the values described here: |
| +// http://www.w3.org/2005/Incubator/htmlspeech/2010/10/ (continues below) |
|
Satish
2011/10/06 20:30:12
I think it is fine to have URLs > 80 chars, please
Leandro Graciá Gil
2011/10/06 22:00:28
Done.
|
| +// google-api-draft.html#speech-input-error |
| +enum SpeechInputError { |
| + kErrorNone = 0, // There was no error. |
| + kErrorAborted, // The user or a script aborted speech input. |
| + kErrorAudio, // There was an error with recording audio. |
| + kErrorNetwork, // There was a network error. |
| + kErrorNoSpeech, // No speech heard before timeout. |
| + kErrorNoMatch, // Speech was heard, but could not be interpreted. |
| + kErrorBadGrammar, // There was an error in the speech recognition grammar. |
| +}; |
| + |
| +struct SpeechInputResult { |
| + SpeechInputError error; |
| + SpeechInputHypothesisArray hypotheses; |
| + |
| + SpeechInputResult() : error(kErrorNone) {} |
|
Satish
2011/10/06 20:30:12
mac bot complains about this, needs to go into a .
Leandro Graciá Gil
2011/10/06 22:00:28
Done.
|
| +}; |
| } // namespace speech_input |