daanzu / kaldi-active-grammar

Python Kaldi speech recognition with grammars that can be set active/inactive dynamically at decode-time
GNU Affero General Public License v3.0
339 stars 51 forks source link

cannot find model_dir #77

Open awejha opened 1 year ago

awejha commented 1 year ago

I have extracted the kaldi_model directory into "site-packages\kaldi_active_grammar\", however upon trying to execute plain_dictation.py I get the following error: Traceback (most recent call last): File "C:\Users\hp\source\repos\kaldi-active-grammar\examples\plain_dictation.py", line 5, in recognizer = PlainDictationRecognizer() # Or supply non-default model_dir, tmp_dir, or fst_file File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\kaldi_active_grammar\plain_dictation.py", line 40, in init self._compiler = Compiler(model_dir, tmp_dir, cache_fsts=False) File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\kaldi_active_grammar\compiler.py", line 266, in init self.model = Model(model_dir, tmp_dir, tmp_dir_needed=tmp_dir_needed) File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\kaldi_active_grammar\model.py", line 192, in init raise KaldiError("cannot find model_dir: %r" % self.model_dir) kaldi_active_grammar.KaldiError: cannot find model_dir: 'kaldi_model\'