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

ModuleNotFoundError: No module named 'hubert' #35

Open
tralala87 opened this issue Jun 14, 2023 · 14 comments
Open

ModuleNotFoundError: No module named 'hubert' #35

tralala87 opened this issue Jun 14, 2023 · 14 comments

Comments

@tralala87
Copy link

When trying to run 'clone_voice.ipynb', I get:

ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from hubert.hubert_manager import HuBERTManager
2 hubert_manager = HuBERTManager()
3 hubert_manager.make_sure_hubert_installed()
4 hubert_manager.make_sure_tokenizer_installed()

ModuleNotFoundError: No module named 'hubert'

@dagshub
Copy link

dagshub bot commented Jun 14, 2023

@RealUnrealGameDev
Copy link

Hey Im still getting this error any way to fix??

@randywreed
Copy link

You have to install the hubert manager. Do the following:

git clone https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer/  
cd bark-voice-cloning-HuBERT-quantizer
pip install -r requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117   

It should now run (This works for me in a colab notebook, I have not tested it from a cli, YMMV)

@tralala87
Copy link
Author

Now I get this error:
ModuleNotFoundError: No module named 'bark.generation'

@tralala87 tralala87 reopened this Jun 22, 2023
@RahulBhalley
Copy link

Oh, it's simple!

git clone https://github.com/serp-ai/bark-with-voice-clone
cd bark-with-voice-clone/
pip install git+https://github.com/suno-ai/bark.git

Now 'hubert' module will be available. :)

@vvonchain
Copy link

still getting no module named hubert

@BrasD99
Copy link

BrasD99 commented Jul 22, 2023

still getting no module named hubert

@vvonchain, seems like they changed name of folder. Look at https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer/tree/master/bark_hubert_quantizer
So simply change hubert to bark_hubert_quantizer

Take a look at my pull request: #51

And here is my notebook in google colab: https://colab.research.google.com/drive/1fW6-RfcIX4wZ0T5Fc0B-M_3a459L3qaW?usp=sharing

@PSY222
Copy link

PSY222 commented Jul 30, 2023

from bark_hubert_quantizer.hubert_manager import HuBERTManager
As @BrasD99 mentioned, directory is renamed. This simple line solved my issue. Likewise, just replace all of 'hubert' to 'bark_hubert_quantizer!

@souvikqb
Copy link

still getting no module named hubert

@vvonchain, seems like they changed name of folder. Look at https://github.com/gitmylo/bark-voice-cloning-HuBERT-quantizer/tree/master/bark_hubert_quantizer So simply change hubert to bark_hubert_quantizer

Take a look at my pull request: #51

And here is my notebook in google colab: https://colab.research.google.com/drive/1fW6-RfcIX4wZ0T5Fc0B-M_3a459L3qaW?usp=sharing

Hi, I was trying to Clone an audio file using this Notebook, but the process seems to be very slow for some reason.
I am using NVIDIA 4090 with 24GB vRAM

@BrasD99
Copy link

BrasD99 commented Aug 11, 2023

Hi, I was trying to Clone an audio file using this Notebook, but the process seems to be very slow for some reason. I am using NVIDIA 4090 with 24GB vRAM

@souvikqb Hi, I'm not a contributor to this repository. But it takes a long time for me too.
You are using a gpu, so I think you need to load the appropriate models for it, so change this flags:

preload_models(
    text_use_gpu=False, # -> To True
    text_use_small=False,
    coarse_use_gpu=False, # -> To True
    coarse_use_small=False,
    fine_use_gpu=False, # -> To True
    fine_use_small=False,
    codec_use_gpu=False, # -> To True
    force_reload=False
)

@souvikqb
Copy link

Hi, I was trying to Clone an audio file using this Notebook, but the process seems to be very slow for some reason. I am using NVIDIA 4090 with 24GB vRAM

@souvikqb Hi, I'm not a contributor to this repository. But it takes a long time for me too. You are using a gpu, so I think you need to load the appropriate models for it, so change this flags:

preload_models(
    text_use_gpu=False, # -> To True
    text_use_small=False,
    coarse_use_gpu=False, # -> To True
    coarse_use_small=False,
    fine_use_gpu=False, # -> To True
    fine_use_small=False,
    codec_use_gpu=False, # -> To True
    force_reload=False
)

Thank you so much, that solved it.

I was wondering if there was a way to increase the output quality somehow. ?

Currently, the cloning works, but is there any way to make it better or any parameters to play with?

@BrasD99
Copy link

BrasD99 commented Aug 11, 2023

Currently, the cloning works, but is there any way to make it better or any parameters to play with?

I can't help here because I've run into problems myself. Сan't even get any satisfactory results. I can’t clone the Russian voice at all, the output is random English speech. And no one answers my issue ;(
But I'm glad you got the preliminary results!

UPD: i fixed my notebook.

@thedarkknight197
Copy link

Hi, I was trying to Clone an audio file using this Notebook, but the process seems to be very slow for some reason. I am using NVIDIA 4090 with 24GB vRAM

@souvikqb Hi, I'm not a contributor to this repository. But it takes a long time for me too. You are using a gpu, so I think you need to load the appropriate models for it, so change this flags:

preload_models(
    text_use_gpu=False, # -> To True
    text_use_small=False,
    coarse_use_gpu=False, # -> To True
    coarse_use_small=False,
    fine_use_gpu=False, # -> To True
    fine_use_small=False,
    codec_use_gpu=False, # -> To True
    force_reload=False
)

Thank you so much, that solved it.

I was wondering if there was a way to increase the output quality somehow. ?

Currently, the cloning works, but is there any way to make it better or any parameters to play with?

But how can i load my new voice created with my specific voice name?

@gustrd
Copy link

gustrd commented Nov 13, 2023

Hi, I was trying to Clone an audio file using this Notebook, but the process seems to be very slow for some reason. I am using NVIDIA 4090 with 24GB vRAM

@souvikqb Hi, I'm not a contributor to this repository. But it takes a long time for me too. You are using a gpu, so I think you need to load the appropriate models for it, so change this flags:

preload_models(
    text_use_gpu=False, # -> To True
    text_use_small=False,
    coarse_use_gpu=False, # -> To True
    coarse_use_small=False,
    fine_use_gpu=False, # -> To True
    fine_use_small=False,
    codec_use_gpu=False, # -> To True
    force_reload=False
)

Thank you so much, that solved it.
I was wondering if there was a way to increase the output quality somehow. ?
Currently, the cloning works, but is there any way to make it better or any parameters to play with?

But how can i load my new voice created with my specific voice name?

You need to use a .npz file to save the cloned voice and then load it at the library aftwerwards.

You can find more info here: suno-ai#379

dgodevais added a commit to dgodevais/bark-with-voice-clone that referenced this issue May 13, 2024
Addressing the following open issue: serp-ai#35
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

10 participants