kan-bayashi / ParallelWaveGAN

Unofficial Parallel WaveGAN (+ MelGAN & Multi-band MelGAN & HiFi-GAN & StyleMelGAN) with Pytorch
https://kan-bayashi.github.io/ParallelWaveGAN/
MIT License
1.54k stars 339 forks source link

ImportError: cannot import name 'kaiser' from 'scipy.signal' #430

Open unilight opened 2 months ago

unilight commented 2 months ago

I encountered the following error:

  File "/data/group1/z44476r/Experiments/ppg-vc/tools/venv/lib/python3.10/site-packages/parallel_wavegan/layers/__init__.py", line 2, in <module>
    from .pqmf import *  # NOQA
  File "/data/group1/z44476r/Experiments/ppg-vc/tools/venv/lib/python3.10/site-packages/parallel_wavegan/layers/pqmf.py", line 11, in <module>
    from scipy.signal import kaiser
ImportError: cannot import name 'kaiser' from 'scipy.signal' (/data/group1/z44476r/Experiments/ppg-vc/tools/venv/lib/python3.10/site-packages/scipy/signal/__init__.py)

The problem comes from this line: https://github.com/kan-bayashi/ParallelWaveGAN/blob/master/parallel_wavegan/layers/pqmf.py#L11 I am not sure when scipy changed it, but it should be from scipy.signal.windows import kaiser. (tested on scipy version 1.14.0)

spencerchubb commented 2 months ago

I also ran into this

I looked through the scipy history, and it looks like they made the change from 1.0.0 to 1.0.1

For now I am working around this by directly change the code of parallel_wavegan