| Index: content/browser/speech/speech_recognizer_impl.h
|
| diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
|
| index b047174401685c7e57d44c33d30335fa4f3d880a..a624e5a84203f1a2d9fc457630a7c4c5084d34f3 100644
|
| --- a/content/browser/speech/speech_recognizer_impl.h
|
| +++ b/content/browser/speech/speech_recognizer_impl.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/process/process_handle.h"
|
| #include "content/browser/speech/endpointer/endpointer.h"
|
| #include "content/browser/speech/speech_recognition_engine.h"
|
| #include "content/browser/speech/speech_recognizer.h"
|
| @@ -19,10 +20,12 @@
|
| namespace media {
|
| class AudioBus;
|
| class AudioManager;
|
| +class AudioParameters;
|
| }
|
|
|
| namespace content {
|
|
|
| +class SpeechRecognitionAudioReceiver;
|
| class SpeechRecognitionEventListener;
|
|
|
| // Handles speech recognition for a session (identified by |session_id|), taking
|
| @@ -45,6 +48,8 @@ class CONTENT_EXPORT SpeechRecognizerImpl
|
| int session_id,
|
| bool continuous,
|
| bool provisional_results,
|
| + bool using_audio_receiver,
|
| + const base::ProcessHandle process_handle,
|
| SpeechRecognitionEngine* engine);
|
|
|
| virtual void StartRecognition(const std::string& device_id) override;
|
| @@ -116,6 +121,9 @@ class CONTENT_EXPORT SpeechRecognizerImpl
|
| FSMState DoNothing(const FSMEventArgs& event_args) const;
|
| FSMState NotFeasible(const FSMEventArgs& event_args);
|
|
|
| + // Called from |StartRecording()| when using |audio_receiver_|.
|
| + bool StartRecordingUsingAudioReceiver(const media::AudioParameters& params);
|
| +
|
| // Returns the time span of captured audio samples since the start of capture.
|
| int GetElapsedTimeMs() const;
|
|
|
| @@ -154,6 +162,8 @@ class CONTENT_EXPORT SpeechRecognizerImpl
|
| float audio_level_;
|
| bool is_dispatching_event_;
|
| bool provisional_results_;
|
| + bool using_audio_receiver_;
|
| + base::ProcessHandle peer_process_handle_;
|
| FSMState state_;
|
| std::string device_id_;
|
|
|
| @@ -163,6 +173,9 @@ class CONTENT_EXPORT SpeechRecognizerImpl
|
| // output format.
|
| scoped_ptr<SpeechRecognizerImpl::OnDataConverter> audio_converter_;
|
|
|
| + // Used when getting audio data from the renderer.
|
| + scoped_ptr<SpeechRecognitionAudioReceiver> audio_receiver_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SpeechRecognizerImpl);
|
| };
|
|
|
|
|