0

我一直在努力让 openears 工作,并且按照教程进行操作。我尝试了开启和关闭电弧,并查看了整个地方。它似乎有效,但一旦它说正在听,我说它就退出了。这是我吐出的所有日志。

2013-06-10 02:40:40.245 Talk 2 Hal[3832:907] Starting OpenEars logging for OpenEars version 1.2.4 on device: iPhone running iOS version: 6.100000
2013-06-10 02:40:45.123 Talk 2 Hal[3832:907] A sample rate was requested that isn't one of the two supported values of 16000 or 8000 so we will use the default of 16000.
2013-06-10 02:40:45.205 Talk 2 Hal[3832:907] The audio session has never been initialized so we will do that now.
2013-06-10 02:40:45.208 Talk 2 Hal[3832:907] Checking and resetting all audio session settings.
2013-06-10 02:40:45.214 Talk 2 Hal[3832:907] audioCategory is incorrect, we will change it.
2013-06-10 02:40:45.216 Talk 2 Hal[3832:907] audioCategory is now on the correct setting of kAudioSessionCategory_PlayAndRecord.
2013-06-10 02:40:45.218 Talk 2 Hal[3832:907] bluetoothInput is incorrect, we will change it.
2013-06-10 02:40:45.219 Talk 2 Hal[3832:907] bluetooth input is now on the correct setting of 1.
2013-06-10 02:40:45.221 Talk 2 Hal[3832:907] categoryDefaultToSpeaker is incorrect, we will change it.
2013-06-10 02:40:45.224 Talk 2 Hal[3832:907] CategoryDefaultToSpeaker is now on the correct setting of 1.
2013-06-10 02:40:45.226 Talk 2 Hal[3832:907] preferredBufferSize is incorrect, we will change it.
2013-06-10 02:40:45.230 Talk 2 Hal[3832:907] PreferredBufferSize is now on the correct setting of 0.128000.
2013-06-10 02:40:45.233 Talk 2 Hal[3832:907] preferredSampleRateCheck is incorrect, we will change it.
2013-06-10 02:40:45.235 Talk 2 Hal[3832:907] preferred hardware sample rate is now on the correct setting of 16000.000000.
2013-06-10 02:40:45.483 Talk 2 Hal[3832:907] AudioSessionManager startAudioSession has reached the end of the initialization.
2013-06-10 02:40:45.493 Talk 2 Hal[3832:907] Exiting startAudioSession.
2013-06-10 02:40:45.498 Talk 2 Hal[3832:1107] Recognition loop has started
2013-06-10 02:40:45.750 Talk 2 Hal[3832:1107] Starting openAudioDevice on the device.
2013-06-10 02:40:45.753 Talk 2 Hal[3832:1107] Audio unit wrapper successfully created.
2013-06-10 02:40:45.781 Talk 2 Hal[3832:1107] Set audio route to SpeakerAndMicrophone
2013-06-10 02:40:45.784 Talk 2 Hal[3832:1107] Checking and resetting all audio session settings.
2013-06-10 02:40:45.787 Talk 2 Hal[3832:1107] audioCategory is correct, we will leave it as it is.
2013-06-10 02:40:45.788 Talk 2 Hal[3832:1107] bluetoothInput is correct, we will leave it as it is.
2013-06-10 02:40:45.790 Talk 2 Hal[3832:1107] categoryDefaultToSpeaker is correct, we will leave it as it is.
2013-06-10 02:40:45.792 Talk 2 Hal[3832:1107] preferredBufferSize is correct, we will leave it as it is.
2013-06-10 02:40:45.794 Talk 2 Hal[3832:1107] preferredSampleRateCheck is correct, we will leave it as it is.
2013-06-10 02:40:45.795 Talk 2 Hal[3832:1107] Setting the variables for the device and starting it.
2013-06-10 02:40:45.797 Talk 2 Hal[3832:1107] Looping through ringbuffer sections and pre-allocating them.
2013-06-10 02:40:46.329 Talk 2 Hal[3832:1107] Started audio output unit.
2013-06-10 02:40:46.332 Talk 2 Hal[3832:907] Pocketsphinx calibration has started.
2013-06-10 02:40:46.332 Talk 2 Hal[3832:1107] Calibration has started
2013-06-10 02:40:48.538 Talk 2 Hal[3832:1107] Calibration has completed
2013-06-10 02:40:48.538 Talk 2 Hal[3832:907] Pocketsphinx calibration is complete.
2013-06-10 02:40:48.542 Talk 2 Hal[3832:1107] Project has these words in its dictionary:
2013-06-10 02:40:48.544 Talk 2 Hal[3832:1107] Listening.
2013-06-10 02:40:48.545 Talk 2 Hal[3832:907] Pocketsphinx is now listening.
(lldb) 

如果您想看一看,这是我的代码:https ://github.com/evanstoddard/talk-2-hal

4

2 回答 2

0

OpenEars 开发人员在这里。在每个报告的这种情况下,除了一个例外,只是所需文件被错误地导入应用程序,因此应用程序没有可用的声学模型。以下是如何打开调试的链接,该链接将准确指示缺少哪个文件:

http://www.politepix.com/forums/topic/install-issues-and-their-solutions/

您可以在那里的 OpenEars 论坛中发布您的日志输出(包括该帖子中描述的所需的verbosePocketSphinx 日志),我很乐意帮助您进行故障排除,因为从历史上看,SO 并不是进行此类应用程序故障排除的好平台。但是您也很可能可以通过返回此处的教程自行修复它:

http://www.politepix.com/openears/tutorial/

并选择“离线语音识别”开关,然后特别注意这一步:

在您下载的 OpenEars 发行版中,有一个名为“Frameworks”的文件夹。将该文件夹拖到 Xcode 中的应用程序项目中。确保在添加对话框中选择“为任何添加的文件夹创建组”而不是“为任何添加的文件夹创建文件夹引用”,因为此处的错误设置将阻止您的应用程序运行。

没有按照字面意思执行此步骤是所有像您一样出现的情况的罪魁祸首(如前所述,有一个例外是由于字典键名中的拼写错误)。

于 2013-06-10T13:31:42.827 回答
0

我自己修好了。我不小心为字典和语言模型文件提供了空字符串。

于 2013-06-10T15:49:51.967 回答