HPI-DeepLearning / crnn-lid

Code for the paper Language Identification Using Deep Convolutional Recurrent Neural Networks
GNU General Public License v3.0
105 stars 48 forks source link

Predict single audio(mp3 file). #17

Closed Varuzhan97 closed 4 years ago

Varuzhan97 commented 4 years ago

command: python3 predict.py --model 2017-01-31-14-29-14.CRNN_EN_DE_FR_ES_CN_RU.model --input aaa.wav

error: Traceback (most recent call last): File "predict.py", line 7, in from data_loaders.SpectrogramGenerator import SpectrogramGenerator File "/home/varuzhan/Desktop/crnn-lid-master/keras/data_loaders/init.py", line 2, in from .image_loader import ImageLoader File "/home/varuzhan/Desktop/crnn-lid-master/keras/data_loaders/image_loader.py", line 2, in from scipy.misc import imread ImportError: cannot import name 'imread'

Bartzi commented 4 years ago

did you install all requirements with pip install -r requirements.txt or did you install things by yourself?

Varuzhan97 commented 4 years ago

I have installed somethings by me somethings by requirements.

On Thu, 16 Jan 2020 at 14:45, Christian Bartz notifications@github.com wrote:

did you install all requirements with pip install -r requirements.txt or did you install things by yourself?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HPI-DeepLearning/crnn-lid/issues/17?email_source=notifications&email_token=AIR4WNT3DPPEELKODBGDRFLQ6A3EVA5CNFSM4KHHOYEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJDTVWA#issuecomment-575093464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIR4WNWD7A4ISTBGQ2Y4IJLQ6A3EVANCNFSM4KHHOYEA .

Bartzi commented 4 years ago

you get this error, because your version of scipy is too new. So, either you install the correct version, or you fix the problem yourself.

Varuzhan97 commented 4 years ago

which one is the correct version?

Bartzi commented 4 years ago

the one in the file requirements.txt :wink:

Varuzhan97 commented 4 years ago

ok. thanks

Varuzhan97 commented 4 years ago

I have done how you said. I have installed all requirements. Now error is:

('SpectrogramGenerator Exception: ', IOError(2, 'No such file or directory'), '/home/varuzhan/Desktop/crnn-lid-master/keras/aaa.mp3') Traceback (most recent call last): File "/home/varuzhan/Desktop/crnn-lid-master/keras/predict.py", line 41, in predict(cli_args) File "/home/varuzhan/Desktop/crnn-lid-master/keras/predict.py", line 16, in predict data = np.stack(data) File "/home/varuzhan/.local/lib/python2.7/site-packages/numpy/core/shape_base.py", line 335, in stack raise ValueError('need at least one array to stack') ValueError: need at least one array to stack

Bartzi commented 4 years ago

are you sure the file /home/varuzhan/Desktop/crnn-lid-master/keras/aaa.mp3 exists? The program can not find this file.

Varuzhan97 commented 4 years ago

Problem was with requirements. I have solved it.

Aksh97 commented 3 years ago

@Varuzhan97 How did you solve the problem of requirements.txt? Can you please add to your repo?