0

I've been trying to get openears to work and I've followed the tutorial. I tried both with arc on and off and looked all over the place. It seems to work but once it says listening and I speak it just quits. Here's all my log spat out.

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) 

Here's my code if you feel like taking a gander: https://github.com/evanstoddard/talk-2-hal

evan.stoddard
  • 698
  • 1
  • 5
  • 22

2 Answers2

0

OpenEars developer here. In every reported case of this with one exception it has just been the required files being imported into the app incorrectly so that there is no acoustic model available to the app. Here is a link to how to turn on the debugging that would indicate exactly which file is missing:

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

You can post your logging output (including the required verbosePocketSphinx logging described in that post) in the OpenEars forums there and I'll be happy to help you troubleshoot, since historically SO is not a good platform for doing this kind of app troubleshooting. But it is also very likely that you can fix it yourself by heading back to the tutorial here:

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

And selecting the switch "Offline speech recognition" and then paying extra attention to this step:

Inside your downloaded OpenEars distribution there is a folder called "Frameworks". Drag that folder into your app project in Xcode. Make absolutely sure that in the add dialog "Create groups for any added folders" is selected and NOT "Create folder references for any added folders" because the wrong setting here will prevent your app from working.

This step not being followed literally has been the culprit in all of the cases that have come up like yours (as mentioned, with one exception that was due to a typo in a dictionary key name).

Halle
  • 3,584
  • 1
  • 37
  • 53
  • I think stackoverflow is a great place to troubleshoot this kind of thing. I had a problem that wasn't just specific to the library but was in fact a totally different problem that someone who didn't entirely know the library could figure out. With every post i've seen on here that you gave input on, you've just wanted to get more web traffic and not really help. I agree that the forms may help, but you shouldn't tell people not to be on SO or ask questions. – evan.stoddard Jun 10 '13 at 15:54
  • I am not telling you or anyone to not be on SO or ask questions. I recommend using the forums because I have repeatedly tried to troubleshoot these kinds of issues on SO and they tend to become 30-comment exchanges, which is not what SO is for. I haven't attempted to do so in years because it has gone poorly. I'm sorry it has given the impression of trying to get web traffic, but your exact issue is right on the front page of the forums (the one exception I mentioned): http://www.politepix.com/forums/topic/openears-crash-on-simulator-and-device/ so I respectfully disagree that it's bad advice. – Halle Jun 10 '13 at 16:04
0

I fixed it myself. I was accidentally feeding empty strings for the dictionary and language model files.

evan.stoddard
  • 698
  • 1
  • 5
  • 22