Hi, to not add a topic for every question I think it's better to ask all what
I need just here
I'm using SphinxTrain snapshot and when I run "sphinxtrain -t test setup" it
just add the feat.params and sphinx_train.cfg in the etc folder, there is no
other folders (feat logdir model_parameters model_architecture...) just etc
and wav that I've creat before
and inside of sphinx_train.cfg I've this:
# Variables used in characterizing models
$CFG_HMM_TYPE = '.cont.'; # Sphinx III
#$CFG_HMM_TYPE = '.semi.'; # PocketSphinx and Sphinx II
#$CFG_HMM_TYPE = '.ptm.'; # PocketSphinx (larger data sets)
, after that I renamed the .dmp to .lm.DMP, am I right?!
last question: I based my work on the an4 folder, I did the same
wav/amdigits_clstk and wav/amdigitstest_clstk for the test, my suestion is the
test data should I use some data from the amdigits_clstk or something else...
Thank you so much for all the help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
but in the tutorial: $CFG_HMM_TYPE = '.cont.'; # Sphinx 4, Pocketsphinx
This documentation difference was fixed in trunk
and I just wanna make sure I did the right thing with the .lm.DMP, I did
what in the language model tuto sphinx_lm_convert -i model.lm -o model.dmp
sphinx_lm_convert -i model.dmp -ifmt dmp -o model.lm -ofmt arpa, after that I
renamed the .dmp to .lm.DMP, am I right?!
Only first command is enough. Second command is needed to convert model back.
There was no need to rename extension to uppercase
last question: I based my work on the an4 folder, I did the same
wav/amdigits_clstk and wav/amdigitstest_clstk for the test, my suestion is the
test data should I use some data from the amdigits_clstk or something else...
For the test data you need to use recordings closer to the audio you are going
to recognize, not an4.
I want to build an application with pocketsphinx, can I use code::blocks and
Qt to creat an interface?
Yes you can
and what I've to import from sphinxbase and pocketsphinx, can you please
explain, I'm totaly lost :s
Yes I know how to import .h/c/cpp files to my project, but I just don't know
the right ones to import, can you please tell me the right one to import in
order to build a cpp application with a simple qt interface, that records
voice from mic and compare it with my acoustic model... May be using this
function:
staticvoidrecognize_from_microphone(){ad_rec_t*ad;int16adbuf[4096];int32k,ts,rem;charconst*hyp;charconst*uttid;cont_ad_t*cont;charword[256];if((ad=ad_open_dev(cmd_ln_str_r(config,"-adcdev"),(int)cmd_ln_float32_r(config,"-samprate")))==NULL)E_FATAL("Failed top open audio device\n");/*Initializecontinuouslisteningmodule*/if((cont=cont_ad_init(ad,ad_read))==NULL)E_FATAL("Failed to initialize voice activity detection\n");if(ad_start_rec(ad)<0)E_FATAL("Failed to start recording\n");if(cont_ad_calib(cont)<0)E_FATAL("Failed to calibrate voice activity detection\n");for(;;){/*Indicatelisteningfornextutterance*/printf("READY....\n");fflush(stdout);fflush(stderr);/*Waitdatafornextutterance*/while((k=cont_ad_read(cont,adbuf,4096))==0)sleep_msec(100);if(k<0)E_FATAL("Failed to read audio\n");/**Non-zeroamountofdatareceived;startrecognitionofnewutterance.*NULLargumenttouttproc_begin_utt=>automaticgenerationofutterance-id.*/if(ps_start_utt(ps,NULL)<0)E_FATAL("Failed to start utterance\n");ps_process_raw(ps,adbuf,k,FALSE,FALSE);printf("Listening...\n");fflush(stdout);/*Notetimestampforthisfirstblockofdata*/ts=cont->read_ts;/*Decodeutteranceuntilend(markedbya"long"silence,>1sec)*/for(;;){/*Readnon-silenceaudiodata,ifany,fromcontinuouslisteningmodule*/if((k=cont_ad_read(cont,adbuf,4096))<0)E_FATAL("Failed to read audio\n");if(k==0){/**Nospeechdataavailable;checkcurrenttimestampwithmostrecent*speechtoseeifmorethan1secelapsed.Ifso,endofutterance.*/if((cont->read_ts-ts)>DEFAULT_SAMPLES_PER_SEC)break;}else{/*Newspeechdatareceived;notecurrenttimestamp*/ts=cont->read_ts;}/**Decodewhateverdatawasreadabove.*/rem=ps_process_raw(ps,adbuf,k,FALSE,FALSE);/*Ifnoworktobedone,sleepabit*/if((rem==0)&&(k==0))sleep_msec(20);}/**Utteranceended;flushanyaccumulated,unprocessedA/Ddataandstop*listeninguntilcurrentutterancecompletelydecoded*/ad_stop_rec(ad);while(ad_read(ad,adbuf,4096)>=0);cont_ad_reset(cont);printf("Stopped listening, please wait...\n");fflush(stdout);/*Finishdecoding,obtainandprintresult*/ps_end_utt(ps);hyp=ps_get_hyp(ps,NULL,&uttid);printf("%s: %s\n",uttid,hyp);fflush(stdout);/*ExitifthefirstwordspokenwasGOODBYE*/if(hyp){sscanf(hyp,"%s",word);if(strcmp(word,"goodbye")==0)break;}/*ResumeA/Drecordingfornextutterance*/if(ad_start_rec(ad)<0)E_FATAL("Failed to start recording\n");}cont_ad_close(cont);ad_close(ad);}
" Only first command is enough. Second command is needed to convert model
back. There was no need to rename extension to uppercase
but now I've some errors :/ :
ERROR: "ngram_model_arpa.c", line 466: File /home/hyt-med/Desktop/beta/etc/beta.lm.DMP not found
ERROR: "ngram_model_dmp.c", line 106: Dump file /home/hyt-med/Desktop/beta/etc/beta.lm.DMP not found
ERROR: "ngram_search.c", line 208: Failed to read language model file: /home/hyt-med/Desktop/beta/etc/beta.lm.DMP
the command sphinx_lm_convert generate a .dmp file but in the tutorial
:(your_db.lm.DMP), I think I've to rename the file from beta.dmp to
beta.lm.DMP so it can be found, Yes?!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, to not add a topic for every question I think it's better to ask all what
I need just here
I'm using SphinxTrain snapshot and when I run "sphinxtrain -t test setup" it
just add the feat.params and sphinx_train.cfg in the etc folder, there is no
other folders (feat logdir model_parameters model_architecture...) just etc
and wav that I've creat before
and inside of sphinx_train.cfg I've this:
but in the tutorial:
and I just wanna make sure I did the right thing with the .lm.DMP, I did what
in the language model tuto
, after that I renamed the .dmp to .lm.DMP, am I right?!
last question: I based my work on the an4 folder, I did the same
wav/amdigits_clstk and wav/amdigitstest_clstk for the test, my suestion is the
test data should I use some data from the amdigits_clstk or something else...
Thank you so much for all the help
Is there anybody here??!!!
I want to build an application with pocketsphinx, can I use code::blocks and
Qt to creat an interface?
and what I've to import from sphinxbase and pocketsphinx, can you please
explain, I'm totaly lost :s
This documentation difference was fixed in trunk
Only first command is enough. Second command is needed to convert model back.
There was no need to rename extension to uppercase
For the test data you need to use recordings closer to the audio you are going
to recognize, not an4.
Yes you can
See http://forums.codeblocks.org/index.php?topic=9672.0
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:My
project_should_be_compiled_with_a_custom_makefile._Is_it_possible_with_Code::B
locks.3F
Also note that you do not need to import sphinxbase in order to develop
applications using it. You can just add libraries and includes
http://www.learncpp.com/cpp-tutorial/a3-using-libraries-with-
codeblocks/
Thank you much sir :) :) :)
Yes I know how to import .h/c/cpp files to my project, but I just don't know
the right ones to import, can you please tell me the right one to import in
order to build a cpp application with a simple qt interface, that records
voice from mic and compare it with my acoustic model... May be using this
function:
with:
Thank's again :)
Please read the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialpocketsphinx
It describes which files to import
Sorry I think I didn't make myself clear, I just want to add this part :
to the pocketsphinx/src/programs/continuous.c, I think there is a function
that allows puting c code in a cpp project ( extern "C" {} I think)
I just need a point to start from, I'm lost right now :/
Sorry
Hello all,
I did exactely as You said:
but now I've some errors :/ :
the command sphinx_lm_convert generate a .dmp file but in the tutorial
:(your_db.lm.DMP), I think I've to rename the file from beta.dmp to
beta.lm.DMP so it can be found, Yes?!