alphacep / vosk-api

Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Apache License 2.0
7.84k stars 1.09k forks source link

Loading CARPA model from ../vosk-model-en-in-0.5/rescore/G.carpa Segmentation fault #1376

Open shivaleela086 opened 1 year ago

shivaleela086 commented 1 year ago

Hi all,

I am working on vosk-api using Kaldi. In that i am running the c programs to validate the output using the vosk-model-en-in-0.5 model. I am running the test_vosk executable in laptop, got the proper output. I build the libvosk.so file for arm7 board, in that if i run the executable, i am getting the segfault at loading the G.carpa. I traced the binary, it gives me the -ENOMEM. Without the G.carpa the accuracy is low. So please anyone help me in resolving the issue.

nshmyrev commented 1 year ago

It says not enough memory. In general we have new generation which is much less memory-hungry

shivaleela086 commented 1 year ago

Hi,

I got it, the error is because of less RAM. I have compiled vosk-en-us-0.22-compile source, in that db/extra.dict and db/extra.txt files are used to add new words. From this i got the model and it is working fine. Now i have a question, is there any other way to add a new word to compiled vosk model? Because it requires 32 GB of RAM and lot of time to compile. It will be very helpful for me.

Thank you, Shivaleela