MAi.startRest()
mAi.startRest()
描述 startRest()函数用于启动语音识别模式
参数
实例 启动后要使用MAi.waitResult()函数等待识别结果 if(touch2.readEvent() == SHORT_PRESS) {
delay(500);
Serial.print("AT start Rest: ");
if(mAi.startRest()){
Serial.println("OK!");
int32_t code = mAi.waitResult(strBuf);
if(code){
Serial.print("rest code: ");
Serial.print(code);
Serial.print(", result: ");
Serial.println(strBuf);
}else{
Serial.println("rest none ");
}
}else{
Serial.println("Failed!");
}
|