MainFrm.h
资源名称:语音程序.rar [点击查看]
上传用户:lczygg
上传日期:2007-07-03
资源大小:2947k
文件大小:3k
源码类别:
语音合成与识别
开发平台:
Visual C++
- // MainFrm.h : interface of the CMainFrame class
- //
- /////////////////////////////////////////////////////////////////////////////
- #if !defined(AFX_MAINFRM_H__A98C1027_601A_4FE1_9130_DCB1D29C2058__INCLUDED_)
- #define AFX_MAINFRM_H__A98C1027_601A_4FE1_9130_DCB1D29C2058__INCLUDED_
- #include "ToolbarEx.h"
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- typedef struct _tagQUESTIONINFO
- {
- int nS;
- int nP;
- int nAct;
- char cmdbuf[256];
- char filename[256];
- _tagQUESTIONINFO()
- {
- nS = 0;
- nP = 1;
- nAct= 0;
- memset(cmdbuf, ' ', sizeof(char));
- memset(filename, ' ', sizeof(char));
- }
- }QUESTIONINFO, *LPQUESTIONINFO;
- class CMainFrame : public CFrameWnd
- {
- protected: // create from serialization only
- CMainFrame();
- DECLARE_DYNCREATE(CMainFrame)
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMainFrame)
- public:
- virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
- //}}AFX_VIRTUAL
- // Implementation
- public:
- void GenerateQuesion(CString szFileName);
- BOOL InitRecognition();
- virtual ~CMainFrame();
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
- protected: // control bar embedded members
- CStatusBar m_wndStatusBar;
- CToolBarEx m_wndToolBar;
- CSplitterWnd m_wndSplitter;
- CComboBox *m_pcmbCMD; // , *m_pcmbAM;
- CEdit *m_pEditCMD, *m_pEditAM;
- CProgressCtrl *m_pctrlVolume;
- // Generated message map functions
- protected:
- void WritePort(DWORD dwValue);
- void SwitchStatus(char *szFileName, char *szInfo);
- BOOL SwitchNext();
- DWORD GetParallelStatus(CString &sItem);
- void StopRecord();
- void StartRecord();
- void FreeResource();
- //{{AFX_MSG(CMainFrame)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnTimer(UINT nIDEvent);
- //}}AFX_MSG
- afx_msg LRESULT OnBeginUtterance(WPARAM, LPARAM);
- afx_msg LRESULT OnAddWaveFrame(WPARAM, LPARAM);
- afx_msg LRESULT OnEndUtterance(WPARAM, LPARAM);
- afx_msg LRESULT OnDragonFirm(WPARAM, LPARAM);
- afx_msg LRESULT OnDragonGetVolume(WPARAM, LPARAM);
- afx_msg void OnPlayTime(WPARAM wParam, LPARAM lParam);
- afx_msg void OnMyPlayEnd(WPARAM wParam, LPARAM lParam);
- DECLARE_MESSAGE_MAP()
- private:
- int m_nGetVol;
- int m_nOvertime; // 记录超时时间
- int m_nDegree; // 记录超时次数
- int m_nLocalH; // 当前时间(小时)
- char m_chAM[MAX_PATH];
- char m_chCMD[MAX_PATH];
- char m_chCurSelCmd[MAX_PATH];
- char *m_szResult[5];
- BOOL m_bRun; // run dialog
- BOOL m_bClose, m_bLeave; // 是否播放离开语音
- BOOL m_bDispose; // recognition result dispose flag
- BOOL m_bHave, m_bSection; // 是否有人,是否可以对话(传感器信号)
- CString m_sScroll;
- CPtrArray m_aryList;
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_MAINFRM_H__A98C1027_601A_4FE1_9130_DCB1D29C2058__INCLUDED_)