I'm trying to write a little program that uses the pocketsphinx library to do
some continuous speech recognition. However when I try to calibrate the
initial silence threshold (cont_ad_calib(cont)) I get a negative number
returned to me. What are the possible reasons for this?
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm pretty sure it isn't. Let me give you a quick snippet of the code. It's
basically been taken from the HelloWorld tutorial and looking at continuous.c.
Here it is:
And it gets past the initializing of ad and the initializing of cont but
cont_ad_calib returns -1. Is there perhaps something wrong further up in the
code? This is basically the whole program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm trying to write a little program that uses the pocketsphinx library to do
some continuous speech recognition. However when I try to calibrate the
initial silence threshold (cont_ad_calib(cont)) I get a negative number
returned to me. What are the possible reasons for this?
Thanks in advance
Hello
It might be noisy audio or byte endian issue. If noise is too much calibration
can fail. To get more information enable cont_ad debugging by calling
with stdout argument to output debug info on stdout.
Ok, I called cont_ad_st_logfp but it doesn't seem to have printed anything to
the screen. Here is the line I put in:
Which returns 0 to signal success but doesn't seem to do anything.
Well, then maybe your ad doesn't function at all, are you sure it's not NULL?
It's actually very easy to find that out, you can just go step by step through
a function with a debugger.
I'm pretty sure it isn't. Let me give you a quick snippet of the code. It's
basically been taken from the HelloWorld tutorial and looking at continuous.c.
Here it is:
And it gets past the initializing of ad and the initializing of cont but
cont_ad_calib returns -1. Is there perhaps something wrong further up in the
code? This is basically the whole program.
Hello
In this sample you miss ad_start_rec before cont_ad_calib:
See continuous.c in src/programs for details.
I've also just committed a fix to show a message when recording is not
started, this should be easier to debug now.
Thank you, that was the problem. I appreciate the help!