xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
532 stars 85 forks source link

Unable to use the model #5

Closed AASHISHAG closed 3 years ago

AASHISHAG commented 3 years ago

Hello, Thank you for the great repo.

I am unable to run it. Could you please help me to fix the issue. I tried the following compands.

I am using Miniconda:

  1. Install allosaurus pip install allosaurus

  2. Run inference

    (deepspeech_v0.7.4) agarwal@LTLab.lan@wika:~$ python -m allosaurus.run -i deM23-44.wav
    Traceback (most recent call last):
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/site-packages/allosaurus/run.py", line 21, in <module>
    if len(get_all_models()) == 0:
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/site-packages/allosaurus/model.py", line 13, in get_all_models
    assert len(models) > 0, "No models are available, you can maually download a model with download command or just run inference to download the latest one automatically"
    AssertionError: No models are available, you can maually download a model with download command or just run inference to download the latest one automatically
  3. Download the model

    (deepspeech_v0.7.4) agarwal@LTLab.lan@wika:~$ python -m allosaurus.bin.download_model -m latest
    downloading model  latest
    from:  https://www.pyspeech.com/static/model/recognition/allosaurus/latest.tar.gz
    to:    /home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/site-packages/allosaurus/bin/pretrained
    please wait...
    (deepspeech_v0.7.4) agarwal@LTLab.lan@wika:~$
  4. Run inference

    (deepspeech_v0.7.4) agarwal@LTLab.lan@wika:~$ python -m allosaurus.run -i deM23-44.wav
    Traceback (most recent call last):
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/site-packages/allosaurus/run.py", line 21, in <module>
    if len(get_all_models()) == 0:
    File "/home/LTLab.lan/agarwal/miniconda3/envs/deepspeech_v0.7.4/lib/python3.6/site-packages/allosaurus/model.py", line 13, in get_all_models
    assert len(models) > 0, "No models are available, you can maually download a model with download command or just run inference to download the latest one automatically"
    AssertionError: No models are available, you can maually download a model with download command or just run inference to download the latest one automatically
xinjli commented 3 years ago

Hi, thanks for letting me know this!

The download path was wrong in my last update. I fixed it right now in the latest commit.

Can you try it again?

AASHISHAG commented 3 years ago

Thank you, it worked fine.

Closing the ticket.