awni / speech

A PyTorch Implementation of End-to-End Models for Speech-to-Text
Apache License 2.0
750 stars 176 forks source link

Can't find editdistance frm #19

Closed xavigiro closed 6 years ago

xavigiro commented 6 years ago

Hi,

thanks for sharing this code. We are trying to run it but we actually obtain an error when running pytest, it seems that editdistance imported in scores.py is not available.

(pytorch) sroca@nx2:~/speech/tests>> pytest =============================================== test session starts ================================================ platform linux2 -- Python 2.7.9, pytest-3.4.1, py-1.5.2, pluggy-0.6.0 rootdir: /imatge/sroca/speech/tests, inifile: collected 0 items / 6 errors

====================================================== ERRORS ====================================================== _ ERROR collecting ctc_test.py _____ ImportError while importing test module '/imatge/sroca/speech/tests/ctc_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ctc_test.py:5: in from speech.models import CTC ../../pytorch/speech/init.py:2: in from speech.utils.score import compute_cer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance ___ ERROR collecting io_test.py ImportError while importing test module '/imatge/sroca/speech/tests/io_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: io_test.py:3: in import speech.models ../../pytorch/speech/init.py:2: in from speech.utils.score import computecer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance ____ ERROR collecting loader_test.py __ ImportError while importing test module '/imatge/sroca/speech/tests/loader_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: loader_test.py:3: in from speech import loader ../../pytorch/speech/init.py:2: in from speech.utils.score import compute_cer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance __ ERROR collecting model_test.py __ ImportError while importing test module '/imatge/sroca/speech/tests/model_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: model_test.py:6: in import speech.models ../../pytorch/speech/init.py:2: in from speech.utils.score import computecer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance ____ ERROR collecting seq2seqtest.py ____ ImportError while importing test module '/imatge/sroca/speech/tests/seq2seq_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: seq2seq_test.py:6: in from speech.models import Seq2Seq ../../pytorch/speech/init.py:2: in from speech.utils.score import compute_cer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance __ ERROR collecting wave_test.py ___ ImportError while importing test module '/imatge/sroca/speech/tests/wave_test.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: wave_test.py:4: in import speech.utils.wave as wave ../../pytorch/speech/init.py:2: in from speech.utils.score import compute_cer ../../pytorch/speech/utils/score.py:5: in import editdistance E ImportError: No module named editdistance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 6 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================= 6 error in 0.76 seconds ============================================== ``

awni commented 6 years ago

Make sure to install the requirements in requirements.txt.

Run pip install -r requirements.txt.