Menu

map_adapt.exe crashing when run

Help
2015-08-12
2015-08-12
  • Natalie Parde

    Natalie Parde - 2015-08-12

    Hi,

    I'm brand new to Sphinx, and have been working through the online tutorials. I've gotten stuck on the "Adapting the default acoustic model" tutorial, when trying to update the acoustic model files with MAP. The previous step, accumulating observation counts, seems to work fine; I'm pasting the only warning listed at the end here:
    WARN: "accum.c", line 628: Over 500 senones never occur in the input data. This is normal for context-dependent untied senone training or for adaptation, but could indicate a serious problem otherwise.

    However, when I run map_adapt.exe with the parameters suggested in the tutorial, map_adapt outputs the following:
    C:\Users\Natalie\workspace\ProcessText\resources\AdaptationData>mapadapt -moddeffn en-us/mdef.txt -ts2cbfn .ptm. -meanfn en-us/means -varfn en-us/variances -mixwfn en-us/mixtureweights -tmatfn en-us/transitionmatrices -accumdir . -mapmeanfn en-us-adapt/means -mapvarfn en-us-adapt/variances -mapmixwfn en-us-adapt/mixtureweights -maptmatfn en-us-adapt/transitionmatrices
    INFO: cmdln.c(697): Parsing command line:
    mapadapt \
    -moddeffn en-us/mdef.txt \
    -ts2cbfn .ptm. \
    -meanfn en-us/means \
    -varfn en-us/variances \
    -mixwfn en-us/mixtureweights \
    -tmatfn en-us/transitionmatrices \
    -accumdir . \
    -mapmeanfn en-us-adapt/means \
    -mapvarfn en-us-adapt/variances \
    -mapmixwfn en-us-adapt/mixtureweights \
    -maptmatfn en-us-adapt/transitionmatrices

    Current configuration:
    [NAME] [DEFLT] [VALUE]
    -accumdir .,
    -bayesmean yes yes
    -example no no
    -fixedtau no no
    -help no no
    -mapmeanfn en-us-adapt/means
    -mapmixwfn en-us-adapt/mixtureweights
    -maptmatfn en-us-adapt/transitionmatrices
    -mapvarfn en-us-adapt/variances
    -meanfn en-us/means
    -mixwfn en-us/mixtureweights
    -moddeffn en-us/mdef.txt
    -mwfloor 0.00001 1.000000e-005
    -tau 10.0 1.000000e+001
    -tmatfn en-us/transitionmatrices
    -tpfloor 0.0001 1.000000e-004
    -ts2cbfn .ptm.
    -varfloor 0.00001 1.000000e-005
    -varfn en-us/variances**

    Then it immediately crashes, with Windows displaying an error window that says "map_adapt.exe has stopped working" (unfortunately not a particularly helpful message).

    I went ahead and tried to debug map_adapt using Visual Studio, but my only debug output was the following:
    'mapadapt.exe': Loaded 'C:\Users\Natalie\workspace\ProcessText\resources\sphinxtrain-5prealpha-win32\sphinxtrain-5prealpha-win32\bin\Release\mapadapt.exe', Binary was not built with debug information.
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Users\Natalie\workspace\ProcessText\resources\sphinxtrain-5prealpha-win32\sphinxtrain-5prealpha-win32\bin\Release\sphinxbase.dll', Binary was not built with debug information.
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\msvcr110.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\winmmbase.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
    'mapadapt.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
    The program '[9176] mapadapt.exe: Native' has exited with code -1 (0xffffffff).

    I'm trying to adapt just the basic en-us model that comes with Sphinx4, and have been following the tutorial essentially word-for-word (the only thing I didn't do was download cmusphinx-en-us-ptm-5.2.tar.gz, because I want to use the adapted model with Sphinx4, and it sounded like that model was for PocketSphinx). I did initially have trouble running map_adapt.exe at all due to it not recognizing the "moddeffn" option, but read in the forums that I should resolve that by downloading the latest map_adapt code from Github, so I did that and recompiled map_adapt, which solved that particular issue.

    Do you know what could be causing map_adapt to crash, and how I might resolve the problem? I'd be happy to send any additional information that you might need.

    Thanks in advance for your help!

    -Natalie

     
  • Nickolay V. Shmyrev

    WARN: "accum.c", line 628: Over 500 senones never occur in the input data. This is normal for context-dependent untied senone training or for adaptation, but could indicate a serious problem otherwise.

    This warning says it is expected to see it for adaptation.

    Do you know what could be causing map_adapt to crash, and how I might resolve the problem? I'd be happy to send any additional information that you might need.

    You do not follow tutorial precisely. You are trying to adapt continuous model, tutorial says you need to adapt ptm model. At the same time you use the following option

     -ts2cbfn .ptm.
    

    For continuous model it must be .cont., not .ptm.

     
  • Natalie Parde

    Natalie Parde - 2015-08-12

    Thanks for your quick response! Unfortunately, map_adapt still crashes when I change the option to .cont. Also (and I apologize in advance if I'm incorrect about this), I think that the en-us model actually is a ptm model. I'm pasting the contents of feat.params below:
    -lowerf 130
    -upperf 6800
    -nfilt 25
    -transform dct
    -lifter 22
    -feat 1s_c_d_dd
    -svspec 0-12/13-25/26-38
    -agc none
    -cmn current
    -varnorm no
    -model ptm
    -cmninit 40,3,-1

    I'd originally left the -ts2cbfn option as .ptm. because of the second-to-last line in feat.params. Is this describing something else?

    Thanks again,

    -Natalie

     
    • Nickolay V. Shmyrev

      Ok, I was confused because you wrote you did not download PTM model. Then the model is PTM

      In your command line I see you do not have underscores in mixture_weights file name. This is suspicious.

      To quickly solve segmentation faults issues, you can learn how to collect stack traces, the documentation is here:

      http://stackoverflow.com/questions/945193/how-do-i-find-the-stack-trace-in-visual-studio

       
  • Natalie Parde

    Natalie Parde - 2015-08-12

    Good catch on the underscores; I went back through my command line and it looks like they're all there on the actual command line, but just got removed when I pasted the content here for some reason.

    Thanks for the link! I've done some more debugging, and managed to isolate the problem to line 390 of main.c (see the code snippet below):
    / Read SI model parameters. /
    if (s3gau_read(si_mean_fn, &si_mean,
    &n_cb, &n_stream, &n_density, &veclen) != S3_SUCCESS)
    E_FATAL("Couldn't read %s\n", si_mean_fn);

    Which can be further traced to line 78 of s3gau_io.c (see the code snippet below):
    fp = s3open(fn, "rb", &swap);
    if (fp == NULL)
    return S3_ERROR;

    Basically, it looks like the program can't open en-us/means for some reason. Any idea what could be causing that? It's way different from any errors I might've expected, because I haven't actually edited en-us/means (as far as I know) from its original version (my version of Sphinx is the one at this link: https://sourceforge.net/projects/cmusphinx/files/sphinx4/5prealpha/). I'll keep debugging, and maybe retry the tutorial from scratch also.

    Thanks for your continued help!

    -Natalie

     
    • Nickolay V. Shmyrev

      Maybe you can try with backslash instead of slash, slash is for Linux. You can also specify a full path.

       
  • Natalie Parde

    Natalie Parde - 2015-08-12

    Okay, I've resolved everything! Posting here in case anyone has a similar problem in the future. I had previously only downloaded the most recent code from the trunk for map_adapt itself, but not for all of the projects in sphinxtrain. I went ahead and downloaded the source for sphinxbase, sphinxtrain, and pocketsphinx (not sure if this was necessary, but I wanted to cover all my bases), and compiled all of it in the orders specified in their respective README files. I'll note the few changes I made:

    • When I originally opened the solution files in Visual Studio 2010, they gave an error about the v110 platform toolset not being installed. I believe there are two ways around this: (1) modify the platform toolset for each project via Project -> Properties -> Configuration Properties ->General ->Platform Toolset -> v100, or (2) open the solution in Visual Studio 2012. I opted for the latter of the two.

    • When I initially compiled the solutions, I received a lot of errors about Visual Studio being unable to find sphinxbase.lib. It's possible that I still had a slightly incorrect directory hierarchy to cause this to happen, so I'm not sure if it's something that people will universally experience. However, it was easily solved by selecting all of the projects, right-clicking on them, and navigating to Properties -> Configuration Properties -> Linker (or Libraries, depending on what type of "project" you selected) -> Input -> Additional Dependencies, and then modifying it to include the full path + filename of sphinxbase.lib (if using Windows, it'll be in bin/Release/Win32).

    After making those changes, all solutions compiled successfully, and I proceeded as described by the tutorials.

    Thanks once again for your help today, Nickolay!

    -Natalie

     

Log in to post a comment.