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

Unified Diff: content/browser/speech/speech_recognition_dispatcher_host.cc

Issue 549373003: Binding media stream audio track to speech recognition [browser] Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and nits Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/speech/speech_recognition_dispatcher_host.cc
diff --git a/content/browser/speech/speech_recognition_dispatcher_host.cc b/content/browser/speech/speech_recognition_dispatcher_host.cc
index 1942a50c7150e8f22058e249e2b8233e32dcef25..fe4521dc5cfc8eb0169d7c9a285f680eee643ef5 100644
--- a/content/browser/speech/speech_recognition_dispatcher_host.cc
+++ b/content/browser/speech/speech_recognition_dispatcher_host.cc
@@ -157,6 +157,9 @@ void SpeechRecognitionDispatcherHost::OnStartRequestOnIO(
config.continuous = params.continuous;
config.interim_results = params.interim_results;
config.event_listener = AsWeakPtr();
+ config.using_audio_track = params.using_audio_track;
+ // TODO(burnik): This needs to be tested on Windows.
tommi (sloooow) - chröme 2014/10/02 11:23:19 has this been done? is there a unit test?
burnik 2014/10/02 16:04:11 Almost ready with recognizer impl unit test and th
+ config.peer_process_handle = PeerHandle();
int session_id = SpeechRecognitionManager::GetInstance()->CreateSession(
config);
@@ -267,4 +270,16 @@ void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete(
int session_id) {
}
+void SpeechRecognitionDispatcherHost::OnAudioTrackReady(
+ int session_id,
+ const media::AudioParameters& params,
+ base::SharedMemoryHandle memory,
+ base::SyncSocket::TransitDescriptor socket) {
+ const SpeechRecognitionSessionContext& context =
+ SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
+ Send(new SpeechRecognitionMsg_AudioTrackReady(context.render_view_id,
+ context.request_id, params,
+ memory, socket));
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698