dangvansam / viet-asr

VietASR - Vietnamese Automatic Speech Recognition
https://github.com/dangvansam98/viet-asr
Apache License 2.0
109 stars 49 forks source link

Lỗi với librosa ! #14

Open trinhanhtuan opened 1 year ago

trinhanhtuan commented 1 year ago

Sau khi cài đặt, tôi chạy thử vào báo lỗi với librosa như ở dưới, tôi đang dùng librosa phiến bản 0.10.1

Cảm ơn bạn, Tuấn

root@voice-dev-01:/opt/viet-asr# python3 infer.py audio_samples ################################################################################

WARNING, path does not exist: KALDI_ROOT=/mnt/matylda5/iveselyk/Tools/kaldi-trunk

(please add 'export KALDI_ROOT=' in your $HOME/.profile)

(or run as: KALDI_ROOT= python .py)

################################################################################

2023-08-20 08:26:24.098 | INFO | main::179 - transcribe audio file in : audio_samples 2023-08-20 08:26:24.098 | INFO | main:init:74 - Init VietASR with params: 2023-08-20 08:26:24.098 | INFO | main:init:75 - ======================== 2023-08-20 08:26:24.098 | INFO | main:init:76 - + config: configs/quartznet12x1_vi.yaml 2023-08-20 08:26:24.098 | INFO | main:init:77 - + encoder_checkpoint: models/acoustic_model/vietnamese/JasperEncoder-STEP-289936.pt 2023-08-20 08:26:24.098 | INFO | main:init:78 - + decoder_checkpoint: models/acoustic_model/vietnamese/JasperDecoderForCTC-STEP-289936.pt 2023-08-20 08:26:24.098 | INFO | main:init:79 - + lm_path: models/language_model/3-gram-lm.binary 2023-08-20 08:26:24.098 | INFO | main:init:80 - + lm_alpha: 0.5 2023-08-20 08:26:24.098 | INFO | main:init:81 - + lm_beta: 1.5 2023-08-20 08:26:24.098 | INFO | main:init:82 - + device: cpu 2023-08-20 08:26:24.098 | INFO | main:init:83 - ======================== [NeMo I 2023-08-20 08:26:24 features:149] PADDING: 0 [NeMo I 2023-08-20 08:26:24 features:170] STFT using torch Traceback (most recent call last): File "/opt/viet-asr/infer.py", line 186, in vietasr = VietASR( File "/opt/viet-asr/infer.py", line 102, in init data_preprocessor = nemo_asr.AudioToMelSpectrogramPreprocessor( File "/opt/viet-asr/nemo/collections/asr/audio_preprocessing.py", line 352, in init self.featurizer = FilterbankFeatures( File "/opt/viet-asr/nemo/collections/asr/parts/features.py", line 200, in init librosa.filters.mel(sample_rate, self.n_fft, n_mels=nfilt, fmin=lowfreq, fmax=highfreq,), TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given

root@voice-dev-01:/opt/viet-asr# pip3 list | grep librosa
librosa 0.10.1

dangvansam commented 1 year ago

Bạn cài librosa 0.7.2 xem sao