sooftware / kospeech

Open-Source Toolkit for End-to-End Korean Automatic Speech Recognition leveraging PyTorch and Hydra.
https://sooftware.github.io/kospeech/
Apache License 2.0
605 stars 192 forks source link

AttributeError: 'SpeechTransformer' object has no attribute 'greedy_search' 오류 입니다. #122

Closed wooluck-98 closed 3 years ago

wooluck-98 commented 3 years ago

python ./bin/main.py model=transformer 이 명령으로 훈련시키고, 나온 결과로 테스트 해보는데, AttributeError: 'SpeechTransformer' object has no attribute 'greedy_search' 오류가 발생했습니다.

C:\Users\user\anaconda3\envs\stt\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs: C:\Users\user\anaconda3\envs\stt\lib\site-packages\numpy.libs\libopenblas.JPIJNSWNNAN3CE6LLI5FWSPHUT2VXMTH.gfortran-win_amd64.dll C:\Users\user\anaconda3\envs\stt\lib\site-packages\numpy.libs\libopenblas.WCDJNK7YVMPZQ2ME2ZZHJJRJ3JIKNDB7.gfortran-win_amd64.dll warnings.warn("loaded more than 1 DLL from .libs:" C:\Users\user\anaconda3\envs\stt\lib\site-packages\torchaudio\extension\extension.py:13: UserWarning: torchaudio C++ extension is not available. warnings.warn('torchaudio C++ extension is not available.') Traceback (most recent call last): File "./bin/inference.py", line 75, in y_hats = model.greedy_search(feature.unsqueeze(0), input_length, opt.device) File "C:\Users\user\anaconda3\envs\stt\lib\site-packages\torch\nn\modules\module.py", line 947, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'SpeechTransformer' object has no attribute 'greedy_search'

뭐가 문제일까요..? ㅠㅠ

sooftware commented 3 years ago

greedy_search를 recognize로 바꿔보실래요?

miziworld commented 3 years ago

image recognize 함수로 변경했을때 TypeError : recognize() takes 3 positional arguments but 4 were given 이라는 에러메세지가 뜹니다. recongnize() 안에 인자를 3개만 넣어주었는데 왜저런 에러가 뜰까요?