Hi,
so this problem I have may not be so easy to describe.
I have created a python script and use pocketsphinx 0.1.0 for python.
I created a little additional dictionary that contains some words and their pronunciation. At the start of my program and after the configuration of the decoder I call the function add_word(word,pron,update) in a loop with the words and pronunciations from the lines of my additional text file dict. I choose update=True only for the last word added.
This seems to work fine, the words can be recognized if I decode files with these spoken words in them. Also with lookup_word they are found.
Now there is one problem, I narrowed my problem down step by step and it is this:
If I add more than 4 words with add_word and then decode an audiofile where one of the words, being the 5th or 5+Nth word added, are recognized (or should be recognized), my program just crashes and in my case windows says "python has stopped working".
I reinstalled python3.5.2 and pocketshpinx but there's no difference. Through the narrowing down the problem I can see that the SAME word in the SAME audiofile is being recognized if the word is added via add_word e.g. as the 4th new word.
I find this very confusing, the log also is not that interesting because the program crashes but I will post it anyway.
Currentconfiguration:[NAME][DEFLT][VALUE]-agcnonenone-agcthresh2.02.000000e+00-allphone-allphone_cinono-alpha0.979.700000e-01-ascale20.02.000000e+01-aw11-backtracenono-beam1e-481.000000e-48-bestpathyesyes-bestpathlw9.59.500000e+00-ceplen1313-cmnlivebatch-cmninit40,3,-140,3,-1-compallsennono-debug0-dict./models/ger2/voxforge.dic-dictcasenono-dithernono-doublebwnono-ds11-fdict-feat1s_c_d_dd1s_c_d_dd-featparams-fillprob1e-81.000000e-08-frate100100-fsg-fsgusealtpronyesyes-fsgusefilleryesyes-fwdflatyesyes-fwdflatbeam1e-641.000000e-64-fwdflatefwid44-fwdflatlw8.58.500000e+00-fwdflatsfwin2525-fwdflatwbeam7e-297.000000e-29-fwdtreeyesyes-hmm./models/ger2/voxforge.cd_cont_3000-input_endianlittlelittle-jsgf-keyphrase-kws-kws_delay1010-kws_plp1e-11.000000e-01-kws_threshold11.000000e+00-latsize50005000-lda-ldadim00-lifter022-lm./models/ger2/voxforge.lm.dmp-lmctl-lmname-logbase1.00011.000100e+00-logfn-logspecnono-lowerf133.333341.300000e+02-lpbeam1e-401.000000e-40-lponlybeam7e-297.000000e-29-lw6.56.500000e+00-maxhmmpf3000030000-maxwpf-1-1-mdef-mean-mfclogdir-min_endfr00-mixw-mixwfloor0.00000011.000000e-07-mllr-mmapyesyes-ncep1313-nfft512512-nfilt4025-nwpen1.01.000000e+00-pbeam1e-481.000000e-48-pip1.01.000000e+00-pl_beam1e-101.000000e-10-pl_pbeam1e-101.000000e-10-pl_pip1.01.000000e+00-pl_weight3.03.000000e+00-pl_window55-rawlogdir-remove_dcnono-remove_noiseyesyes-remove_silenceyesyes-round_filtersyesyes-samprate160001.600000e+04-seed-1-1-sendump-senlogdir-senmgau-silprob0.0055.000000e-03-smoothspecnono-svspec-tmat-tmatfloor0.00011.000000e-04-topn44-topn_beam00-toprule-transformlegacydct-unit_areayesyes-upperf6855.49766.800000e+03-uw1.01.000000e+00-vad_postspeech5050-vad_prespeech2020-vad_startspeech1010-vad_threshold2.02.000000e+00-var-varfloor0.00011.000000e-04-varnormnono-verbosenono-warp_params-warp_typeinverse_linearinverse_linear-wbeam7e-297.000000e-29-wip0.656.500000e-01-wlen0.0256252.562500e-02INFO:feat.c(715):Initializingfeaturestreamtotype:'1s_c_d_dd',ceplen=13,CMN='batch',VARNORM='no',AGC='none'INFO:cmn.c(97):mean[0]=12.00,mean[1..12]=0.0INFO:acmod.c(156):Readinglinearfeaturetransformationfrom./models/ger2/voxforge.cd_cont_3000/feature_transformINFO:mdef.c(518):Readingmodeldefinition:./models/ger2/voxforge.cd_cont_3000/mdefINFO:bin_mdef.c(181):Allocating82313*8bytes(643KiB)forCDtreeINFO:tmat.c(206):ReadingHMMtransitionprobabilitymatrices:./models/ger2/voxforge.cd_cont_3000/transition_matricesINFO:acmod.c(117):AttemptingtousePTMcomputationmoduleINFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/meansINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/variancesINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(304):3398variancevaluesflooredINFO:ptm_mgau.c(804):Numberofcodebooksexceeds256:3198INFO:acmod.c(119):Attemptingtousesemi-continuouscomputationmoduleINFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/meansINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/variancesINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(304):3398variancevaluesflooredINFO:acmod.c(121):Fallingbacktogeneralmulti-streamGMMcomputationINFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/meansINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(127):Readingmixturegaussianparameter:./models/ger2/voxforge.cd_cont_3000/variancesINFO:ms_gauden.c(242):3198codebook,1feature,size:INFO:ms_gauden.c(244):16x29INFO:ms_gauden.c(304):3398variancevaluesflooredINFO:ms_senone.c(149):Readingsenonemixtureweights:./models/ger2/voxforge.cd_cont_3000/mixture_weightsINFO:ms_senone.c(200):Truncatingsenonelogs3(pdf)valuesby10bitsINFO:ms_senone.c(207):NottransposingmixtureweightsinmemoryINFO:ms_senone.c(268):Readmixtureweightsfor3198senones:1featuresx16codewordsINFO:ms_senone.c(320):MappingsenonestoindividualcodebooksINFO:ms_mgau.c(144):Thevalueoftopn:4INFO:phone_loop_search.c(114):Statebeam-225Phoneexitbeam-225Insertionpenalty0INFO:dict.c(320):Allocating31724*20bytes(619KiB)forwordentriesINFO:dict.c(333):Readingmaindictionary:./models/ger2/voxforge.dicINFO:dict.c(213):Dictionarysize27625,allocated261KiBforstrings,453KiBforphonesINFO:dict.c(336):27625wordsreadINFO:dict.c(358):Readingfillerdictionary:./models/ger2/voxforge.cd_cont_3000/noisedictINFO:dict.c(213):Dictionarysize27628,allocated0KiBforstrings,0KiBforphonesINFO:dict.c(361):3wordsreadINFO:dict2pid.c(396):BuildingPIDtablesfordictionaryINFO:dict2pid.c(406):Allocating66^3*2bytes(561KiB)forword-initialtriphonesINFO:dict2pid.c(132):Allocated52536bytes(51KiB)forword-finaltriphonesINFO:dict2pid.c(196):Allocated52536bytes(51KiB)forsingle-phonewordtriphonesINFO:ngram_model_trie.c(354):TryingtoreadLMintriebinaryformatINFO:ngram_search_fwdtree.c(74):InitializingsearchtreeINFO:ngram_search_fwdtree.c(101):605uniqueinitialdiphonesINFO:ngram_search_fwdtree.c(186):CreatingsearchchannelsINFO:ngram_search_fwdtree.c(323):Maxnonrootchanincreasedto88448INFO:ngram_search_fwdtree.c(333):Created605root,88320non-rootchannels,3single-phonewordsINFO:ngram_search_fwdflat.c(157):fwdflat:min_ef_width=4,max_sf_win=25paula--- P AW L AA no updatewäscht--- V EHH SH T no updatepersil--- P ERH Z IIH L no updateüberquere--- Q YYH B EX K V EEH RR AX no updatekraut--- K RR AW T no updateINFO:ngram_search_fwdtree.c(74):InitializingsearchtreeINFO:ngram_search_fwdtree.c(101):605uniqueinitialdiphonesINFO:ngram_search_fwdtree.c(186):CreatingsearchchannelsINFO:ngram_search_fwdtree.c(333):Created605root,88332non-rootchannels,3single-phonewordsINFO:phone_loop_search.c(114):Statebeam-225Phoneexitbeam-225Insertionpenalty0flieder--- F L IIH D EX UPDATEINFO:cmn.c(137):CMN:43.209.094.017.81-1.89-9.08-10.76-6.70-1.88-2.024.28-4.94-4.49
There you can see that at some point at the end I print out the added words with an information if the update is done or not. If I then decode a file in which normally the word "kraut" (the 5th word) or "flieder" (the 6th word) are recognized (e.g. if they are added as the first two new words) the program crashes after this last line of the log.
I thought it may have something to do with the language model update, because with lookup_word the words seem to be existent.
Thanks for your help!!!
Last edit: Jonas Helm 2016-09-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Users\jmh\AppData\Local\Programs\Python\Python35-32\pyth
on.exe...(no debugging symbols found)...done.
(gdb) run
Starting program: C:\Users\jmh\AppData\Local\Programs\Python\Python35-32/python.
exe recognition_test_gdb.py
[New Thread 8488.0xca4]
[New Thread 8488.0x1850]
../../gdb-7.6.1/gdb/minsyms.c:862: internal-error: sect_index_data not initializ
ed
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
../../gdb-7.6.1/gdb/minsyms.c:862: internal-error: sect_index_data not initializ
ed
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n)
I will try to fix this and come back to you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
so this problem I have may not be so easy to describe.
I have created a python script and use pocketsphinx 0.1.0 for python.
I created a little additional dictionary that contains some words and their pronunciation. At the start of my program and after the configuration of the decoder I call the function add_word(word,pron,update) in a loop with the words and pronunciations from the lines of my additional text file dict. I choose update=True only for the last word added.
This seems to work fine, the words can be recognized if I decode files with these spoken words in them. Also with lookup_word they are found.
Now there is one problem, I narrowed my problem down step by step and it is this:
If I add more than 4 words with add_word and then decode an audiofile where one of the words, being the 5th or 5+Nth word added, are recognized (or should be recognized), my program just crashes and in my case windows says "python has stopped working".
I reinstalled python3.5.2 and pocketshpinx but there's no difference. Through the narrowing down the problem I can see that the SAME word in the SAME audiofile is being recognized if the word is added via add_word e.g. as the 4th new word.
I find this very confusing, the log also is not that interesting because the program crashes but I will post it anyway.
There you can see that at some point at the end I print out the added words with an information if the update is done or not. If I then decode a file in which normally the word "kraut" (the 5th word) or "flieder" (the 6th word) are recognized (e.g. if they are added as the first two new words) the program crashes after this last line of the log.
I thought it may have something to do with the language model update, because with lookup_word the words seem to be existent.
Thanks for your help!!!
Last edit: Jonas Helm 2016-09-21
To debug crashes it is helpful to collect a stacktrace
then type command
run, once it crashes typebacktrace.I will try it. At the moment I have this problem:
I will try to fix this and come back to you!
It is probably easier to debug this thing on Linux.
It would be also helpful to get an example code to reproduce the problem.
Ok, nevermind. I was able to reproduce the issue here. Looking for a fix.
I have just fixed this in trunk, please update and it should work.