MAi.waitResult()
mAi.waitResult(char* res)
描述 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!");
}
|