基于DSP_CPLD_aP8942A_LM1791的语音控制
语音驱动程序 drv_voice.c
语音服务程序 srv_voice.c
1、先运行初始化函数,主要是设置初始音量,并建立一个软件定时器来,以10ms的周期来调用语音播放函数。
1 void srvVoiceInit()
2 {
3 T_SOFT_TIMER_HANDLE hSoftTimer;
4 UINT16 usVoiceVolumeTunerAdjust;
5
6 g_hVoiceDevHandle = osalDevOpen(GEN20_PROTO_VOICE_DEV_NAME);
7 if (g_hVoiceDevHandle == INVALID_HANDLE)
8 {
9 LOG_ERROR_LOG(("srvVoiceInit failed at voice driver open.\r\n"));
10 }
11 else
12 {
13 /* Initialize voice play info structure, must before soft timer started. */
14 /* TODO: read default voice from EEPROM */
15 srvVoiSetDefaultVoiceType(VDVT_TYPE_A);
16 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_IDLE;
17 gVoiPlayState = VPSS_VOICE_IDLE;
18 gVoiInnerEvent = E_NULL;
19 usVoiceVolumeTunerAdjust = 160;
20 //gVoiceToSet = 54;
21 srvSetVoiceVolume(63);
22 osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_RST_PLAYBACK_CLR , NULL);
23 osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_SET_VOICE_VOLUME, &usVoiceVolumeTunerAdjust);
24
25 /* Create the soft timer for push button service, the handle is not needed. */
26 if (OSAL_IS_RESULT_OK(osalTimCreateSoftTimer(&hSoftTimer, 10, STT_REPEAT, &srvVoicePlayTimerRoutine, NULL)))
27 {
28 if (OSAL_IS_RESULT_OK(osalTimStartSoftTimer(hSoftTimer)))
29 {
30 g_hVoiceMode = 0;
31 }
32 else
33 {
34 LOG_ERROR_LOG(("srvVoiceInit failed at SoftTimer start.\r\n"));
35 }
36 }
37 else
38 {
39 LOG_ERROR_LOG(("srvVoiceInit failed at SoftTimer create.\r\n"));
40 }
41 }
42 }
2 语音播放函数,先根据状态来设置语音模式,再根据模式来播放语音
1 static void srvVoicePlayTimerRoutine(void *pvParam)
2 {
3 /* Wait event and return immediately. */
4 if(0 != g_hVoiceMode)
5 {
6 /* Some thing happened, adjust current voice play accordingly. */
7 srvVoiUpdateVoicePlayInfo(g_hVoiceMode);
8
9 /* Control voice play according to the information. */
10 srvVoiPlayVoice();
11 g_hVoiceMode = 0;
12 }
13 else
14 {
15 srvVoiPlayVoice();
16 }
17
18 }
3 更新语音播放信息,根据语音模式来更新
根据接收的语音事件来播放对应的语音片段,
语音包括以下
SRV_VOICE_PLAY_SYSTEM_START;系统启动声音
SRV_VOICE_PLAY_OPERATION_DENIED;操作禁止声音
SRV_VOICE_PLAY_TEST;测试声音
SRV_VOICE_PLAY_MIN_OUTPUT;小档位声音
SRV_VOICE_PLAY_MAX_OUTPUT;大档位声音
SRV_VOICE_PLAY_OVER_CURRENT;过流警报声
SRV_VOICE_PLAY_RECOVERABLE_FAULT;可恢复性错误声音
SRV_VOICE_PLAY_NON_RECOVERABLE_FAULT;不可恢复性错误
SRV_VOICE_PLAY_FAULT_REPLAY;错误重放
SRV_VOICE_PLAY_SHOW_DEFAULT_VOICE;默认语音
1 static void srvVoiUpdateVoicePlayInfo(UINT uVoiceEvent)
2 {
3 if ((uVoiceEvent & SRV_VOICE_PLAY_SYSTEM_START) == SRV_VOICE_PLAY_SYSTEM_START)
4 {
5 /* Play welcome voice 1 time in fixed volume 60. */
6 gVoiInnerEvent = E_PLAY_VOICE;
7 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
8 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_FLASH_START;
9 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
10 g_tVoicePlayInfo.usVoicePlayRepeat = 1;
11 g_tVoicePlayInfo.usVoiceVolume = srvGetVoiceVolume();
12 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
13 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
14 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
15 }
16
17 if ((uVoiceEvent & SRV_VOICE_PLAY_OPERATION_DENIED) == SRV_VOICE_PLAY_OPERATION_DENIED)
18 {
19 /* Play welcome voice 1 time in fixed volume 60. */
20 gVoiInnerEvent = E_PLAY_VOICE;
21 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
22 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_OPERATION_DENIED;
23 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
24 g_tVoicePlayInfo.usVoicePlayRepeat = 1;
25 g_tVoicePlayInfo.usVoiceVolume = 60;
26 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
27 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
28 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
29 }
30 if ((uVoiceEvent & SRV_VOICE_PLAY_TEST) == SRV_VOICE_PLAY_TEST)
31 {
32 /* TODO: */
33 gVoiInnerEvent = E_PLAY_VOICE;
34 g_tVoicePlayInfo.voiMode = VOI_MODE_TIME_LIMITED;
35 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_TEST_IN_PROGRESS;
36 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
37 g_tVoicePlayInfo.usVoicePlayRepeat = VOICE_PLAY_REPEAT_INFINITE;
38 g_tVoicePlayInfo.usVoiceVolume = srvGetVoiceVolume();
39 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
40 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
41 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
42 }
43 if ((uVoiceEvent & SRV_VOICE_PLAY_MIN_OUTPUT) == SRV_VOICE_PLAY_MIN_OUTPUT)
44 {
45 gVoiInnerEvent = E_PLAY_VOICE;
46 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
47 g_tVoicePlayInfo.wCurrVoiceSection = g_tVoicePlayInfo.wVoiceDefaultMinOutput;
48 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
49 g_tVoicePlayInfo.usVoicePlayRepeat = VOICE_PLAY_REPEAT_INFINITE;
50 g_tVoicePlayInfo.usVoiceVolume = srvGetVoiceVolume();// VOICE_PLAY_CURRENT_VOICE_VOLUME;
51 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
52 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 30; // last 26
53 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
54 }
55 if ((uVoiceEvent & SRV_VOICE_PLAY_MAX_OUTPUT) == SRV_VOICE_PLAY_MAX_OUTPUT)
56 {
57 gVoiInnerEvent = E_PLAY_VOICE;
58 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
59 g_tVoicePlayInfo.wCurrVoiceSection = g_tVoicePlayInfo.wVoiceDefaultMaxOutput;
60 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
61 g_tVoicePlayInfo.usVoicePlayRepeat = VOICE_PLAY_REPEAT_INFINITE;
62 g_tVoicePlayInfo.usVoiceVolume = srvGetVoiceVolume(); //VOICE_PLAY_CURRENT_VOICE_VOLUME;
63 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
64 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 15; //last 10
65 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
66 }
67 if ((uVoiceEvent & SRV_VOICE_PLAY_OVER_CURRENT) == SRV_VOICE_PLAY_OVER_CURRENT)
68 {
69 /* TODO: */
70 /* Play fatal error voice 1 time in fixed volume 60. */
71 gVoiInnerEvent = E_PLAY_VOICE;
72 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
73 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_FATAL_ERROR;
74 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
75 g_tVoicePlayInfo.usVoicePlayRepeat = 1;
76 g_tVoicePlayInfo.usVoiceVolume = 60;
77 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
78 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
79 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
80 }
81 if ((uVoiceEvent & SRV_VOICE_PLAY_RECOVERABLE_FAULT) == SRV_VOICE_PLAY_RECOVERABLE_FAULT)
82 {
83 /* Play fatal error voice 1 time in fixed volume 60. */
84 gVoiInnerEvent = E_PLAY_VOICE;
85 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
86 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_FATAL_ERROR;
87 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
88 g_tVoicePlayInfo.usVoicePlayRepeat = 1;//VOICE_PLAY_REPEAT_INFINITE;
89 g_tVoicePlayInfo.usVoiceVolume = 60;
90 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
91 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
92 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
93 }
94 if ((uVoiceEvent & SRV_VOICE_PLAY_NON_RECOVERABLE_FAULT) == SRV_VOICE_PLAY_NON_RECOVERABLE_FAULT)
95 {
96 /* Play fatal error voice 3 timeS in fixed volume 60. */
97 gVoiInnerEvent = E_PLAY_VOICE;
98 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
99 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_FATAL_ERROR;
100 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
101 g_tVoicePlayInfo.usVoicePlayRepeat = 1;//VOICE_PLAY_REPEAT_INFINITE;
102 g_tVoicePlayInfo.usVoiceVolume = 60;
103 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
104 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
105 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
106 }
107 if ((uVoiceEvent & SRV_VOICE_PLAY_FAULT_REPLAY) == SRV_VOICE_PLAY_FAULT_REPLAY)
108 {
109 /* Play fatal error voice 1 time in fixed volume 60. */
110 gVoiInnerEvent = E_PLAY_VOICE;
111 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
112 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_SECTION_FATAL_ERROR;
113 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = VOICE_PLAY_DURATION_TIME_INFINITE;
114 g_tVoicePlayInfo.usVoicePlayRepeat = 1;
115 g_tVoicePlayInfo.usVoiceVolume = 60;
116 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
117 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
118 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
119 }
120 if ((uVoiceEvent & SRV_VOICE_PLAY_SHOW_DEFAULT_VOICE) == SRV_VOICE_PLAY_SHOW_DEFAULT_VOICE)
121 {
122 gVoiInnerEvent = E_PLAY_VOICE;
123 g_tVoicePlayInfo.voiMode = VOI_MODE_REPEAT;
124 g_tVoicePlayInfo.wCurrVoiceSection = VOICE_PLAY_DEFAULT_VOICE_SECTION;
125 g_tVoicePlayInfo.usVoicePlayTimeIn10mS = 100;
126 g_tVoicePlayInfo.usVoicePlayRepeat = VOICE_PLAY_REPEAT_INFINITE;
127 g_tVoicePlayInfo.usVoiceVolume = srvGetVoiceVolume();
128 g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS = 10;
129 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
130 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_START_PLAY;
131 }
132 if ((uVoiceEvent & SRV_VOICE_PLAY_STOP) == SRV_VOICE_PLAY_STOP)
133 {
134 /* Stop current play, don't change wCurrVoiceSection, left it done in srvVoiPlayVoice(). */
135 gVoiInnerEvent = E_STOP_VOICE ;
136 //g_tVoicePlayInfo.usVoiceStopTimeoutIn10mS = 3;
137 g_tVoicePlayInfo.usVoicePlayRepeat = 1;
138 g_tVoicePlayInfo.usVoiceVolume = 60; //
139 //g_tVoicePlayInfo.eSwitchStatus = VPSS_VOICE_EXPLICIT_STOP_PLAY;
140 }
141 }
4 语音信息结构体
1 typedef struct{
2 VOI_MODE_TYPE voiMode;
3 UINT16 wCurrVoiceSection; /* 当前语音段. */
4 UINT16 usVoicePlayTimeIn10mS; /* 语音总时长. */
5 UINT16 usVoiceStopIntervalTimeIn10mS; /* 重复播放的间隔时间 */
6 UINT16 usVoiceStopIntervalRemainTimeIn10mS; /* 间隔时间的剩余量. */
7 //UINT16 usVoiceStopTimeoutIn10mS; /* Timeout when checking whether voice stopped. */
8 UINT16 usVoicePlayRepeat; /* 语音重复次数 */
9 UINT16 usVoiceVolume; /* 音量 */
10 UINT16 wVoiceDefaultMaxOutput;
11 UINT16 wVoiceDefaultMinOutput;
12 } T_VOICE_PLAY_INFO;
5 播放语音
static void srvVoiPlayVoice(void)
{
UINT16 wVoiceSection; //语音段
//UINT16 usVoiceVolumeTunerAdjust;
UINT16 usVoiceVolumeToSet; //设置的音量
UINT16 wVoiceStatus; //语音状态
T_OSAL_RESULT eRslt = OSAL_OK;
static UINT16 wLastVoiceStatus = 0; //上一次语音的状态
static UINT32 ticForwait;//等待的时钟数
static E_VOICE_PLAY_SWITCH_STATUS afterResetState = VPSS_VOICE_IDLE; if(gVoiPlayState != VPSS_VOICE_IDLE)
{ //语音状态非IDLE状态
if(gVoiInnerEvent == E_PLAY_VOICE)
{
gVoiPlayState = VPSS_VOICE_RESET;
afterResetState = VPSS_VOICE_LOAD_VOICE;
}else if(gVoiInnerEvent == E_STOP_VOICE){
gVoiPlayState = VPSS_VOICE_RESET;
afterResetState = VPSS_VOICE_IDLE;
}
} switch (gVoiPlayState)
{
case VPSS_VOICE_IDLE:
if(gVoiInnerEvent == E_PLAY_VOICE)
{
gVoiPlayState = VPSS_VOICE_LOAD_VOICE;
}
break; case VPSS_VOICE_LOAD_VOICE:
usVoiceVolumeToSet = g_tVoicePlayInfo.usVoiceVolume;
eRslt = osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_SET_VOICE_VOLUME, &usVoiceVolumeToSet);//设置音量 if (OSAL_IS_RESULT_OK(eRslt))
{ //等音量设置完
wVoiceSection = g_tVoicePlayInfo.wCurrVoiceSection;
eRslt = osalDevWrite(g_hVoiceDevHandle, &wVoiceSection, 1); //加载待播放的语音 if (OSAL_IS_RESULT_OK(eRslt))
{ //等待语音加载完成
if(g_tVoicePlayInfo.voiMode == VOI_MODE_REPEAT)
{ //播放模式为重复播放模式
ticForwait = osalTimGetOSTime();
gVoiPlayState = VPSS_VOICE_TRIGGER_WAIT;
}
else if(g_tVoicePlayInfo.voiMode == VOI_MODE_TIME_LIMITED)
{ //限时播放模式
gVoiPlayState = VPSS_VOICE_PLAY_TIME_LIMITED;
}
}else{
LOG_ERROR_LOG(("Voice driver write failed. Error: %08x.\r\n", eRslt));
}
}else{
LOG_ERROR_LOG(("Voice driver ioctl failed. Error: %08x.\r\n", eRslt));
}
break; case VPSS_VOICE_TRIGGER_WAIT:
//wait 100ms
if((osalTimGetOSTime() -ticForwait) > 1000)
{
wVoiceSection = VOICE_SECTION_NULL;
eRslt = osalDevWrite(g_hVoiceDevHandle, &wVoiceSection, 1);
gVoiPlayState = VPSS_VOICE_PLAY_REPEAT;
}
break; case VPSS_VOICE_PLAY_REPEAT:
eRslt = osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_READ_STATUS, &wVoiceStatus);
if (OSAL_IS_RESULT_OK(eRslt))
{
/* Check if current playing is finished */
if((wVoiceStatus == 0x0000) )//&(wLastVoiceStatus == 0x0001)
{
wLastVoiceStatus = 0;
g_tVoicePlayInfo.usVoiceStopIntervalRemainTimeIn10mS = g_tVoicePlayInfo.usVoiceStopIntervalTimeIn10mS;
gVoiPlayState = VPSS_VOICE_RELOAD_VOICE;
}else{
wLastVoiceStatus = wVoiceStatus;
}
}else{
LOG_ERROR_LOG(("Voice driver ioctl failed. Error: %08x.\r\n", eRslt));
}
break; case VPSS_VOICE_RELOAD_VOICE: if(g_tVoicePlayInfo.usVoiceStopIntervalRemainTimeIn10mS != 0)
{
g_tVoicePlayInfo.usVoiceStopIntervalRemainTimeIn10mS --;
}else{
if(g_tVoicePlayInfo.usVoicePlayRepeat != 0){
if(g_tVoicePlayInfo.usVoicePlayRepeat != VOICE_PLAY_REPEAT_INFINITE)
{
g_tVoicePlayInfo.usVoicePlayRepeat--;
}
if(g_tVoicePlayInfo.usVoicePlayRepeat != 0)
{
wVoiceSection = g_tVoicePlayInfo.wCurrVoiceSection;
eRslt = osalDevWrite(g_hVoiceDevHandle, &wVoiceSection, 1);
ticForwait = osalTimGetOSTime();
gVoiPlayState = VPSS_VOICE_TRIGGER_WAIT;
}
else{
gVoiPlayState = VPSS_VOICE_IDLE;
}
}else{
gVoiPlayState = VPSS_VOICE_IDLE;
}
}
break; case VPSS_VOICE_RESET:
wVoiceSection = VOICE_SECTION_NULL;
eRslt = osalDevWrite(g_hVoiceDevHandle, &wVoiceSection, 1);
eRslt = osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_RST_PLAYBACK_SET, NULL);
ticForwait = osalTimGetOSTime();
gVoiPlayState = VPSS_VOICE_RESET_WAIT;
break; case VPSS_VOICE_RESET_WAIT:
if((osalTimGetOSTime() - ticForwait) > 500)
{
eRslt = osalDevIoctl(g_hVoiceDevHandle, VOICE_CTRL_RST_PLAYBACK_CLR , NULL);
gVoiPlayState = afterResetState;
}
break; case VPSS_VOICE_PLAY_TIME_LIMITED:
if(g_tVoicePlayInfo.usVoicePlayTimeIn10mS != VOICE_PLAY_DURATION_TIME_INFINITE )
{
if(g_tVoicePlayInfo.usVoicePlayTimeIn10mS != 0)
{
g_tVoicePlayInfo.usVoicePlayTimeIn10mS--;
}
else
{
gVoiPlayState = VPSS_VOICE_RESET;
afterResetState = VPSS_VOICE_IDLE;
}
}
break;
}
gVoiInnerEvent = E_NULL; }
基于DSP_CPLD_aP8942A_LM1791的语音控制的更多相关文章
- Diy智能家居-1.基于esp8266的语音控制系统(开篇)
目录Diy智能家居-1.基于esp8266的语音控制系统(开篇) https://blog.csdn.net/arno1988/article/details/82628589 Diy智能家居-2.基 ...
- arduino 语音音箱 :语音控制、MP3播放、报时、回复温湿度情况
arduino 语音音箱 :语音控制.MP3播放.报时.回复温湿度情况 效果图 线路图 包装后的效果 功能 需要材料 arduino板 MP3播放模块及喇叭 时钟模块 温湿度模块 语音识别模块 面包板 ...
- 基于MFCC的语音数据特征提取概述
1. 概述 语音是人类之间沟通交流的最直接也是最快捷方便的一种手段,而实现人类与计算机之间畅通无阻的语音交流,一直是人类追求的一个梦想. 伴随着移动智能设备的普及,各家移动设备的厂家也开始在自家的设备 ...
- 智能家居-3.基于esp8266的语音控制系统(软件篇)
智能家居-1.基于esp8266的语音控制系统(开篇) 智能家居-2.基于esp8266的语音控制系统(硬件篇) 智能家居-3.基于esp8266的语音控制系统(软件篇) 赞赏支持 QQ:505645 ...
- 智能家居-1.基于esp8266的语音控制系统(开篇)
智能家居-1.基于esp8266的语音控制系统(开篇) 智能家居-2.基于esp8266的语音控制系统(硬件篇) 智能家居-3.基于esp8266的语音控制系统(软件篇) apache-apollo安 ...
- 基于MCRA-OMLSA的语音降噪(一):原理
前面的几篇文章讲了webRTC中的语音降噪.最近又用到了基于MCRA-OMLSA的语音降噪,就学习了原理并且软件实现了它.MCRA主要用于噪声估计,OMLSA是基于估计出来的噪声去做降噪.类比于web ...
- 在iPhone上同时关闭语音控制和siri的方法
分享 步骤及要点:1.在设置里打开siri.语音控制就自动关闭了.2.在siri里的"仅语言拨号"语言项里选择"土耳其文"或者"阿拉伯文". ...
- PocketSphinx语音识别和turtlebot的语音控制--18
摘要: 原创博客:转载请表明出处:http://www.cnblogs.com/zxouxuewei/ 1.首先安装 PocketSphinx 语音识别: $ sudo apt--pocketsphi ...
- 在ASP.NET MVC中实现基于URL的权限控制
本示例演示了在ASP.NET MVC中进行基于URL的权限控制,由于是基于URL进行控制的,所以只能精确到页.这种权限控制的优点是可以在已有的项目上改动极少的代码来增加权限控制功能,和项目本身的耦合度 ...
随机推荐
- Xml 映射文件中,除了常见的 select|insert|updae|delete 标签之外,还有哪些标签?
<resultMap>.<parameterMap>.<sql>.<include>. <selectKey>,加上动态 sql 的 9 个 ...
- 接口是否可继承(extends)接口?抽象类是否可实现 (implements)接口?抽象类是否可继承具体类(concrete class)?
接口可以继承接口,而且支持多重继承.抽象类可以实现(implements)接口,抽象类可继承具体类也可以继承抽象类.
- MySQL索引机制(详细+原理+解析)
MySQL索引机制 永远年轻,永远热泪盈眶 一.索引的类型与常见的操作 前缀索引 MySQL 前缀索引能有效减小索引文件的大小,提高索引的速度.但是前缀索引也有它的坏处:MySQL 不能在 ORDER ...
- 1kb 的 placeholder.js 增加 img 标签使用方式
预览 官方网站示例. 项目 github 地址 使用 引入 placeholder.js 到你的前段代码中: <script src="placeholder.js"> ...
- elf,基于flexbox的响应式CSS框架
官网地址:http://jrainlau.github.io/elf/项目地址:https://github.com/jrainlau/elf 介绍 取名为"精灵"的elf,是一个 ...
- [开源] 分享自己用的 GitHub 分组管理工具.
CODELF 的 GitHub Star 管理工具, 简洁快速,从开发者角度考虑,用完就走,不给开发者更多的管理负担. http://unbug.github.io/codelf/ 这个工具目前在 G ...
- IDEA安装配置Scala环境
这里有详细步骤:windows上 IntelliJ IDEA安装scala环境 详细 初学
- 关于根据数据反选checkbox
前两天完成了一个连接hbase数据库的mis系统,mis系统中经常需要修改功能,复选框.多选框等等的自动勾选,感觉很麻烦,在此记录一下修改功能checkbox自动选中. 例子: <div cla ...
- 第二次课堂练习-连接hbase数据库-页面展示
图片来源:中国知网 页面来源:中国科学院文献情报中心-科技查新平台 如有侵权,请评论留言
- iframe引入微信公众号文章
微信在文章页面设置了响应头""frame-ancestors 'self'"阻止了外部页面将其嵌套的行为,文章的图片也设置了防盗链的功能,这就导致了直接在iframe中引 ...