I am using the english vosk model (vosk-model-en-us-0.22, large) in Python to recognize speech from files. I need to add specific words to it dictionary that are not originally there. In the file at: user\ .cache\vosk\vosk-model-en-us-0.22\graph\words.txt "words" and "encodings" are written for them. For example: "lights 185607".
How do I add new words to the wax model? Is it enough to add them just to write them in encoded form in words.txt? Or is there something else that needs to be done besides this? And how can I encode them correctly?
I wrote new words after the end and added to each of them the next number in a row. This did not help and the model in python is not created after that. words.txt (add new word "NBD"):
<s> 368705
</s> 368706
NBD 368707
`
after that the model is not created and an exception is thrown