资源简介
C++语音识别接口(Microsoft Speech SDK)
简单清晰的示范代码+教程
详见blog
http://blog.csdn.net/michaelliang12/article/details/51317531
代码片段和文件信息
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
#include “stdafx.h“
#include
#include “resource.h“
#include “BodyBasics.h“
using namespace std;
///
/// Entry point for the application
///
/// handle to the application instance
/// always 0
/// command line arguments
/// whether to display minimized maximized or normally
/// status
int APIENTRY wWinMain(
_In_ HINSTANCE hInstance
_In_opt_ HINSTANCE hPrevInstance
_In_ LPWSTR lpCmdLine
_In_ int nShowCmd
)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
CBodyBasics application;
application.Run(hInstance nShowCmd);
}
///
/// Constructor
///
CBodyBasics::CBodyBasics()
{
}
///
/// Destructor
///
CBodyBasics::~CBodyBasics()
{
m_cpRecoEngine.Release();//释放语音引擎
m_cpRecoCtxt.Release();
m_cpCmdGrammar.Release();
m_cpAudio.Release();
}
///
/// Creates the main window and begins processing
///
/// handle to the application instance
/// whether to display minimized maximized or normally
int CBodyBasics::Run(HINSTANCE hInstance int nCmdShow)
{
MSG msg = {0};
WNDCLASS wc;
// Dialog custom window class
ZeroMemory(&wc sizeof(wc));
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbWndExtra = DLGWINDOWEXTRA;
wc.hCursor = LoadCursorW(NULL IDC_ARROW);
wc.hIcon = LoadIconW(hInstance MAKEINTRESOURCE(IDI_APP));
wc.lpfnWndProc = DefDlgProcW;
wc.lpszClassName = L“BodyBasicsAppDlgWndClass“;
if (!RegisterClassW(&wc))
{
return 0;
}
// Create main application window
HWND hWndApp = CreateDialogParamW(
NULL
MAKEINTRESOURCE(IDD_APP)
NULL
(DLGPROC)CBodyBasics::MessageRouter
reinterpret_cast(this));
// Show window
ShowWindow(hWndApp nCmdShow);
// Main message loop
while (WM_QUIT != msg.message)
{
while (PeekMessageW(&msg NULL 0 0 PM_REMOVE))
{
// If a dialog message will be taken care of by the dialog proc
if (hWndApp && IsDialogMessageW(hWndApp &msg))
{
continue;
}
TranslateMessage(&msg);
DispatchMessageW(&msg);
}
}
return static_cast(msg.wParam);
}
///
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12846 2014-10-19 12:43 MSS_demo\app.ico
文件 60162048 2016-05-05 12:06 MSS_demo\BodyBasics-D2D.sdf
文件 1248 2014-10-19 12:43 MSS_demo\BodyBasics-D2D.sln
..A..H. 38400 2016-05-05 12:06 MSS_demo\BodyBasics-D2D.v12.suo
文件 9548 2016-04-27 18:15 MSS_demo\BodyBasics-D2D.vcxproj
文件 165 2016-04-26 21:32 MSS_demo\BodyBasics-D2D.vcxproj.user
文件 2638552 2016-04-20 16:50 MSS_demo\BodyBasics.aps
文件 8801 2016-05-05 12:00 MSS_demo\BodyBasics.cpp
文件 2792 2016-05-05 11:31 MSS_demo\BodyBasics.h
文件 3093 2016-04-20 17:14 MSS_demo\BodyBasics.rc
文件 60 2013-07-22 01:18 MSS_demo\ClassDiagram.cd
文件 1252 2016-05-05 11:41 MSS_demo\CmdCtrl.xm
文件 8031232 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.bsc
文件 1002 2016-05-05 11:58 MSS_demo\Debug\BodyBasics-D2D.Build.CppClean.log
文件 230400 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.exe
文件 779864 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.ilk
文件 430 2016-05-05 12:03 MSS_demo\Debug\BodyBasics-D2D.log
文件 3607552 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.pdb
文件 165 2016-05-05 12:03 MSS_demo\Debug\BodyBasics-D2D.tlog\BodyBasics-D2D.lastbuildstate
文件 300 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\BscMake.command.1.tlog
文件 382 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\bscmake.read.1.tlog
文件 228 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\BscMake.write.1.tlog
文件 768 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\cl.command.1.tlog
文件 26716 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\CL.read.1.tlog
文件 512 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\CL.write.1.tlog
文件 1636 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\li
文件 3158 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\li
文件 566 2016-05-05 12:00 MSS_demo\Debug\BodyBasics-D2D.tlog\li
文件 492 2016-05-05 11:58 MSS_demo\Debug\BodyBasics-D2D.tlog\rc.command.1.tlog
文件 2316 2016-05-05 11:58 MSS_demo\Debug\BodyBasics-D2D.tlog\rc.read.1.tlog
............此处省略18个文件信息
相关资源
- 公交车查询系统可换乘 MFC 自己做的
- Data Structures With C++ Using STL(中文版)
- C++ MFC 调用twain接口采集图像
- 基于mfc的学生信息管理系统159407
- 上期技术CTP_C++_API实盘范例代码及帮助
- C++飞机游戏源代码
-
C++xm
l高级编程指南扫描版 - 基于VLC的MFC播放器
- 疯狂跑酷游戏
- C++ MFC实现计算器基本功能
- TCPSocket摄像头实时传输视频和图片传
- 初步实现ATM机MFC、 实现ATM系统
- Visual C++角色扮演游戏程序设计电子书
- 嵌入式系统高级C语言编程.凌明(带详
- Visual C++ 2015 Redistributable Packages.(x6
- C++实现的人脸识别系统
- 传智播客 c/c++ 课件
- Visual C++ for Linux Development
- 大鱼吃小鱼C++课设funcode平台
-
深度探索C.对象模型]Inside The C++ ob
- 杨淑英VC++图像处理程序设计配套光盘
- C++ primer 6th Edition.pdf
- 简单视频摘要系统的设计与实现
- Visual_C++_MATLAB图像处理与识别实用案例
- C/C++/STL参考手册MSDN版本2018
- C++课程设计学生选课系统+报告文档
- Thinking in C++ 中文版PDF版 很爽哦
- Pascal转C++
- Microsoft Visual C++ 2017 Redistributable (x
- Microsoft Visual C++ 2017 Redistributable (x
评论
共有 条评论