我正在研究iOS上的语音识别,但是每次我调用方法 [_recognitionRequest endAudio] ,它总是在recognitionTaskWithRequest中出错:消息在底部。
-(void) stopRecording {
if (_disableSpeechSW == YES) {
return;
}
if (_isAuthorization == NO) {
return;
}
NSLog(@"stopRecording");
if ([_audioEngine isRunning]) {
[_audioEngine stop];
[_recognitionRequest endAudio];
}
}
-(void) startRecording {
..........
[_speechRecognizer recognitionTaskWithRequest:_recognitionRequest
resultHandler:^(SFSpeechRecognitionResult *result,NSError *error){
if (error != nil ) {
NSLog(@"%@",[error description]);
}
else {
..........
}
}];}
[实用工具] +[AFAggregator logDictationFailedWithError:] 错误域=kAFAssistantErrorDomain 代码=203 "重试" UserInfo={NSLocalizedDescription=重试, NSUnderlyingError=0x17424c690 {错误域=SiriSpeechErrorDomain 代码=1 "(null)"}}