open-mmlab / Amphion

Amphion (/æmˈfaɪən/) is a toolkit for Audio, Music, and Speech Generation. Its purpose is to support reproducible research and help junior researchers and engineers get started in the field of audio, music, and speech generation research and development.
https://openhlt.github.io/amphion/
MIT License
4.45k stars 379 forks source link

[BUG]: TypeError in pad_center() During FastSpeech2 Preprocessing Due to librosa Version Mismatch #119

Closed sakura657 closed 7 months ago

sakura657 commented 7 months ago

Describe the bug

I continued running the preprocessing command for FastSpeech2 and encountered a TypeError related to the pad_center() function from the librosa package. The command line displayed the error message: TypeError: pad_center() takes 1 positional argument but 2 were given.

How To Reproduce

Steps to reproduce the behavior:

  1. Config/File changes: Followed the Amphion's Installation instructions and set up the conda environment accordingly. cd Amphion , I run this command in the Amphion root path.
  2. Run command: sh egs/tts/FastSpeech2/run.sh --stage 1 to initiate the preprocessing stage.
  3. See error: TypeError: pad_center() takes 1 positional argument but 2 were given

Expected behavior

The expectation was for the preprocessing command to run without any TypeErrors, assuming all dependencies were installed correctly as per the provided installation guide.

Additional context

Upon closer inspection, I discovered that the pad_center() function belongs to the librosa package. By checking the librosa version in the conda environment with import librosa followed by print(librosa.__version__), I realized that the installed version did not match the version required for the preprocessing script to run properly. After reviewing the librosa documentation, I ran pip install librosa==0.9.2 within the conda environment to match the version where pad_center() accepts two arguments. Updating the librosa version resolved the error, and the preprocessing stage ran normally.

Merakist commented 7 months ago

Thank you for the bug report! The above PR addresses the problem by specifying the librosa version to 0.9.1 to avoid version mismatch. Feel free to reopen this if you have any further issues!