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

Unified Diff: Source/modules/speech/SpeechRecognition.cpp

Issue 448163003: Support for providing media stream audio track to speech recognition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: @audioTrack, setAudioTrack, clearAudioTrack Created 6 years, 4 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: Source/modules/speech/SpeechRecognition.cpp
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
index a598db638a48d539d0cff0c859230301cf86d8f3..7580e094f4112a8f50edaf15fdae4d391efc285d 100644
--- a/Source/modules/speech/SpeechRecognition.cpp
+++ b/Source/modules/speech/SpeechRecognition.cpp
@@ -53,6 +53,12 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
}
m_finalResults.clear();
+
+ if (m_audioTrack)
+ m_controller->setAudioTrack(this, m_audioTrack);
+ else
+ m_controller->clearAudioTrack(this);
no longer working on chromium 2014/08/14 15:41:34 you don't need clearAudioTrack, just do m_controll
burnik 2014/08/14 16:35:14 Done.
+
m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimResults, m_maxAlternatives);
m_started = true;
}
@@ -195,6 +201,7 @@ SpeechRecognition::~SpeechRecognition()
void SpeechRecognition::trace(Visitor* visitor)
{
visitor->trace(m_grammars);
+ visitor->trace(m_audioTrack);
#if ENABLE(OILPAN)
visitor->trace(m_controller);
#endif

Powered by Google App Engine
This is Rietveld 408576698