[VocalKit] Cannot locate source file pocketsphinx.c

105 views
Skip to first unread message

Francesco

unread,
Sep 7, 2010, 11:01:14 AM9/7/10
to VocalKit
Hi!
First of all, thanks for this library. It's very interesting.
I am using Xcode 3.2.3, an iPhone 3GS running iOS 4, and I have some
problems running the sample application. Unless I stick with the stock
build configuration (iPhoneOS 3.2) everything goes fine, both on the
iPad and iPhone simulator. If I try to change the base SDK to iOS 4.0,
I start to experience runtime errors:

- first the program was crashing after pressing the "Listen" button,
with GDB stating it couldn't find "mmio.c". A quick search in the
forum solved the problem.

- then the program crashes after pressing the "Recognize" button, with
GDB complaining about not finding "pocketsphinx.c".

These problems are preventing me to integrate this library in my
applications. If I try to create my own application by modifying your
example, it seems that everything goes fine until I don't tickle with
SDK version options. If I try to create my iPhone iOS4 application
from scratch, and then integrate your library in it by following and
double checking all the configuration steps, I experience these issues
immediately. The problem is, I can't figure out what is going wrong.

Any help is very appreciated, thanks for your time and your library!

Francesco

Francesco

unread,
Sep 7, 2010, 11:15:31 AM9/7/10
to VocalKit
Another thing to mention: in Xcode I use a unified build directory, as
explainded in this tutorial: http://www.clintharris.net/2009/iphone-app-shared-libraries/
. Don't know if it matters, but I want to reduce my chances of wasting
your time :-)

Sanil Pillai

unread,
Sep 7, 2010, 11:44:52 AM9/7/10
to voca...@googlegroups.com
This is what worked for me while switching between the simulator and the device. go to the vocalkit project. Clean all targets and then rebuild it for the device.
Go to your project.Clean all targets.  Remove any libvocalkit.a references. Add the new one from the new buiild directory in vocalkit . That should work fine.


--
You received this message because you are subscribed to the Google Groups "VocalKit" group.
To post to this group, send email to voca...@googlegroups.com.
To unsubscribe from this group, send email to vocalkit+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vocalkit?hl=en.


Francesco

unread,
Sep 7, 2010, 12:51:56 PM9/7/10
to VocalKit
Got it. It was a configuration problem when loading the language model
and dictionary files that was triggering the "cannot find source file
pocketsphinx.c" error. So it wasn't something related to build
options. My fault, but this post may help people that get the same
error: check the commands you are using to load your .dic and .lm
files. And thanks Sanil for your answer :)

Larry

unread,
Oct 6, 2010, 4:18:14 PM10/6/10
to VocalKit
Could you be a little more specific about this configuration problem?

I am hitting the same error and don't know how to fix it.

I changed the following lines because the files were not being found.

vk = [[VKController alloc] initWithType:VKDecoderTypePocketSphinx
configFile:[[NSBundle mainBundle]
pathForResource:@"pocketsphinx"
ofType:@"conf"]];
// inDirectory:@"model"]];

[vk setConfigString:[[NSBundle mainBundle] pathForResource:@"cmu07a"
ofType:@"dic"]
// inDirectory:@"model/lm/en_US"]
forKey:@"-dict"];

[vk setConfigString:[[NSBundle mainBundle] pathForResource:@"wsj0vp.
5000"
ofType:@"DMP"]
// inDirectory:@"model/lm/en_US"]
forKey:@"-lm"];


This helped get me past initialization and to a point where I could
try
to recognize spoken input, but I crashed with the following error:

INFO: feat.c(848): Initializing feature stream to type: '1s_c_d_dd',
ceplen=13, CMN='current', VARNORM='no', AGC='none'
INFO: cmn.c(142): mean[0]= 12.00, mean[1..12]= 0.0
ERROR: "acmod.c", line 83: Must specify -mdef or -hmm
Program received signal: “EXC_BAD_ACCESS”.
Xcode could not locate source file: pocketsphinx.c (line: 508)


Thanks for the help!

Larry

Brian King

unread,
Oct 6, 2010, 4:32:22 PM10/6/10
to voca...@googlegroups.com
Hey Larry and others.   You might want to check out a project called 'Open Ears'.   It's an objective-c wrapper around pocketsphinx like VocalKit, but it appears to be more feature rich.   I'm not sure if it will get you around your problem but it would be good to look into.

I wrote Vocal Kit largely as an experiment and haven't had the time or reason to polish it.  It looks like Open Ears has a lot more work behind it.


Brian King

Larry

unread,
Oct 6, 2010, 8:34:43 PM10/6/10
to VocalKit
Thanks for letting me know! I will check out the other project.

Regards,

Larry
> > vocalkit+u...@googlegroups.com<vocalkit%2Bunsubscribe@googlegroups.c om>
> > .
Reply all
Reply to author
Forward
0 new messages