AFAIK DeepSpeech works by using the neural net to detect characters from speech, and then the language model is used to try to make a sentence out of the character stream, by doing a kind of graph search. Thus if the language model doesn't contain the words you want it to recognize, it'll have a hard time giving good output.
Anyway, I used the following tutorial[1] as a base to build the language model. For the kenlm tools I used Ubuntu WSL, and the generate_trie executable was part of the DeepSpeech native tools package for Windows.
[1]: https://discourse.mozilla.org/t/tutorial-how-i-trained-a-spe...
For my case I just wanted to train it on like 30 different sentences, that took less than a second. But for a general assistant ala Google Home you'll want a large number of sentences and I hear it can take a while (hour or few?).
Due to using probabilities it will match words in other sentences than what you give it, but from my understanding it will be partial to the ones you feed it if DeepSpeech mis-classifies a character or two.
This was on a slightly earlier version, and they've made improvements in speed and quality of recognition since then.
I should clarify this. As I mentioned, training the neural net part requires tons of audio and the corresponding text (and people should totally contribute[1], the resulting data sets are released to the public). The neural net in DeepSpeech is then used on an audio stream and outputs a stream of characters.
Turning that stream of characters into sentences is what the language model is for.
Training the neural net is very data and compute intensive, but fortunately Mozilla provides pre-trained models.
Generating the language model is relatively cheap. And if your target language shares sounds with English, you may get away with using the English-trained neural net but with a non-English language model.
https://www.researchgate.net/publication/336532830_German_En...
The results are, that adopting works good, but as of writing of the paper somemonths ago, the results were not very good yet. So it takes better trained models for other languages. English seems to be quite good.
What surprised me, is that it works offline very fast even on a rasperry pi!
https://www.hackster.io/dmitrywat/offline-speech-recognition...
https://github.com/DragonComputer/Dragonfire
There's a minimal demo app I put together here too: https://github.com/nmstoker/SimpleSpeechLoop