是语音识别的新手。我能够将语音(从设备麦克风录制)转换为文本使用某些API,如ispeech,openers,&等等。
但我找不到将音频wav文件转换为文本的任何API。我认为,可以通过文件共享来支持一些外部服务器(java)。但我喜欢不使用互联网。有没有可用于IOS的API ???
答案 0 :(得分:0)
看看开放式耳朵演示样本并看到了这样,是的,可以用耳朵打开
- (void) startListening {
// startListeningWithLanguageModelAtPath:dictionaryAtPath:languageModelIsJSGF always needs to know the grammar file being used,
// the dictionary file being used, and whether the grammar is a JSGF. You must put in the correct value for languageModelIsJSGF.
// Inside of a single recognition loop, you can only use JSGF grammars or ARPA grammars, you can't switch between the two types.
// An ARPA grammar is the kind with a .languagemodel or .DMP file, and a JSGF grammar is the kind with a .gram file.
// If you wanted to just perform recognition on an isolated wav file for testing, you could do it as follows:
// NSString *wavPath = [NSString stringWithFormat:@"%@/%@",[[NSBundle mainBundle] resourcePath], @"test.wav"];
//[self.pocketsphinxController runRecognitionOnWavFileAtPath:wavPath usingLanguageModelAtPath:self.pathToGrammarToStartAppWith dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:FALSE]; // Starts the recognition loop.
// But under normal circumstances you'll probably want to do continuous recognition as follows:
[self.pocketsphinxController startListeningWithLanguageModelAtPath:self.pathToGrammarToStartAppWith dictionaryAtPath:self.pathToDictionaryToStartAppWith languageModelIsJSGF:FALSE];
}