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

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: s/WebRTC/MediaStream/ 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
« no previous file with comments | « Source/modules/speech/SpeechRecognition.h ('k') | Source/modules/speech/SpeechRecognition.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechRecognition.cpp
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
index dfc7248b8200de148c4f02aeca0b4c894278657d..2c163fad84ace6ebf24eff06b53cc99bdc8e4079 100644
--- a/Source/modules/speech/SpeechRecognition.cpp
+++ b/Source/modules/speech/SpeechRecognition.cpp
@@ -31,6 +31,7 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/page/Page.h"
+#include "modules/mediastream/MediaStreamTrack.h"
#include "modules/speech/SpeechRecognitionController.h"
#include "modules/speech/SpeechRecognitionError.h"
#include "modules/speech/SpeechRecognitionEvent.h"
@@ -53,7 +54,7 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
}
m_finalResults.clear();
- m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimResults, m_maxAlternatives);
+ m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimResults, m_maxAlternatives, m_audioTrack);
m_started = true;
}
@@ -168,6 +169,7 @@ bool SpeechRecognition::hasPendingActivity() const
SpeechRecognition::SpeechRecognition(ExecutionContext* context)
: ActiveDOMObject(context)
, m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on the default value for the grammars attribute.
+ , m_audioTrack(nullptr)
, m_continuous(false)
, m_interimResults(false)
, m_maxAlternatives(1)
@@ -194,6 +196,7 @@ SpeechRecognition::~SpeechRecognition()
void SpeechRecognition::trace(Visitor* visitor)
{
visitor->trace(m_grammars);
+ visitor->trace(m_audioTrack);
#if ENABLE(OILPAN)
visitor->trace(m_controller);
#endif
« no previous file with comments | « Source/modules/speech/SpeechRecognition.h ('k') | Source/modules/speech/SpeechRecognition.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698