0

我是语音识别的新手。我可以通过诸如 ispeech、openers 等 API 将语音(从设备麦克风录制)转换为文本。

但我找不到将音频 wav 文件转换为文本的任何 API 。我认为,可以通过文件共享来支持一些外部服务器(java)。但我喜欢不使用互联网。有任何适用于 IOS 的 API 吗?

4

1 回答 1

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];


}
于 2013-07-02T04:51:54.640 回答