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

Unified Diff: public/web/WebSpeechRecognizer.h

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: public/web/WebSpeechRecognizer.h
diff --git a/public/web/WebSpeechRecognizer.h b/public/web/WebSpeechRecognizer.h
index 91ec0579a2ab5e0d445150c1b232340e5c16fe61..7aba23523fe386672b6d5c07baf1bb813d4a97d7 100644
--- a/public/web/WebSpeechRecognizer.h
+++ b/public/web/WebSpeechRecognizer.h
@@ -31,6 +31,7 @@
namespace blink {
+class WebMediaStreamTrack;
class WebSpeechGrammar;
class WebSpeechRecognitionParams;
class WebSpeechRecognizerClient;
@@ -38,6 +39,12 @@ class WebSpeechRecognizerClient;
// Interface for speech recognition, to be implemented by the embedder.
class WebSpeechRecognizer {
public:
+ // Set an audio track for recognition instead of default input
+ virtual void setAudioTrack(const WebSpeechRecognitionHandle&, const WebMediaStreamTrack& audioTrack, WebSpeechRecognizerClient*) { BLINK_ASSERT_NOT_REACHED(); }
no longer working on chromium 2014/08/14 15:41:34 rename it to Attach() and Detach()
burnik 2014/08/14 16:35:15 Done.
+
+ // Remove the audiotrack for recognition - fall back to default input
+ virtual void clearAudioTrack(const WebSpeechRecognitionHandle&, WebSpeechRecognizerClient*) { BLINK_ASSERT_NOT_REACHED(); }
+
// Start speech recognition for the specified handle using the specified parameters. Notifications on progress, results, and errors will be sent via the client.
virtual void start(const WebSpeechRecognitionHandle&, const WebSpeechRecognitionParams&, WebSpeechRecognizerClient*) { BLINK_ASSERT_NOT_REACHED(); }
« Source/web/SpeechRecognitionClientProxy.cpp ('K') | « Source/web/SpeechRecognitionClientProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698