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_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 protected: | 77 protected: |
78 virtual ~Delegate() {} | 78 virtual ~Delegate() {} |
79 }; | 79 }; |
80 | 80 |
81 SpeechRecognizer(Delegate* delegate, | 81 SpeechRecognizer(Delegate* delegate, |
82 int caller_id, | 82 int caller_id, |
83 const std::string& language, | 83 const std::string& language, |
84 const std::string& grammar, | 84 const std::string& grammar, |
85 const std::string& hardware_info, | 85 const std::string& hardware_info, |
86 const std::string& origin_url); | 86 const std::string& origin_url); |
87 ~SpeechRecognizer(); | 87 virtual ~SpeechRecognizer(); |
88 | 88 |
89 // Starts audio recording and does recognition after recording ends. The same | 89 // Starts audio recording and does recognition after recording ends. The same |
90 // SpeechRecognizer instance can be used multiple times for speech recognition | 90 // SpeechRecognizer instance can be used multiple times for speech recognition |
91 // though each recognition request can be made only after the previous one | 91 // though each recognition request can be made only after the previous one |
92 // completes (i.e. after receiving Delegate::DidCompleteRecognition). | 92 // completes (i.e. after receiving Delegate::DidCompleteRecognition). |
93 bool StartRecording(); | 93 bool StartRecording(); |
94 | 94 |
95 // Stops recording audio and starts recognition. | 95 // Stops recording audio and starts recognition. |
96 void StopRecording(); | 96 void StopRecording(); |
97 | 97 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 // This typedef is to workaround the issue with certain versions of | 148 // This typedef is to workaround the issue with certain versions of |
149 // Visual Studio where it gets confused between multiple Delegate | 149 // Visual Studio where it gets confused between multiple Delegate |
150 // classes and gives a C2500 error. (I saw this error on the try bots - | 150 // classes and gives a C2500 error. (I saw this error on the try bots - |
151 // the workaround was not needed for my machine). | 151 // the workaround was not needed for my machine). |
152 typedef SpeechRecognizer::Delegate SpeechRecognizerDelegate; | 152 typedef SpeechRecognizer::Delegate SpeechRecognizerDelegate; |
153 | 153 |
154 } // namespace speech_input | 154 } // namespace speech_input |
155 | 155 |
156 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ | 156 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
OLD | NEW |