How do you create a trie file?

In the past there was a script to do it, i think, but now I can’t find a way to generate a trie. I need to pass it the Model.enableDecoderWithLM(…) method. Though I did notice for training i had to remove the lm_trie_path argument which i previously used but now isn’t supported.

I generated a language model using the generate_lm.py script which produced a lm.binary file but no corresponding trie, as far as I can see, although there is now a vocab-5000000.txt file in the directory.

Although now i’m looking, the enableDecoderWithLM method doesn’t even exist anymore. Interesting

1 Like

If you take a look at the API, this was renamed to https://deepspeech.readthedocs.io/en/v0.7.4/C-API.html#_CPPv423DS_EnableExternalScorerP10ModelStatePKc and the trie file is now packed with the lm as a “scorer” generated by generate_package.py as documented in https://deepspeech.readthedocs.io/en/v0.7.4/Scorer.html?highlight=language%20model#reproducing-our-external-scorer

1 Like

Thank you, that answers my next question, what to do with the scorer file I generated.

1 Like