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

Numpy error no attribute complex #48

Open
jurassicjordan opened this issue Jul 8, 2023 · 4 comments
Open

Numpy error no attribute complex #48

jurassicjordan opened this issue Jul 8, 2023 · 4 comments

Comments

@jurassicjordan
Copy link

File "/home/jordancruz/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/jordancruz/Tools/voicefixer/test/streamlit.py", line 4, in
import librosa
File "/home/jordancruz/.local/lib/python3.11/site-packages/librosa/init.py", line 211, in
from . import core
File "/home/jordancruz/.local/lib/python3.11/site-packages/librosa/core/init.py", line 9, in
from .constantq import * # pylint: disable=wildcard-import
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jordancruz/.local/lib/python3.11/site-packages/librosa/core/constantq.py", line 1059, in
dtype=np.complex,
^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/numpy/init.py", line 305, in getattr
raise AttributeError(former_attrs[attr])

@enterv0id
Copy link

enterv0id commented Jul 15, 2023

same problem

edit:

Fixed by editing constantq.py in librosa/core, changing
dtype=np.complex to dtype=complex

@towc
Copy link

towc commented Jul 24, 2023

for a reproducible setup, when using voicecoder programmatically, you can also np.complex = complex before you run voicefixer. Not great, but it is a solution

@Connum
Copy link

Connum commented Aug 6, 2023

To make this work with --mode all (or 1), I had to replace np.float with float as well , also in librosa\util\utils.py.

@GUUser91
Copy link

GUUser91 commented Oct 25, 2023

I was able to use voicefixer and mode 0 and 2 (But not mode 1 and mode all though) no problem by installing librosa version 0.9.2
pip install librosa==0.9.2

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

5 participants