在尝试分析语音时,Openears会抛出exc_bad_access(我认为)

时间:2013-06-10 06:45:27

标签: ios xcode exc-bad-access speech-recognition 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

2 个答案:

答案 0 :(得分:0)

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

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

您可以在OpenEars论坛中发布您的日志记录输出(包括该帖子中描述的所需verbosePocketSphinx日志记录),我很乐意帮助您排除故障,因为历史上SO并不是一个很好的平台来做这种应用程序故障排除。但是你很可能通过回到这里的教程自己修复它:

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

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

  

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

这个步骤并没有被字面意思理解为所有案例中的罪魁祸首(如上所述,有一个例外是由于字典键名中的拼写错误)。

答案 1 :(得分:0)

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