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 #59

Open
Sinicyn78 opened this issue Oct 31, 2023 · 1 comment
Open

Numpy error #59

Sinicyn78 opened this issue Oct 31, 2023 · 1 comment

Comments

@Sinicyn78
Copy link

(Voicefixer) C:\Temp\voicefixer>voicefixer --help
Traceback (most recent call last):
File "", line 189, in run_module_as_main
File "", line 148, in get_module_details
File "", line 112, in get_module_details
File "C:\Temp\voicefixer\voicefixer_init
.py", line 13, in
from voicefixer.vocoder.base import Vocoder
File "C:\Temp\voicefixer\voicefixer\vocoder\base.py", line 2, in
from voicefixer.tools.wav import read_wave, save_wave
File "C:\Temp\voicefixer\voicefixer\tools\wav.py", line 6, in
import librosa
File "C:\Temp\voicefixer\venv\Lib\site-packages\librosa_init
.py", line 211, in
from . import core
File "C:\Temp\voicefixer\venv\Lib\site-packages\librosa\core_init.py", line 9, in
from .constantq import * # pylint: disable=wildcard-import
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Temp\voicefixer\venv\Lib\site-packages\librosa\core\constantq.py", line 1059, in
dtype=np.complex,
^^^^^^^^^^
File "C:\Temp\voicefixer\venv\Lib\site-packages\numpy_init_.py", line 338, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'complex'.
np.complex was a deprecated alias for the builtin complex. To avoid this error in existing code, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'complex_'?

@andrew-r-marchand
Copy link

andrew-r-marchand commented Nov 10, 2023

A part solution is here.

Following the installation directions (modified for conda env), I got this same error as Sinicyn78, running on Python 3.9.

        1. conda create --name python-voicefixer  python=3.9
        2. conda activate python-voicefixer
        3. pip install voicefixer==0.1.2
        4. conda install git
        5. git clone https://github.com/haoheliu/voicefixer.git
        6. cd voicefixer
        7. python test/test.py # test script

However, after altering the librosa files following the directions in the issue below (issue 48), I can now use VoiceFixer in modes 0 and 2 (not 1) without issue, which works for my project. Another person on that thread looks like they got to the same place by installing a previous version of librosa, but I can't speak to that.

#48 (comment)

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

2 participants