www.pudn.com > HMRspeech.rar > speechDlg.h, change:2009-11-21,size:2846b


// speechDlg.h : header file 
// 
 
#if !defined(AFX_SPEECHDLG_H__9C481A1E_0B3E_431D_AD9A_CF24319E6C3E__INCLUDED_) 
#define AFX_SPEECHDLG_H__9C481A1E_0B3E_431D_AD9A_CF24319E6C3E__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
#include "TextToSpeech.h" 
// CONTANTS OF MOUTH 
#define CHARACTER_WIDTH 128 
#define CHARACTER_HEIGHT 128 
#define WEYESNAR 14 // eye positions 
#define WEYESCLO 15 
 
///////////////////////////////////////////////////////////////////////// 
// Mouth Mapping Array (from Microsoft's TTSApp Example) 
 
const int g_iMapVisemeToImage[22] = 
{ 
		0, // SP_VISEME_0 = 0, // Silence 
		11, // SP_VISEME_1, // AE, AX, AH 
		11, // SP_VISEME_2, // AA 
		11, // SP_VISEME_3, // AO 
		10, // SP_VISEME_4, // EY, EH, UH 
		11, // SP_VISEME_5, // ER 
		9, // SP_VISEME_6, // y, IY, IH, IX 
		2, // SP_VISEME_7, // w, UW 
		13, // SP_VISEME_8, // OW 
		9, // SP_VISEME_9, // AW 
		12, // SP_VISEME_10, // OY 
		11, // SP_VISEME_11, // AY 
		9, // SP_VISEME_12, // h 
		3, // SP_VISEME_13, // r 
		6, // SP_VISEME_14, // l 
		7, // SP_VISEME_15, // s, z 
		8, // SP_VISEME_16, // SH, CH, JH, ZH 
		5, // SP_VISEME_17, // TH, DH 
		4, // SP_VISEME_18, // f, v 
		7, // SP_VISEME_19, // d, t, n 
		9, // SP_VISEME_20, // k, g, NG 
		1 // SP_VISEME_21, // p, b, m 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
// CSpeechDlg dialog 
 
class CSpeechDlg : public CDialog 
{ 
// Construction 
public: 
	CSpeechDlg(CWnd* pParent = NULL);	// standard constructor 
 
// Dialog Data 
	//{{AFX_DATA(CSpeechDlg) 
	enum { IDD = IDD_SPEECH_DIALOG }; 
	CStatic	m_mouth; 
	CListBox	m_ListVoices; 
	CString	m_strText; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CSpeechDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
	CTextToSpeech m_TextToSpeech; 
	void InitTextToSpeech(); 
	void InitMouthImageList(); 
 
private: 
	CImageList m_cMouthList; 
	int m_iMouthBmp; 
	CRect m_cMouthRect; 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CSpeechDlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnButtonSpeak(); 
	afx_msg void OnButtonStop(); 
	afx_msg void OnButtonResume(); 
	afx_msg void OnSelchangeList(); 
	afx_msg LRESULT OnMouthEvent(WPARAM wParam, LPARAM lParam); 
	afx_msg void OnButtonListen(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
public: 
	afx_msg void OnEnChangeEdit(); 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_SPEECHDLG_H__9C481A1E_0B3E_431D_AD9A_CF24319E6C3E__INCLUDED_)