fairseq icon indicating copy to clipboard operation
fairseq copied to clipboard

"Incompatibility with Librosa 0.10.1 due to missing 'size' keyword in util.pad_center" in GSLM TTS code

Open maureendss opened this issue 2 years ago • 0 comments

🐛 Bug

Description: The latest versions of Librosa (tested with 0.10.1) have introduced a required "size" keyword for the second argument of the util.pad_center function. This change causes an error when trying to run fairseq/examples/textless_nlp/gslm/unit2speech/synthesize_audio_from_units.py.

Affected Files:

  1. fairseq/examples/textless_nlp/gslm/unit2speech/tacotron2/stft.py
    • Line 67: fft_window = pad_center(fft_window, filter_length)
  2. fairseq/examples/textless_nlp/gslm/unit2speech/tacotron2/audio_processing.py
    • Line 50: win_sq = librosa_util.pad_center(win_sq, n_fft)

Proposed Solution: Add the "size" keyword argument to the pad_center() function calls in the aforementioned files.

  1. fairseq/examples/textless_nlp/gslm/unit2speech/tacotron2/stft.py
    • Line 67: fft_window = pad_center(fft_window, size = filter_length)
  2. fairseq/examples/textless_nlp/gslm/unit2speech/tacotron2/audio_processing.py
    • Line 50: win_sq = librosa_util.pad_center(win_sq, size=n_fft)

maureendss avatar Sep 26 '23 11:09 maureendss