12 #ifndef hifi_SpeechRecognizer_h
13 #define hifi_SpeechRecognizer_h
20 #include <QWinEventNotifier>
23 #include <DependencyManager.h>
36 class SpeechRecognizer :
public QObject,
public Dependency {
41 void handleCommandRecognized(
const char* command);
42 bool getEnabled()
const {
return _enabled; }
51 void setEnabled(
bool enabled);
58 void addCommand(
const QString& command);
65 void removeCommand(
const QString& command);
116 void commandRecognized(
const QString& command);
128 void enabledUpdated(
bool enabled);
131 void reloadCommands();
135 virtual ~SpeechRecognizer();
138 QSet<QString> _commands;
139 #if defined(Q_OS_MAC)
140 void* _speechRecognizerDelegate;
141 void* _speechRecognizer;
142 #elif defined(Q_OS_WIN)
143 bool _comInitialized;
145 void* _speechRecognizer;
146 void* _speechRecognizerContext;
147 void* _speechRecognizerGrammar;
148 void* _commandRecognizedEvent;
149 QWinEventNotifier* _commandRecognizedNotifier;
152 #if defined(Q_OS_WIN)
154 void notifyCommandRecognized(
void* handle);