ideasman42 / nerd-dictation

Simple, hackable offline speech to text - using the VOSK-API.
GNU General Public License v3.0
1.21k stars 104 forks source link

cant make model using the model vosk-model-en-us-daanzu-20200905-lgraph #104

Closed shellheim closed 5 months ago

shellheim commented 11 months ago

I could previously use nerd-dictation with the smaller model included in the readme.rst but then I tried to use a larger model - vosk-model-en-us-daanzu-20200905-lgraph from here.

I downloaded it in the model directory and unzipped it, this resulted in a directory called vosk-model-en-us-daanzu-20200905-lgraph and on running ./nerd-dictation begin --vosk-model-dir=./model I got the following error :

ERROR (VoskAPI:Model():model.cc:122) Folder './model' does not contain model files. Make sure you specified the model path properly in Model constructor. If you are not sure about relative path, use absolute path specification.
Traceback (most recent call last):
  File "/home/user/Code/Git Repos/nerd-dictation/./nerd-dictation", line 1974, in <module>
    main()
  File "/home/user/Code/Git Repos/nerd-dictation/./nerd-dictation", line 1970, in main
    args.func(args)
  File "/home/user/Code/Git Repos/nerd-dictation/./nerd-dictation", line 1835, in <lambda>
    func=lambda args: main_begin(
                      ^^^^^^^^^^^
  File "/home/user/Code/Git Repos/nerd-dictation/./nerd-dictation", line 1437, in main_begin
    found_any = text_from_vosk_pipe(
                ^^^^^^^^^^^^^^^^^^^^
  File "/home/user/Code/Git Repos/nerd-dictation/./nerd-dictation", line 970, in text_from_vosk_pipe
    model = vosk.Model(vosk_model_dir)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/vosk/__init__.py", line 57, in __init__
    raise Exception("Failed to create a model")
Exception: Failed to create a model
papoteur-mga commented 5 months ago

Hello, You have specify to nerd-dication where the model is located nerd-dictation begin --vosk-model-dir=<absolute-path-to>/vosk-model-en-us-daanzu-20200905-lgraph

shellheim commented 5 months ago

Ahh, thanks but I don't use nerd-dictation anymore. Closing this.