From 4038d2dcf68d300f44032f98f9323c341cef4333 Mon Sep 17 00:00:00 2001 From: "satish@chromium.org" Date: Tue, 5 Apr 2011 06:11:06 +0000 Subject: 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 --- content/browser/speech/speech_recognizer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'content/browser/speech/speech_recognizer.cc') 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_, -- cgit v1.1