Comments (5)
I understand the errors you mention are compile-time errors, not errors reported by the browser, right?
To answer your questions:
- Compilation is quick. However, at the end of compilation, if you package model files inside your JavaScript files, it converts them do text data, and that might take a little longer.
TOTAL_MEMORY
is an emscripten setting to set the virtual memory size of the JavaScript processes, so it has nothing to do with compilation.- It is definitely a good practice to do out-of-tree compilation. In a
build
folder, or however you want to name it. Note the..
at the end of the cmake invocation to point to the location toCMakeLists.txt
.
And I would very warmly recommend to package your model files outside pocketsphinx.js
as explained in the docs. In addition, it would give you more information of what fails (compilation vs. encoding of model files).
If I were you I would follow how memory gets used with top
and/or free
, and possibly create a swap partition.
from pocketsphinx.js.
yes, it's compilation-time error.
Thanks for pointing the .. at the end of the cmake line, I didn't notice that!
Do you recommend not to package even the accoustic model? What is the reason for that?
I believe browsers prefer sending one big request rather than several small ones.
And I have a 1Gb swap partition.
from pocketsphinx.js.
OK, so first I successfully compiled pocketsphinx without packaging anything with (HMM_EMBED=OFF), then I tried packaging the am, lm and dict files in separate js.
It fails when packing the french language model (250Mb) with an out of memory error.
The error message clearly says the python script ate the whole memory and swap (4Gb + 1Gb):
Killed process 3508 (python) total-vm:4904444Kb, anon-rss:3791864Kb, file-rss:44Kb
the command was:
sudo python .../file_packages.py ../build/pocketsphinx.js --embed french3g62K.lm.dmp --js-output=french3g62K.lm.js
Any idea is welcome!
from pocketsphinx.js.
- How about just increasing your swap then?
- Any reason why you run the packaging command as root?
- For your earlier question: as files are large request time is negligible, and separating data files and program makes sure your data files remain cached even if you update the recognizer code (pocketsphinx.js).
from pocketsphinx.js.
5Gb of memory is not enough to package a 250Mb file? Sounds weird.
Actually, the process failed but generated an incomplete 1Gb js file. 250Mb was already a very big file, but 1Gb, it's just too much for downloading with a regular ADSL connection.
Seeing the size of the resulting file and the amount of memory necessary, I would tend to think the packaging process has a problem.
Anyhow, I will search for a smaller grammar for my test, loading a generic grammar is just too much at the moment.
To answer your second question, no particular reason to use the root user, but I guess it doesn't matter.
And thanks for your explanation, it makes sense.
from pocketsphinx.js.
Related Issues (20)
- lazyLoading, Module.FS_createPath not found (emscripten compilation without accoustic model) HOT 1
- some time when click on start i am getting Cannot change search while decoding, end utterance first HOT 1
- FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory HOT 2
- Words.push_back accept 1 arguments only HOT 1
- Trying to build but submodules fail HOT 2
- BindingError with self-compiled pocketsphinx.js HOT 2
- Change threshold to increase accuracy detection HOT 2
- in web form asp.net? HOT 2
- Can't install with npm HOT 1
- Webapp.js file is missing HOT 1
- Buffer in recognizer uses obsolete data on multiple "process"-requests
- issue with make
- Web Worker Lazy Load Command - Outgoing Message is Empty HOT 1
- Compilation Failed In Custom Acoustic Model
- Grammar for numbers? HOT 5
- Pocketsphinx within web worker
- live.html demo no longer works in Chrome, only Firefox
- Compilation into WebAssembly fails HOT 1
- Sorry if I laugh HOT 1
- Local host not working with chrome
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pocketsphinx.js.