-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Missing documentation: Import of a custom kaldi model #39
Comments
How much work it takes depends on the model's configuration (perhaps unsurprising since Kaldi is so configurable). If you are performing the training with the intent to use it with KaldiAG, it can be made quite easy. It's been awhile since I converted the Zamia model, so I may be forgetting something, but as I recall...
FWIW, the unfinished and untested converter is in model.py: see convert_generic_model_to_agf(). |
Got it to work! Turns out I only had forgotten to rename Just for the record: I used the phone set of your |
So I was too fast. While everything that uses non-dictation commands works like a charm, dictation is broken. I only get garbage, nothing that's in any way related to what I said. Looks indeed as some ids don't fit. However, I do not really have an idea what's the root cause. This is what I am using for creating the model dir:
|
@JohnDoe02 Ah, I forgot about the dictation FST! You will need to re-compile it using your new
|
Just for reference:
did the trick. |
Could you please provide the general steps to adapt kaldi models (trained for language other than english) ? |
I want to convert any of the following Chinese Mandarin models to compatible with KAG. Thanks for any help or documentation. I have no experience with Kaldi. Currently the only one environment I can run is from And I know something about |
Similar discussion in #21. |
If it can still be of help/interest to anyone, I have been recently working on importing my own French custom models into KAG. After testing them, I have found them to be well-performing and functional, although I would still need to check some configurations to improve the WER%. To do this, I first performed an acoustic training (HMM-DNN nnet3 chain models) with Kaldi based on 1000h of French speech. Once it was done, I created a folder to dump my KAG custom model in:
And I subsequently copied the files coming from my training (as pointed out by @JohnDoe02). In my case:
Once this was done, I proceeded to compile my language model. To make it work with KAG, I had to deal with the KAG hard coded constants for words and phones. To resolve this, it is necessary to add the list of nonterminals.txt used in KAG (it can be found on any of the available models) to the folder where my pronunciation models are located:
I later run the data preparation with Kaldi:
Once this process is finished, we can copy the following files to the folder that will contain our KAG model:
Finally, the dictation graph is compiled with the following command:
In this way, I managed to create a custom KAG model for French. I hope it can be of any help... In any case, once Lucía |
What steps are necessary to import a custom kaldi model (trained from scratch, not transfer-learned as in #33) into KAG?
In the readme it is currently stated that:
What steps are necessary to kick off the mentioned partial implementation for automatic conversion?
What steps remain to be carried out by the user?
The text was updated successfully, but these errors were encountered: