Stuck in installing a voicecloner via Python (module not found)

I’m stuck with installing a Voice Cloner (for personal use to do a funny trick for X-mas with my family) Its this tool that i’m trying to install: GitHub - CorentinJ/Real-Time-Voice-Cloning: Clone a voice in 5 seconds to generate arbitrary speech in real-time

With a little help of chatGTP I came quite far but for some reason the downloaded datasets cant be found. Instructions of the tool state:

Install intructions form Github So my tree looks like this:

(base) willem@willems-air Voice cloner % tree
├── saved_models
│   └── default
│       ├──
│       ├──
│       └──

3 directories, 11 files

However, when I give the command to execute the demo, I get the message that a needed module cant be found:

(base) willem@willems-air Voice cloner % python
Traceback (most recent call last):
  File "/Users/willem/Desktop/Voice cloner/", line 10, in <module>
    from encoder import inference as encoder
ModuleNotFoundError: No module named 'encoder'

I build a tree that (for me) looks inline with the installation instructions…(And of course i downloaded the modules without any errors) Here also the first lines of the command where you also see the path:

import argparse
import os
from pathlib import Path

import librosa
import numpy as np
import soundfile as sf
import torch

from encoder import inference as encoder
from encoder.params_model import model_embedding_size as speaker_embedding_size
from synthesizer.inference import Synthesizer
from utils.argutils import print_args
from utils.default_models import ensure_default_models
from vocoder import inference as vocoder

if __name__ == '__main__':
    parser = argparse.ArgumentParser(
    parser.add_argument("-e", "--enc_model_fpath", type=Path,

I think i missed out a quite basic step here, but this far ChatGTP is looping and cant help any more, so I need a human tip i guess :wink:

Hi Willem, welcome to the forum.

To be clear: you are trying to use an existing program, that was written by someone else in Python, and you were trying to get ChatGPT’s help to install it? That is, you are not trying to get ChatGPT’s help to write a new program?

That’s encouraging, because ChatGPT cannot really write programs, but a lot of people falsely believe it can. But it’s also a little confusing. There’s not a lot we can do to help - yet - because we can’t see what you’ve actually done so far (only what files you have and where). Also, the focus here is generally on helping people to write new code, not on installing things. However, it should be possible to talk through the problem.

I’d like to be able to tell you to just start over, and show how to do it properly. What you have so far is probably not helpful. However, starting over properly requires cleaning up first, and I can’t tell you how to clean up unless I understand exactly the current situation (e.g., if you did anything else that could have changed something outside this folder).


Did you start by trying to follow the instructions given in the README on the GitHub page? If so, exactly where did you get stuck, and how did you try to get ChatGPT to help you with that? Or, did you ask ChatGPT to guide you through the installation from the start?

I’m confused because you have a link to an image that is labelled “Install instructions from GitHub”, but I don’t see anything like that on the page, and it looks instead like something that ChatGPT would have told you.

I’m also confused because the tree that you show is missing a lot of what should be there, according to the listing on that GitHub page.

Exactly how did you do this? For example, did you try to select each individual file and put them in the right places? That will definitely not work. The page shows that there are a bunch of folders with more code, and all of that needs to be copied. You are not supposed to do this manually. Instead, normally we use Git to “clone” the repository from GitHub. Otherwise, you can try downloading and extracting the ZIP file that is offered in the Code menu (click the green “Code” button, and select “Download ZIP” from the menu that appears).

1 Like