Hello all,
I have some problems with Pocketsphinx. I decided to integrate speech
recognition in my application. For it I've created a dll project which has
some functions to start, stop and so on speech recognition.
Init function of this project contains code of the tutorial for Pocketsphinx.
This code works great when I use it in the console application. But in my case
I have an accesses violation exception when my init function calls ps_init. This exception is raised in _lock_file. All files (acoustic
model, dictionary, grammar) are available. Here are the stack trace and the
part of the console output:
Console output:
INFO: acmod.c(242): Parsed model-specific feature parameters from
acoustic/feat.params
INFO: fe_interface.c(289): You are using internal mechanism to generate the
seed.
INFO: feat.c(289): Initializing feature stream to type: '1s_c_d_dd',
ceplen=13, CMN='current', VARNORM='no', AGC='none'
INFO: cmn.c(142): mean= 12.00, mean= 0.0
INFO: acmod.c(153): Reading linear feature trasformation from
acoustic/feature.transform
INFO: mdef.c(520): Reading model definition: acoustic/mdef
INFO: bin_mdef.c(173): Allocation 104810 * 8 bytes (818 KiB) for CD tree
INFO: tmat.c(205): Reading HMM transition probability matrices:
acoustic/transition_matrices (After it I have crash)
Stack trace:
ntdll.dll!774f8db9()
ntdll.dll!774f8cc8()
msvcr100.dll!_lock_file(_iobuf * pf) Line 236 + 0xa bytes C
msvcr100.dll!fgets(char * string, int count, _iobuf * str) Line 71 + 0x6 bytes
C
sphinxbase.dll!002319ef()
msvcr100.dll!_unlock(int locknum) Line 375 C
msvcr100.dll!_unlock_file(_iobuf * pf) Line 313 + 0xe bytes C
msvcr100.dll!fread_s(void * buffer, unsigned int bufferSize, unsigned int
elementSize, unsigned int count, _iobuf * stream) Line 113 + 0x8 bytes C
msvcr100.dll!fread(void * buffer, unsigned int elementSize, unsigned int
count, _iobuf * stream) Line 303 + 0x13 bytes C
sphinxbase.dll!00231743()
sphinxbase.dll!00231cbf()
Thanks for your answers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My project was compiled with this option. The similar problem was with bw
tool. It was solved by changing runtime library. Unfortunately it doesn't work
in my case.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I have some problems with Pocketsphinx. I decided to integrate speech
recognition in my application. For it I've created a dll project which has
some functions to start, stop and so on speech recognition.
Init function of this project contains code of the tutorial for Pocketsphinx.
This code works great when I use it in the console application. But in my case
I have an accesses violation exception when my init function calls
ps_init. This exception is raised in _lock_file. All files (acoustic
model, dictionary, grammar) are available. Here are the stack trace and the
part of the console output:
Console output:
INFO: acmod.c(242): Parsed model-specific feature parameters from
acoustic/feat.params
INFO: fe_interface.c(289): You are using internal mechanism to generate the
seed.
INFO: feat.c(289): Initializing feature stream to type: '1s_c_d_dd',
ceplen=13, CMN='current', VARNORM='no', AGC='none'
INFO: cmn.c(142): mean= 12.00, mean= 0.0
INFO: acmod.c(153): Reading linear feature trasformation from
acoustic/feature.transform
INFO: mdef.c(520): Reading model definition: acoustic/mdef
INFO: bin_mdef.c(173): Allocation 104810 * 8 bytes (818 KiB) for CD tree
INFO: tmat.c(205): Reading HMM transition probability matrices:
acoustic/transition_matrices (After it I have crash)
Stack trace:
ntdll.dll!774f8db9()
ntdll.dll!774f8cc8()
Thanks for your answers.
sphinxbase was compiled iwth MultiThreadedDLL runtime, see in vcxproj
If you don't compile your project with similar setting it will crash. Use
proper runtime or recompile sphinxbase
My project was compiled with this option. The similar problem was with bw
tool. It was solved by changing runtime library. Unfortunately it doesn't work
in my case.
Never mind. I decided to recompile sphinxbase and pocketsphinx again. So now
everything works ok. Thank you, nshmyrev, for your answer.