iosxcodeexc-bad-accessspeech-recognitionopenears

Openears throws exc_bad_access when trying to analyze speech (I think)


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


Solution

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