pocketsphinx.js
pocketsphinx.js copied to clipboard
Compiling memory error
I am trying to use a custom model I edited from the public model. I edited it without any problems but when I try and compile it with
sudo cmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=/Users/alec/Downloads/emscripten/cmake/Modules/Platform/Emscripten.cmake EMCC_CORES=1 -DDICT_BASE=./dicts -DDICT_FILES=keyphrase.dict -DHMM_BASE='/home/alec/Downloads/train/' -DHMM_FOLDERS=en-us-test .
which outputs:
Copying /home/alec/Downloads/train//en-us-test to binary dir Copying ./dicts/keyphrase.dict to binary dir -- Configuring done -- Generating done -- Build files have been written to: /home/alec/Downloads/pocketsphinx.js
I am not sure if the // is supposed to be there. Not sure how to change that. and then
make
it gives me this error:
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory Traceback (most recent call last): File "/home/alec/Downloads/emscripten/emcc", line 13, in <module> emcc.run() File "/home/alec/Downloads/emscripten/emcc.py", line 1934, in run JSOptimizer.flush() File "/home/alec/Downloads/emscripten/emcc.py", line 1830, in flush run_passes(chunks[0], title, just_split=False, just_concat=False) File "/home/alec/Downloads/emscripten/emcc.py", line 1803, in run_passes final = shared.Building.js_optimizer(final, passes, debug_level >= 4, JSOptimizer.extra_info, just_split=just_split, just_concat=just_concat) File "/home/alec/Downloads/emscripten/tools/shared.py", line 1828, in js_optimizer ret = js_optimizer.run(filename, passes, NODE_JS, debug, extra_info, just_split, just_concat) File "/home/alec/Downloads/emscripten/tools/js_optimizer.py", line 559, in run return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat)) File "/home/alec/Downloads/emscripten/tools/tempfiles.py", line 78, in run_and_clean return func() File "/home/alec/Downloads/emscripten/tools/js_optimizer.py", line 559, in <lambda> return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, source_map, extra_info, just_split, just_concat)) File "/home/alec/Downloads/emscripten/tools/js_optimizer.py", line 501, in run_on_js assert proc.returncode == 0 AssertionError CMakeFiles/pocketsphinx.js.dir/build.make:57: recipe for target 'CMakeFiles/pocketsphinx.js' failed make[2]: *** [CMakeFiles/pocketsphinx.js] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pocketsphinx.js.dir/all' failed make[1]: *** [CMakeFiles/pocketsphinx.js.dir/all] Error 2 Makefile:83: recipe for target 'all' failed
I was able to compile the public model without any problems but once I edited the public model, it stopped letting me compile it. I am sure it is not a memory problem because I gave my vm 10 gb of ram and 4 cores to use and when monitored, one of the cores go to 100% usage but the memory usage doesn't go above 3 gb. What am I doing wrong?
Update:
I tried changing the command to
sudo cmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=/home/alec/Desktop/Files/emscripten/cmake/Modules/Platform/Emscripten.cmake -DDICT_BASE=./dicts -DDICT_FILES=keyphrase.dict -DHMM_BASE='/home/alec/Desktop/Files/pocketsphinx.js' -DHMM_FOLDERS=rm1_200
and that seemed to compile, but then I cannot use my custom model. I followed this guide here:
http://cmusphinx.sourceforge.net/wiki/tutorialadapt
Also, when I run pocketsphinx.js with this configuration, I get this error:
ERROR: "lda.c", line 71: LDA incompatible with multi-stream features (n_stream = 4)
Error in start with code [object Object] main.js:146