New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687981 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO Dec 22 - Jan 8
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 672468



Sign in to add a comment

Switch SpeechRecognizerImpl to use AudioManager on audio device thread.

Project Member Reported by olka@chromium.org, Feb 2 2017

Issue description

At the moment SpeechRecognizerImpl calls into AudioManager::HasAudioInputDevices() and AudioManager::GetInputStreamParameters() on IO thread.
 

Comment 1 by olka@chromium.org, Feb 3 2017

Blocking: 672468

Comment 2 by olka@chromium.org, Feb 3 2017

Cc: ossu@chromium.org dalecur...@chromium.org solenberg@chromium.org

Comment 3 by olka@chromium.org, Feb 3 2017

Description: Show this description

Comment 4 by olka@chromium.org, Feb 3 2017

Description: Show this description
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ef762c904b723cb488bad237300a5976c29327d3

commit ef762c904b723cb488bad237300a5976c29327d3
Author: olka <olka@chromium.org>
Date: Mon Feb 06 16:45:16 2017

Switch Speech Recognition to asynchronous callback-based AudioManager interactions.

1) This introduces AudioSystem, which provides an asynchronous interface to AudioManager and eventually will replace AudioManager.
The plan is to gradually populate it with all the required methods and switch all AudioManager clients to it,
in preparation for moving AudioManager functionality to Mojo audio service.

2) SpeechRecognizerImpl now uses this interface, which required adding an extra state to its FSM.

3) SpeechRecognizerImpl unit tests are updated to take into account the new threading model and the new state.

BUG= 687981 , 672468 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2675713002
Cr-Commit-Position: refs/heads/master@{#448273}

[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/browser_main_loop.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/browser_main_loop.h
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognition_browsertest.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognition_manager_impl.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognition_manager_impl.h
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognizer_impl.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognizer_impl.h
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/content/browser/speech/speech_recognizer_impl_unittest.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/BUILD.gn
[add] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/audio_system.h
[add] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/audio_system_impl.cc
[add] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/audio_system_impl.h
[add] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/audio_system_impl_unittest.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/mock_audio_manager.cc
[modify] https://crrev.com/ef762c904b723cb488bad237300a5976c29327d3/media/audio/mock_audio_manager.h

Project Member

Comment 6 by bugdroid1@chromium.org, Feb 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb

commit 0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb
Author: olka <olka@chromium.org>
Date: Fri Feb 10 11:56:24 2017

SpeechRecognizerImplTest flakiness fix.

SpeechRecognizerImpl::StartRecognition() is asynchronous, so we must
run loop after calling it to make sure it has executed and has posted device info
request to the audio thread before we begin to wait for the audio thread reply.

BUG= 690555 , 687981 

Review-Url: https://codereview.chromium.org/2690463003
Cr-Commit-Position: refs/heads/master@{#449591}

[modify] https://crrev.com/0bf2c9cdf5dc8bbf2acaac5a5ae4df03c5eaefeb/content/browser/speech/speech_recognizer_impl_unittest.cc

Comment 7 by olka@chromium.org, Feb 16 2017

Status: Fixed (was: Started)

Sign in to add a comment