Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Error from Scipy Library 'kaiser' and asserting sampling_rate of audio wrongly #434

Open
004Ajay opened this issue Oct 22, 2024 · 0 comments

Comments

@004Ajay
Copy link

004Ajay commented Oct 22, 2024

I was correcting some errors for another person, and I'm just a casual coder, not an expert. So pardon if I say something foolish.

I installed the package using pip install parallel-wavegan

Scipy Kaiser Import Error

Error:
ImportError: cannot import name 'kaiser' from 'scipy.signal'

From the file:
.../python3.10/site-packages/parallel_wavegan/layers/pqmf.py

  • I tried correcting your code locally, see the err-making code here, Line 11(import statement) and 45(function call)
  • Used the Scipy(1.14.1 stable) documentations see here and found three functions for kaiser: kaiser_atten(), kaiser_beta() and kaiserord()
  • I changed and saved the function name as kaiser_atten() and kaiserord(), and worked out to get the two outputs for both the functions.
  • Since I am not an expert in this, I wasn't able to differentiate the generated outputs of kaiser_atten() and kaiserord()

Sampling_rate Error

Error:
fs == config["sampling_rate"]
'audio.wav' seems to have a different sampling rate.

From the file:
.../python3.10/site-packages/parallel_wavegan/bin/preprocess.py

  • I think the error is in checking (fs == config["sampling_rate"])
  • So I changed == to != that is (fs != config["sampling_rate"])
  • See the err-making code here

Ending Notes:

  • I used these steps to run your code (from your main README)
  • Even though these small steps have avoided the error block for me. I would like the maintainer to check if these changes are valid and align with your logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant