-
Notifications
You must be signed in to change notification settings - Fork 187
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
How do I use German tuda-de model in kaldi-android-demo? #40
Comments
There is German model here: https://github.com/alphacep/kaldi-android-demo/releases/download/2020-01/alphacep-model-android-de-zamia-0.3.tar.gz, it is good actually and it includes all tuda data.
You need to provide details if you need help on this issue
Default tuda-de is very big, you need to train smaller model first of all with less parameters. Second, you can use this script to create the small graph, thats it: |
@nshmyrev Thanks for your response.
Is it a requirement or a recommendation? Let's say I have a separate device that would run only one app for one purpose if I succeed, so I believe I should be ok to use ~500mb model. I was going to try tuda_swc_mailabs_voc400k from https://github.com/uhh-lt/kaldi-tuda-de (from the size and name I understood you have the same at https://github.com/alphacep/vosk-api/blob/master/doc/models.md named tuda-de). Should I be able to drop the pre-trained model files to assets without any actions on it? Files structure in example and tuda-de pretrained model are different. |
It depends on compute capabilities of your device. Not every android device will be able to process audio in realtime with a big model.
You need to arrange files in the same way, you can check https://github.com/alphacep/vosk-server/blob/1057086fa9e4dccaafd2c6ab0ceeca14e845c205/docker/Dockerfile.kaldi-de#L4 for details. |
I have the problem to connect de_400k_nnet3chain_tdnn1f_2048_sp_bi.
Expected result: Actual result: When I replace mdcc.conf file from conf/ to parent folder Then I got another issue for another file and do again the replacement and in the end I managed to launch the app. V/KaldiDemo: Dimension mismatch: source features have dimension 91 and LDA #cols is 280 Can you please help me?
Thank you very much. Very interesting project! |
It should be mfcc_hires.conf. I sent you the link above, you just need to follow it. |
Ok, I opened it:
What should I change to get it work? |
ah, sorry, you mean this one -> https://github.com/alphacep/vosk-server/blob/1057086fa9e4dccaafd2c6ab0ceeca14e845c205/docker/Dockerfile.kaldi-de#L4 |
After launching this script it asked me again about missing files. I replace it manually and then I got the error: |
this is the full output: And this is the file structure that I have: Can you help me with it? |
You can monitor memory usage on your emulator. Most likely it goes out of memory. |
You are right, is there some requirements or statistics or what is the dependency? Managed to launch alphacep-model-android-de-zamia-0.3 but the result is not good. It cannot detect the simplest German words as "hallo, Wie geht es dir?" or numbers. Maybe I did something wrong? After multiple tries to launch any of https://github.com/uhh-lt/kaldi-tuda-de the application behaves as not enough memory. High appreciate any help, thank you! |
You need to test the accuracy with vosk-api python and prerecorded audio files first. |
So, after playing around a day. FYI: the results are the same on Android devices/emulators and on Volk-api solution. Used prerecorded audio files: My for German mfcc.conf: @nshmyrev can you help me please? |
audio should be 16khz 16 bit pcm mono. Your first file is stereo, second is mp4. |
Profit! Thank you very much! |
We have new German models now, more accurate than external ones. |
@nshmyrev Great news! Could you, please, share some details about how you preprocess it? As I understood from the readme, it's based on kaldi-tuda-de biggest pretrained model. I was using that one also with vosk by changing the initial structure, moving some directories etc. so that it's acceptable for vosk. But your one has new files, like |
In vosk-api docs it's said that tuda-de model is compatible with vosk-api. I tried to run kaldi-android-demo and everything worked for me, but that was simple english model. I need to make some experiments on german language recognition. I have local kaldi server and I've made everything from docs in vosk-api project too. Also I've both pretrained tuda-de models and built one from their sources myself. But what I can't figure out is how to make android-demo working with tuda-de model. Just copying tuda-de pretrained model files instead of kaldi-android-demo/models/src/main/assets/sync/model-android/ files is not working for me too.
As I see you have few models in Release with proper lookahead, maybe I need to uptade tuda-de graph some how too?
Any chances you can describe a bit more in details how to use this android-demo with German tuda-de model, please?
The text was updated successfully, but these errors were encountered: