Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: content/browser/speech/speech_recognizer_impl.cc

Issue 2885173002: Make AudioDebugFileWriter create its own file worker thread. (Closed)
Patch Set: Make AudioDebugFileWriter create its own file thread. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "content/browser/speech/speech_recognizer_impl.h" 5 #include "content/browser/speech/speech_recognizer_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 << input_parameters.AsHumanReadableString(); 630 << input_parameters.AsHumanReadableString();
631 } 631 }
632 632
633 // Create an audio converter which converts data between native input format 633 // Create an audio converter which converts data between native input format
634 // and WebSpeech specific output format. 634 // and WebSpeech specific output format.
635 audio_converter_.reset( 635 audio_converter_.reset(
636 new OnDataConverter(input_parameters, output_parameters)); 636 new OnDataConverter(input_parameters, output_parameters));
637 637
638 audio_controller_ = AudioInputController::Create( 638 audio_controller_ = AudioInputController::Create(
639 GetAudioManager(), this, this, nullptr, input_parameters, device_id_, 639 GetAudioManager(), this, this, nullptr, input_parameters, device_id_,
640 /*agc_is_enabled*/ false, 640 /*agc_is_enabled*/ false);
641 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE));
642 641
643 if (!audio_controller_.get()) { 642 if (!audio_controller_.get()) {
644 return Abort( 643 return Abort(
645 SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE)); 644 SpeechRecognitionError(SPEECH_RECOGNITION_ERROR_AUDIO_CAPTURE));
646 } 645 }
647 646
648 audio_log_->OnCreated(0, input_parameters, device_id_); 647 audio_log_->OnCreated(0, input_parameters, device_id_);
649 648
650 // The endpointer needs to estimate the environment/background noise before 649 // The endpointer needs to estimate the environment/background noise before
651 // starting to treat the audio as user input. We wait in the state 650 // starting to treat the audio as user input. We wait in the state
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 engine_error(SPEECH_RECOGNITION_ERROR_NONE) { 905 engine_error(SPEECH_RECOGNITION_ERROR_NONE) {
907 } 906 }
908 907
909 SpeechRecognizerImpl::FSMEventArgs::FSMEventArgs(const FSMEventArgs& other) = 908 SpeechRecognizerImpl::FSMEventArgs::FSMEventArgs(const FSMEventArgs& other) =
910 default; 909 default;
911 910
912 SpeechRecognizerImpl::FSMEventArgs::~FSMEventArgs() { 911 SpeechRecognizerImpl::FSMEventArgs::~FSMEventArgs() {
913 } 912 }
914 913
915 } // namespace content 914 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698