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

AttributeError: module 'umap' has no attribute 'UMAP' on macOS Big Sur #1273

Open
mm3509 opened this issue Nov 19, 2023 · 2 comments
Open

AttributeError: module 'umap' has no attribute 'UMAP' on macOS Big Sur #1273

mm3509 opened this issue Nov 19, 2023 · 2 comments

Comments

@mm3509
Copy link

mm3509 commented Nov 19, 2023

I tried a clean installation of the repo on macOS with Python3.8:

brew install python@3.8
mkdir venv
python3.8 -m venv ./venv
source venv/bin/activate 
python3 -m pip install --upgrade pip
# packages missing from requirements.txt
python3 -m pip install torch torchvision torchaudio unidecode librosa inflect sounddevice umap PyQt5
python3 -m pip install -r requirements.txt
#python3 demo_cli.py
python3 demo_toolbox.py

I upload 4 utterances (30-45s long), and after the last one, I get this error:

Traceback (most recent call last):
  File "~/Real-Time-Voice-Cloning/toolbox/__init__.py", line 114, in <lambda>
    func = lambda: self.synthesize() or self.vocode()
  File "~/Real-Time-Voice-Cloning/toolbox/__init__.py", line 311, in vocode
    self.ui.draw_umap_projections(self.utterances)
  File "~/Real-Time-Voice-Cloning/toolbox/ui.py", line 118, in draw_umap_projections
    reducer = umap.UMAP(int(np.ceil(np.sqrt(len(embeds)))), metric="cosine")
AttributeError: module 'umap' has no attribute 'UMAP'

I try to generate speech, but the result is completely garbled and I get another of the errors above.

I try the CLI with python3 demo_cli.py and all tests pass. I pass a single voice file to clone a voice and I get no speech either; instead, it sounds like the recording of someone running.

I use Python 3.8 because I am sure that the program installs and runs on that version. I tried Python 3.12 and get this error:

python3 -m pip install torch torchvision torchaudio unidecode librosa inflect sounddevice umap PyQt5
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)

Since this is a clean install in a new environment, I'm not sure what I'm doing wrong, so I submit an issue.

@sachadee
Copy link

You need to install umap-learn not umap:

pip uninstall umap
pip install umap-learn

@mm3509
Copy link
Author

mm3509 commented Jul 25, 2024

Thank you. I will try that next time I test vocal cloning.

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