我想使用 ios SFSpeechRecognizer
来识别一组封闭的单词和短语。有没有办法指定这些并消除所有其他可能性?我似乎找不到办法做到这一点。
最佳答案
您可以尝试使用SFSpeechAudioBufferRecognitionRequest的contextualStrings属性来设置高优先级或设置一些不在词汇表中的单词。 欲了解更多信息,请看这里:https://developer.apple.com/documentation/speech/sfspeechrecognitionrequest/1649391-contextualstrings?language=objc
SFSpeechAudioBufferRecognitionRequest *recognitionRequest = [[SFSpeechAudioBufferRecognitionRequest alloc] init];
recognitionRequest.contextualStrings = @[@"Your specific word", @"short custom phrases that are unique to your app"];
关于ios - 是否可以限制 SFSpeechRecognizer 词汇量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61035943/