⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plugspeech.h

📁 .net 方面的开发说明资料。
💻 H
字号:
// ========================================================
// Speech plug (Microsoft Speech API 5.0)
//
// Design and Implementation by Floris van den Berg
// ========================================================

#ifndef PLUGSPEECH_H
#define PLUGSPEECH_H

#ifndef _WINDOWS_
#include <windows.h>
#endif

#ifndef PLUG_H
#include "Plug.h"
#endif

#ifndef _OBJBASE_H_
#include <objbase.h>
#endif

#ifndef __REQUIRED_RPCNDR_H_VERSION__
#include <sapi.h>
#endif

#ifndef SPHelper_h
#include <sphelper.h>
#endif

#ifndef _STRING_
#include <string>
#endif

// --------------------------------------------------------

#ifndef MAX_LOADSTRING
#define MAX_LOADSTRING 256
#endif

// --------------------------------------------------------

class PlugSpeech : public Plug {
	typedef Plug inherited;

public :
	PlugSpeech(Grid *grid, int id);
	virtual ~PlugSpeech();
	friend void __stdcall SAPICallback(WPARAM wparam, LPARAM lparam);

public :
	virtual bool open(PlugProperties *info);
	virtual void close();
	virtual bool connect(const char *host, int port);
	virtual void disconnect();
	virtual bool supportsSending();

public : // never call these functions directly... but always via a Plug
	virtual void pollProgress();
	virtual void *getReferenceData(int id);

private :
	TCHAR g_szCounterDisplay[MAX_LOADSTRING];
	CComPtr<ISpRecoGrammar> m_grammar;
	CComPtr<ISpRecoContext> m_recotxt;
	CComPtr<ISpRecognizer> m_engine;
	ISpPhraseAlt *m_alt[32];
	std::string m_alt_string[32];
	ULONG m_alt_count;
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -