devices/devicemocap/speech/speech.h
#ifndef __SPEECH_H__
#define __SPEECH_H__
#include "stdafx.h"
#include <sapi.h>
#include <windows.h>
#include "sphelper.h"
#include <wmcodecdsp.h>
#include <uuids.h>
#include "KinectAudioStream.h"
#include "../ispeech.h"
class Speech : public ISpeech
{
public:
Speech();
virtual ~Speech();
virtual HRESULT CreateFirstConnected(
INuiSensor* pSensor);
virtual bool IsValid();
virtual SpeechCommands Process();
virtual void Stop();
private:
SpeechCommands MapSpeechTagToAction( LPCWSTR pszValue );
HRESULT InitializeAudioStream();
HRESULT CreateSpeechRecognizer();
HRESULT LoadSpeechGrammar();
HRESULT StartSpeechRecognition();
void SetStatusMessage(const char* szMessage);
private:
LPCWSTR mGrammarFileName;
bool mValid;
KinectAudioStream* mKinectAudioStream;
ISpStream* mSpeechStream;
ISpRecognizer* mSpeechRecognizer;
ISpRecoContext* mSpeechContext;
ISpRecoGrammar* mSpeechGrammar;
};
#endif