-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiled pocketsphinx.js does not work #5
Comments
@AakashGfude , I do get the same warnings with recent versions of emscripten, but they do not seem to have any consequence as the generated JavaScript file works fine. Do you see any error in the JavaScript console? To be able to help you more, could you:
|
To generate pocketsphinx.js , the commands i used were: cmake -DEMSCRIPTEN=1 -DCMAKE_TOOLCHAIN_FILE=/home/aakash2/emscripten/cmake/Platform/Emscripten.cmake -DHMM_BASE=/home/aakash2/HMM_BASE -DHMM_FOLDERS=model1 .. and my pocketsphinx.js file is 125 MB , which is too much.. Thanks a lot, |
Yes, your file is too large, the browsers won't load it:
It seems like your acoustic model is very large, can you make it smaller, with less senones? I stayed with 200 senones in the default packaged model. I hope that helps. |
Thanks, |
Yes, @AakashGfude , you can just remove hub4 is built on 8kHz audio, so I'd recommend you to build, for instance, a RM1 model as explained in the cmusphinx model training tutorial, which uses 16kHz audio. You can then go through adaptation if you have files to use for that. Note that with adaptation, you just add a small file to your acoustic model, so you can't change your number of senones during adaptation. You can also just start adaptation from the RM1 model provided with And yes, you can then just use it in the demo by replacing
|
Theres an mdef.txt which comes which hub4 which we have to convert to binary just like mixture_weights and sendump according to that tutorial . Thanks a lot mate . |
One last issue.. I just wanted to know if size is causing the problem, means i should not use hub4 or i have done something wrong in the compilation process.. Thanks, |
@AakashGfude can you please post the output from the JavaScript console? It's not possible to guess what happens otherwise. Meanwhile, I tried this:
Which gave me a 22MB JavaScript file, replaced the one in In Then I opened |
The output from the javascript console is :: Current configuration: js/pocketsphinx.js:150 U have any idea what is causing that error. |
I used your mixture_weight. file which you had removed . Here is my compiled javascript file of rm1_200 .. if you want to have a look : https://drive.google.com/folderview?id=0B6Pc1k2W4-laWTJGNVdFTnZsejQ&usp=sharing same error.. |
Hi , I had a similar kind of error . I copied your CMakeLists.txt and put it in the directory where i had pocketsphinx and sphinxbase . when running cmake it showed fe_noise.c file is missing and my sphinxbase didnt have it so i removed it from the sphinxbase source files in the CMakeLists.txt file . |
@hanksmathew pocketsphinx.js includes the sources of sphinxbase and pocketsphinx, you should use those source files, they are up to date and in sync with CMakeLists.txt. You were probably working with an old version of pocketsphinx/sphinxbase as fe_noise.c was added fairly recently. |
@AakashGfude I looked at your file. The recognizer actually loads successfully, but the call to addWords fails, so the acoustic model is probably bad. I do not know what model files you packaged, I compared your values with mine and 3 of the 7 files of the model were different. It is a file that you have trained yourself on RM1? |
yess.. i was doing adaptation with recordings of these 26 sentences https://drive.google.com/file/d/0B6Pc1k2W4-laNmNxd0c4Z095SVE/edit?usp=sharing And yaa i copied CMakeLists.txt and the fe folder in your libsphinxbase directory of sphinxbase to my compiled sphinxbase which i downloaded from the downloads menu of that site , as it didnt have fe_noise.c as @hanksmathew said.. maybe cmusphinx.sourceforge.net has an old sphinxbase.. and i ran cmake in a build folder , then ran make. Did i do anything wrong ? |
Now, i downloaded a different sphinbase and pocketsphinx and the make check commnad says that they have passed all the tests .. and this time sphinxbase has all the latest files like fe_noise and fe_type.h . In file included from /home/aakash2/sphinxbase/src/libsphinxbase/fe/fe_noise.c:60: If u know why this error comes then please help . and can u share your mixture_weights file of rm1 model . |
@AakashGfude , as I said earlier, the sources of sphinxbase and pocketsphinx are included in pocketsphinx.js, use these ones, do not copy your CMakeLists.txt somewhere else. To diagnose your issue, I suggest you to:
If you still have issues, please tell which step fails, and provide your acoustic model files and the compilation and JavaScript console outputs. |
Its working fine now :) Thanks a lottt dude . |
Hi,
I have been trying to implement voice recognition to a webpage for my project, and to improve accuracy , i followed the steps given in http://cmusphinx.sourceforge.net/wiki/tutorialadapt . I am doing this in ubuntu 12.04 LTS.
when i run cmake with emscripten, the build files are generated without errors but when i run make , the following warnings shows up :
warning: unresolved symbol: _embind_register_class_function
warning: unresolved symbol: _embind_register_class_constructor
warning: unresolved symbol: _embind_register_class
warning: unresolved symbol: _embind_register_value_object_field
warning: unresolved symbol: _embind_finalize_value_object
warning: unresolved symbol: _embind_register_value_object
warning: unresolved symbol: _emval_undefined
warning: unresolved symbol: _emval_take_value
warning: unresolved symbol: _emval_decref
warning: unresolved symbol: _emval_incref
warning: unresolved symbol: _embind_register_value_array_element
warning: unresolved symbol: _embind_finalize_value_array
warning: unresolved symbol: _embind_register_value_array
warning: unresolved symbol: _embind_register_enum_value
warning: unresolved symbol: _embind_register_enum
warning: unresolved symbol: fast_logmath_add
warning: unresolved symbol: _embind_register_void
warning: unresolved symbol: _embind_register_bool
warning: unresolved symbol: _embind_register_integer
warning: unresolved symbol: _embind_register_float
warning: unresolved symbol: _embind_register_std_string
warning: unresolved symbol: _embind_register_std_wstring
warning: unresolved symbol: _embind_register_emval
warning: unresolved symbol: _embind_register_memory_view
warning: Casting a function pointer type to a potentially incompatible one (use -s VERBOSE=1 to see more)
warning: See https://github.com/kripken/emscripten/wiki/CodeGuidelinesAndLimitations#function-pointer-issues for more information on dangerous function pointer casts
[100%] Built target pocketsphinx.js
Though the pocketsphinx.js file is generated , but it does not seem to work, i.e., the recognizer does not get ready when i replace this with your one in the 'webapps' folder.
I dont know what to do now..
Please help
The text was updated successfully, but these errors were encountered: