diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 06:11:06 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 06:11:06 +0000 |
commit | 4038d2dcf68d300f44032f98f9323c341cef4333 (patch) | |
tree | a301fc5106d4849ac31b2f607909b3d51b5a48ca /content/browser/speech/speech_recognizer.cc | |
parent | 189b01cd199726bd100fcd66fcbaee4f898c04a4 (diff) | |
download | chromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.zip chromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.tar.gz chromium_src-4038d2dcf68d300f44032f98f9323c341cef4333.tar.bz2 |
In speech input, introduce a 'warm up' screen for slow audio capture devices.
In some hardware/OS configurations it takes several hundred milliseconds to seconds for the audio driver
to get initialised and start giving audio to the application. We start by showing an empty bubble and if
audio was received within 500ms the usual volume meter becomes visible. If audio data was not received
within 500ms we start showing a light gray spinner animation to signal that things aren't ready yet to
start speaking.
BUG=61677
TEST=unit_tests and browser_tests with --gtest_filter=Speech*
Review URL: http://codereview.chromium.org/6720031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/speech/speech_recognizer.cc')
-rw-r--r-- | content/browser/speech/speech_recognizer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/browser/speech/speech_recognizer.cc b/content/browser/speech/speech_recognizer.cc index 1807db0..7a4ebd1 100644 --- a/content/browser/speech/speech_recognizer.cc +++ b/content/browser/speech/speech_recognizer.cc @@ -219,7 +219,8 @@ void SpeechRecognizer::HandleOnData(string* data) { if (request_ == NULL) { // This was the first audio packet recorded, so start a request to the - // server to send the data. + // server to send the data and inform the delegate. + delegate_->DidStartReceivingAudio(caller_id_); request_.reset(new SpeechRecognitionRequest( Profile::GetDefaultRequestContext(), this)); request_->Start(language_, grammar_, hardware_info_, origin_url_, |