-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
update the model for the android demo app #1673
Comments
You seem to compile big model, do you try to update small model with it? Those are not compatible. Small model compilation package is in colab (see vosk-adaptation.ipynb file) |
I'll give the notebook a try. How could I take the output of above and make it work with the android demo? |
You put it inside vosk-model-en-us-0.22-lgraph https://alphacephei.com/vosk/models/vosk-model-en-us-0.22-lgraph.zip |
It is also recommended to test on desktop with python first then play with the device |
Tried the notebook. Seems that the decode is failing. I also get the same ivectors warning on the Dockerfile version |
Ah I See need a GPU collab
|
Nope was using a t4 GPU. Seems that Colab now uses version 12 !lsb_release -a No LSB modules are available. |
Add this to the top of the notebook to fix cuda issue: |
Thanks, we probably need to recompile kaldi to use cpu |
I am having exactly the same problem. We have built using vosk-model-small-en-us-0.15-compile-colab. Successfully added words to the dictionary and tested in Python. Where is works perfectly. However we now also want it work inside a browser. So we have used npm install vosk-browser and whilst the default vosk-model-small-en-us-0.15 works. Our newly created model updated with a few words does not. We have enabled the commented out code in compile-graph.sh to see if we can produce them. This does as earlier mentioned allow the Python version to work with the new words. # Lookahead part goes OOM
utils/mkgraph_lookahead.sh \
--self-loop-scale 1.0 data/lang \
exp/tdnn data/en-us-mix.lm.gz exp/tdnn/lgraph It does create the HCLr.fst and Gr.fst files. We move them over and the library in javascript fails with this message.
I have attempted to copy in the ivectors but noted that they have not changed. I have also noted that hte HCLr.fst and Gr.fst are smaller in size. I do have a Cuda machine so we can easily run it. But I haven't had any message saying one was required. Hope you can help us! We love the project. |
This file should not be there. Please check files of the original model. Please delete old files from filesystem, they can break things. |
Thanks for your suggestion. I have removed global_cmvn.stats. I don't have in the logs "Reading CMVN stats." But it still does not seem to work. Using the vosk-model-small-en-us-0.15.zip I have tried to rebuilt the same format. We must be close as the model works in Python. This is based on the vosk-model-small-en-us-0.15-compile-colab.tar.gz - This file is dated 17th August 2022 is there an updated version? |
It is the latest version and it should work fine. You need to provide an updated log and show the model files on your filesystem. |
Here are the logs as requested. File structure is this: What is confusing is that Gr.fst and HCLr.fst are smaller than the one compiled. Even if we change nothing it seems to build smaller. |
it is ok
Ivector folder misses some file (final.ie for example) |
Dockerfile.txt
Trying to add domain specific words for use with android demo. I am using the attached docker file as the build machine.
After a docker build and docker run it will successfully run the
./compile-graph.sh
followed bydecode.sh
After copying in the files to the model in the android project and running, it crashes. Maybe I am not getting all the proper files. Seems that guides suggest only needing to update
Gr.fst
andHCLr.fst
???Looking through the other issues, I know that you recommend using the repos from alphacep, however when using those in the dockerfile it fails to compile.
I have also attached the file list from the compile and decode.
files.txt
Appreciate any help.
The text was updated successfully, but these errors were encountered: