Home Forums OpenEars Problem during mdef reading (model definition)

This topic contains 8 replies, has 2 voices, and was last updated by  Halle 3 years, 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)

  • Author
    Posts
  • #7089

    kirillrost
    Participant

    Greetings Halle,

    Thank you very much for openEars, it really great and helped me a lot ;)

    Today I tried to upgrade to 0.911 and use in my project, but once I load language file / dictionary file to PocketsphinxController, application hangs during mmap’ing of mdef file from the hub4wsj_sc_8k.

    Log before crash:

    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
    INFO: acmod.c(163): Using subvector specification 0-12/13-25/26-38
    INFO: mdef.c(520): Reading model definition: /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/mdef
    INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
    INFO: bin_mdef.c(330): Reading binary model definition: /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/mdef
    [Switching to process 13315 thread 0x0]
    [Switching to process 13315 thread 0x0]
    warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J3)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).

    Hangs at mmio.c @ ptr = mmap(NULL, buf.st_size, PROT_READ, MAP_SHARED, fd, 0); (it found file in the project, but couldnt read…)

    If I dont include hub4wsj_sc_8k folder into a project, voice recognition works until first noise (can see from pocketsphinxInputLevel) and then hangs at PS_START_UTT() as supposed to. I generate languagemodel (.lm) and dictionary file (.dic) with LanguageModelGenerator and checked the reading paths too, but everything seems alright…

    Checked project settings many times, but really cant figure out where is the problem…all steps from Guide worked. Really have no idea why this happens :(

    Using Xcode4 and checking on iPad.

    I will greatly appreciate your help ^_^

    #7091

    Halle
    Politepix

    Hi kirillrost,

    Are you upgrading from .902 or .91? Let’s see all of the logging from the first call to any OpenEars object until the crash — it is likely that there is an error in the logging that shows the issue but it is probably much earlier in the logs. Show OPENEARSLOGGING as well as VERBOSEPOCKETSPHINX.

    #7092

    kirillrost
    Participant

    Halle,

    Thank you for the fast reply ^_^

    I tried to upgrade before, but gave up on that idea and just created new project from scratch to debug the problem.

    The full log:

    2011-07-11 19:05:59.966 UPGRADE_TESTAPP[6508:707] OPENEARSLOGGING: Starting dynamic language model generation
    2011-07-11 19:05:59.968 UPGRADE_TESTAPP[6508:707] OPENEARSLOGGING: Running MITLM
    3.930 Loading corpus /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.corpus…
    3.990 Smoothing[1] = ModKN
    3.990 Smoothing[2] = ModKN
    3.990 Smoothing[3] = ModKN
    3.990 Set smoothing algorithms…
    3.990 Estimating full n-gram model…
    4.000 Saving LM to /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.languagemodel…
    2011-07-11 19:06:00.282 UPGRADE_TESTAPP[6508:707] OPENEARSLOGGING: I’m done running dynamic language model generation and it took 0.314063 seconds

    2011-07-11 19:06:00.292 UPGRADE_TESTAPP[6508:7707] OPENEARSLOGGING: Recognition loop has started
    INFO: cmd_ln.c(512): Parsing command line:
    \
    -lm /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.languagemodel \
    -dict /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.dic \
    -fdict /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/noisedict \
    -hmm /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/ UPGRADE_TESTAPP.app \
    -maxhmmpf 3000 \
    -maxwpf 5

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -argfile
    -ascale 20.0 2.000000e+01
    -backtrace no no
    -beam 1e-48 1.000000e-48
    -bestpath yes yes
    -bestpathlw 9.5 9.500000e+00
    -bghist no no
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 8.0
    -compallsen no no
    -debug 0
    -dict /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.dic
    -dictcase no no
    -dither no no
    -doublebw no no
    -ds 1 1
    -fdict /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/noisedict
    -feat 1s_c_d_dd 1s_c_d_dd
    -featparams
    -fillprob 1e-8 1.000000e-08
    -frate 100 100
    -fsg
    -fsgusealtpron yes yes
    -fsgusefiller yes yes
    -fwdflat yes yes
    -fwdflatbeam 1e-64 1.000000e-64
    -fwdflatefwid 4 4
    -fwdflatlw 8.5 8.500000e+00
    -fwdflatsfwin 25 25
    -fwdflatwbeam 7e-29 7.000000e-29
    -fwdtree yes yes
    -hmm /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app
    -input_endian little little
    -jsgf
    -kdmaxbbi -1 -1
    -kdmaxdepth 0 0
    -kdtree
    -latsize 5000 5000
    -lda
    -ldadim 0 0
    -lextreedump 0 0
    -lifter 0 0
    -lm /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/Documents/nekoz.languagemodel
    -lmctl
    -lmname default default
    -logbase 1.0001 1.000100e+00
    -logfn
    -logspec no no
    -lowerf 133.33334 1.333333e+02
    -lpbeam 1e-40 1.000000e-40
    -lponlybeam 7e-29 7.000000e-29
    -lw 6.5 6.500000e+00
    -maxhmmpf -1 3000
    -maxnewoov 20 20
    -maxwpf -1 5
    -mdef
    -mean
    -mfclogdir
    -mixw
    -mixwfloor 0.0000001 1.000000e-07
    -mllr
    -mmap yes yes
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 40
    -nwpen 1.0 1.000000e+00
    -pbeam 1e-48 1.000000e-48
    -pip 1.0 1.000000e+00
    -pl_beam 1e-10 1.000000e-10
    -pl_pbeam 1e-5 1.000000e-05
    -pl_window 0 0
    -rawlogdir
    -remove_dc no no
    -round_filters yes yes
    -samprate 16000 1.600000e+04
    -seed -1 -1
    -sendump
    -senmgau
    -silprob 0.005 5.000000e-03
    -smoothspec no no
    -svspec
    -tmat
    -tmatfloor 0.0001 1.000000e-04
    -topn 4 4
    -topn_beam 0 0
    -toprule
    -transform legacy legacy
    -unit_area yes yes
    -upperf 6855.4976 6.855498e+03
    -usewdphones no no
    -uw 1.0 1.000000e+00
    -var
    -varfloor 0.0001 1.000000e-04
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wbeam 7e-29 7.000000e-29
    -wip 0.65 6.500000e-01
    -wlen 0.025625 2.562500e-02

    INFO: cmd_ln.c(512): Parsing command line:
    \
    -nfilt 20 \
    -lowerf 1 \
    -upperf 4000 \
    -wlen 0.025 \
    -transform dct \
    -round_filters no \
    -remove_dc yes \
    -svspec 0-12/13-25/26-38 \
    -feat 1s_c_d_dd \
    -agc none \
    -cmn current \
    -cmninit 39 \
    -varnorm no

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -agc none none
    -agcthresh 2.0 2.000000e+00
    -alpha 0.97 9.700000e-01
    -ceplen 13 13
    -cmn current current
    -cmninit 8.0 39
    -dither no no
    -doublebw no no
    -feat 1s_c_d_dd 1s_c_d_dd
    -frate 100 100
    -input_endian little little
    -lda
    -ldadim 0 0
    -lifter 0 0
    -logspec no no
    -lowerf 133.33334 1.000000e+00
    -ncep 13 13
    -nfft 512 512
    -nfilt 40 20
    -remove_dc no yes
    -round_filters yes no
    -samprate 16000 1.600000e+04
    -seed -1 -1
    -smoothspec no no
    -svspec 0-12/13-25/26-38
    -transform legacy dct
    -unit_area yes yes
    -upperf 6855.4976 4.000000e+03
    -varnorm no no
    -verbose no no
    -warp_params
    -warp_type inverse_linear inverse_linear
    -wlen 0.025625 2.500000e-02

    INFO: acmod.c(238): Parsed model-specific feature parameters from /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/feat.params
    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
    INFO: acmod.c(163): Using subvector specification 0-12/13-25/26-38
    INFO: mdef.c(520): Reading model definition: /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/mdef
    INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file

    INFO: bin_mdef.c(330): Reading binary model definition: /var/mobile/Applications/BB132A42-6FA6-4D9F-AD70-2226068DF6E2/UPGRADE_TESTAPP.app/mdef

    #7094

    Halle
    Politepix

    OK, there’s nothing in there that should be causing a crash. There is an issue that has come up very rarely, in which the MDEF (which is binary) got corrupted after being read in the Xcode editor. When you started fresh, did you also start with fresh zips of the CMU libraries or did you use the same CMU libraries from your previous attempt that you had run the install script on? If you haven’t tried this, you might get a better result if you start from the very beginning with re-downloading (or re-unzipping if you still have the zipped archives around) the CMU libraries and running the install script on them again. Also, do a “clean all” of your project at any stage in which you have a suspicion that there are changed parts of your project that aren’t being compiled new.

    #7102

    kirillrost
    Participant

    Halle, thank you for advice, but sadly tried 3 times already with fresh projects & downloads, but still getting same problem.

    May be MDEF is corrupted? I still getting a feeling that I might done something wrong during the install…but really not sure what exactly as all pre-tests are working fine :(

    #7103

    kirillrost
    Participant

    Strangely, but OpenEarsSampleProject is working without any problems (using same hub4wsj_sc_8k folder as my main app), but still cant figure out why it hangs on mmap’ing of MDEF file in main app…

    #7105

    Halle
    Politepix

    OK, if the sample app can use the same MDEF without issue that suggests very strongly that there is just a regular configuration issue with your app, although I don’t have a suggestion of what it might be given the info available. One thing you can try is to drop both folders (your app and the sample app) on Filemerge.app and see if it shows you a significant difference that might account for it.

    The tests that are in the tutorial won’t catch any issues that are related to Pocketsphinx-required files that are added to the main project (for instance the hmm files or your language model) because they aren’t dependencies. Although in every case I’ve seen, VERBOSEPOCKETSPHINX will complain if something is missing. That it doesn’t almost makes me wonder if it is a memory management thing instead of a file availability thing (double check the suggested memory management technique from the configuration documents).

    I think the most orderly way to troubleshoot this is to simplify until you have things as similar to the sample app as possible, and then use Filemerge.app or diff to examine differences between the two projects. The reason I recommend these tools is that they will also point up differences in your project files so you can see if (for instance) there is some difference in linker flags/header paths/other project-level options.

    #7107

    kirillrost
    Participant

    Thank you Halle ^_^

    Somehow after removing all OpenEars files and re-adding them again + changing the build output to Xcode default solved this problem ^_^ May be Xcode is playing tricks….

    Thank you very much for help ;)

    #7108

    Halle
    Politepix

    OK, sorry about the mystery but glad it’s working for you now!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.