haoheliu / audioldm_eval

This toolbox aims to unify audio generation model evaluation for easier comparison.
MIT License
285 stars 30 forks source link

pad_center() takes 1 positional argument but 2 were given #4

Open SChalice opened 1 year ago

SChalice commented 1 year ago

Looks like a package version problem.

Traceback (most recent call last): File "C:\ai\audioldm\test.py", line 10, in evaluator = EvaluationHelper(16000, device) File "C:\ai\audioldm\audioldm_eval\eval.py", line 64, in init self._stft = Audio.TacotronSTFT(512, 160, 512, 64, 16000, 50, 8000) File "C:\ai\audioldm\audioldm_eval\audio\stft.py", line 144, in init self.stft_fn = STFT(filter_length, hop_length, win_length) File "C:\ai\audioldm\audioldm_eval\audio\stft.py", line 42, in init fft_window = pad_center(fft_window, filter_length) TypeError: pad_center() takes 1 positional argument but 2 were given

chenxinglili commented 1 year ago

This is due to the version update of librosa. By comparing the function between librosa=0.8.0 and librosa=0.10.0, we can find the difference and the solution of this problem. Simply, modify fft_window = pad_center(fft_window, filter_length) to fft_window = pad_center(fft_window, size = filter_length)