struct.h
资源名称:语音程序.rar [点击查看]
上传用户:lczygg
上传日期:2007-07-03
资源大小:2947k
文件大小:4k
源码类别:
语音合成与识别
开发平台:
Visual C++
- typedef struct
- {
- char szVarName[56];
- char szVarValue[256];
- }PARAM_ITEM, *PPARAM_ITEM;
- typedef struct
- {
- char szAnswer[256];
- char szWaveFile[256];
- }PARAM_INFO, *PPARAM_INFO;
- ////////////////////////////////////////////////////////////
- const int QUESTION_NUM = 20; // 机器人提问问题总数
- const int REMIND_TIMES = 1; // 提醒次数
- const int ROBOT_ANSWER_COUNT = 6 ; // 机器人回答问题数
- const int ROBOT_ASK_COUNT = 1; // 机器人提问问题数
- ////////////////////////////////////////////////////////////
- #define WM_DLGNETLIBOUT WM_USER + 100
- #define WM_BEGINRECORD WM_USER + 101
- #define WM_DISPLAYINFO WM_USER + 102
- #define WM_TTSSPEAKEVENT WM_USER + 103
- #define WM_PLAYTIME WM_USER + 104
- ////////////////////////////////////////////////////////////
- #define ROBOT_STATUS_SYSTEM 0
- #define ROBOT_STATUS_INTRO 1
- #define ROBOT_STATUS_WAIT 2
- //#define ROBOT_STATUS_CLOSEMIC 3
- #define ROBOT_STATUS_BEGINSECTION 4
- #define ROBOT_STATUS_ASK 5
- #define ROBOT_STATUS_REMIND_ASK 6
- #define ROBOT_STATUS_NEXTASK 7
- #define ROBOT_STATUS_ENDSECTION 8
- #define ROBOT_STATUS_INTERRUPT 9
- #define ROBOT_STATUS_SHUTDOWN 10
- #define ROBOT_STATUS_CHECKUSER 11
- #define ROBOT_STATUS_ONTIMER 12
- #define ROBOT_STATUS_NORMAL 13
- #define ROBOT_REMIND_CLOSE 30
- #define ROBOT_REMIND_CLOSEMICPHONE 31
- #define ROBOT_REMIND_CLOSETOANSWER 32
- #define ROBOT_REMIND_CLOSETOASK 33
- #define ROBOT_REMIND_DIRECTTOANSWER 34
- #define ROBOT_REMIND_DIRECTTOASK 35
- #define ROBOT_REMIND_INTERRUPTSECTION 36
- #define IOBOARD_SIGNAL_FARSWITCH 20
- #define IOBOARD_SIGNAL_NEARSWITCH 21
- #define IOBOARD_SIGNAL_MICPHONESWITCH 22
- #define IOBOARD_SIGNAL_SHUTDOWN 23
- ///////////////////////////////////////////////
- #define ROBOT_ADJUST_NORMAL 1
- #define ROBOT_ADJUST_TIMEOUT 2
- #define ROBOT_ADJUST_INTERRUPT 3
- ////////////////////////////////////////////////
- #define USER_SCREEN 0
- #define ROBOT_SCREEN 1
- #define SYSTEM_SCREEN 0
- #define UP_VIEW 0
- #define DOWN_VIEW 1
- ////////////////////////////////////////////////////
- #define TIMER_MS_ROBOT 1000
- #define MAX_SYSTEM_SECONDS 1
- #define MAX_WAIT_SECONDS 15
- #define MAX_ANSWER_SECONDS 10
- #define MAX_ASK_SECONDS 10
- #define MAX_BEGINSECTION_SECONDS 8
- /////////////////////////////////////////////////////////////////
- //定义输入掩码
- #define IO_MASK_FARSWITCH 0x80
- #define IO_MASK_NEARSWITCH 0x20
- #define IO_MASK_MICSWITCH 0x08
- #define IO_MASK_SHUTDOWN 0x02
- //定义输出码
- #define IO_MICPHONE_ON 0xF7
- #define IO_MICPHONE_OFF 0xFF
- #define IO_EMOTION_NORMAL 0x38
- #define IO_EMOTION_ANGRY 0x28
- #define IO_EMOTION_HAPPY 0x18
- #define IO_EMOTION_SORRY 0x08
- #define IO_SIGNAL_NULL 0x00
- #define IO_WRITEMODE_AND 0
- #define IO_WRITEMODE_OR 1
- #define IO_WRITEMODE_DIRECT 2
- // 感情码
- #define ROBOT_MOTION_NORMAL 0
- #define ROBOT_MOTION_HAPPY 1
- #define ROBOT_MOTION_ANGRY 2
- #define ROBOT_MOTION_SORRY 3
- #define ROBOT_SPEAKING_CODE 0xF8
- #define ROBOT_SCILENCE_CODE 0xF0
- // 动作码
- // action码
- #define SPECIAL_TODAY_DATE 1
- #define SPECIAL_TODAY_WEEK 2
- #define SPECIAL_TIME 3
- #define SPECIAL_TOMORROW_DATE 4
- #define SPECIAL_TOMORROW_WEEK 5
- #define SPECIAL_YESTERDAY_DATE 6
- #define SPECIAL_YESTERDAY_WEEK 7
- #define ROBOT_ACTION_TYPE 5
- #define SPECIAL_ACTION_ENGLISH 1
- #define SPECIAL_ACTION_SONG 2
- #define SPECIAL_ACTION_POEM 3
- #define SPECIAL_ACTION_KNOWLEDGE 4
- #define SPECIAL_ACTION_JOKE 5
- #define ROBOT_ENGLISH_COUNT 10
- #define ROBOT_SONG_COUNT 10
- #define ROBOT_POEM_COUNT 10
- #define ROBOT_JOKE_COUNT 10
- #define ROBOT_INTRO_COUNT 2
- // play time
- #define PLAYTIME001 1
- #define PLAYTIME002 2
- #define PLAYTIME003 3
- #define PLAYTIME004 4
- #define PLAYTIME005 5
- #define PLAYTIME006 6
- #define PLAYTIME007 7
- #define PLAYTIME008 8
- #define PLAYTIME009 9
- #define PLAYTIME010 10