 HackNFly
|
I have an older ipod touch 3rd generation running ios 4.2.1. The problem is that the OpenEars sample application crashes when trying to run on this older model. I also have access to a 4th generation ipod touch running ios 4.2.1 as well and the OpenEars sample works just fine. I’ve tried some limited debugging, and it has something to do with the CHUNK_TO_WRITE_TO variable trying to access position 15 out of a 14 element array. I added some extra output. Here is the interesting bit.
2012-01-23 00:36:16.468 OpenEarsSampleProject[701:5d03] OPENEARSLOGGING: cont_ad_calib failed
2012-01-23 00:36:16.476 OpenEarsSampleProject[701:5d03] OPENEARSLOGGING: Calibration has completed
2012-01-23 00:36:16.488 OpenEarsSampleProject[701:5d03] OPENEARSLOGGING: Project has these words in its dictionary:
BACKWARD
CHANGE
FORWARD
GO
LEFT
MODEL
RIGHT
TURN
2012-01-23 00:36:16.491 OpenEarsSampleProject[701:5d03] OPENEARSLOGGING: Listening.
2012-01-23 00:36:16.479 OpenEarsSampleProject[701:307] Setting up the continuous recognition loop has failed for some reason, please turn on OPENEARSLOGGING in OpenEarsConfig.h to learn more.
2012-01-23 00:36:16.507 OpenEarsSampleProject[701:307] Pocketsphinx calibration is complete.
2012-01-23 00:36:16.547 OpenEarsSampleProject[701:307] OPENEARSLOGGING: I’m running flite
2012-01-23 00:36:16.590 OpenEarsSampleProject[701:6b03] OPENEARSLOGGING: Chunk to WRite to 1
2012-01-23 00:36:16.718 OpenEarsSampleProject[701:6b03] OPENEARSLOGGING: Chunk to WRite to 15
Here is the exact same code running on the ipod 4th generation
2012-01-23 00:38:36.545 OpenEarsSampleProject[194:5f03] OPENEARSLOGGING: Calibration has started
2012-01-23 00:38:36.546 OpenEarsSampleProject[194:307] Pocketsphinx calibration has started.
2012-01-23 00:38:40.766 OpenEarsSampleProject[194:5f03] OPENEARSLOGGING: Calibration has completed
2012-01-23 00:38:40.770 OpenEarsSampleProject[194:5f03] OPENEARSLOGGING: Project has these words in its dictionary:
BACKWARD
CHANGE
FORWARD
GO
LEFT
MODEL
RIGHT
TURN
2012-01-23 00:38:40.771 OpenEarsSampleProject[194:5f03] OPENEARSLOGGING: Listening.
2012-01-23 00:38:40.767 OpenEarsSampleProject[194:307] Pocketsphinx calibration is complete.
2012-01-23 00:38:40.778 OpenEarsSampleProject[194:307] OPENEARSLOGGING: I’m running flite
2012-01-23 00:38:40.892 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 0
2012-01-23 00:38:41.020 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 1
2012-01-23 00:38:41.148 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 2
2012-01-23 00:38:41.290 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 3
2012-01-23 00:38:41.404 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 4
2012-01-23 00:38:41.532 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 5
2012-01-23 00:38:41.660 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 6
2012-01-23 00:38:41.788 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 7
2012-01-23 00:38:41.916 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 8
2012-01-23 00:38:42.044 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 9
2012-01-23 00:38:42.172 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 10
2012-01-23 00:38:42.300 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 11
2012-01-23 00:38:42.428 OpenEarsSampleProject[194:6d03] OPENEARSLOGGING: Chunk to WRite to 12
The code also works in the simulator. I’m using Xcode 4.2 and ios 4.2.1 on both ipod touches. I’ve tried cleaning the whole project and switching to GCC compiler and still get the same issues, any advice? I figure it might have to do with the slower speed of the 3rd generation.
|
 Halle
|
Interesting — I would love to see this but I don’t have a 3rd gen iPod. The speed should not be the issue (I test on a 1g iPhone) but it’s possible that there is some other hardware quirk that can affect the audio buffer. I think we’re a bit stuck for the moment unless someone wants to lend me their iPod.
|
 Halle
|
As a workaround for the moment, you could use this method of using the simulator driver exclusively (which doesn’t use a circular buffer and which has better performance on the hardware than on the simulator, although not as good as the normal driver does):
http://www.politepix.com/forums/topic/cant-recognize-speech-after-playing-video-with-avplayer/?view=all#post-7087
|
 Halle
|
Forgot to mention that this is fixed in => 1.0 so I will mark this resolved.
|