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 'melo.api' #365

Open
quantum304 opened this issue Feb 23, 2025 · 2 comments
Open

ModuleNotFoundError: No module named 'melo.api' #365

quantum304 opened this issue Feb 23, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@quantum304
Copy link

Hi,
I'm encoutering this error when I try to execute the demo_part3.ipynb
I'm using VS Code under windows 10

`---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[8], line 1
----> 1 from melo.api import TTS
3 texts = {
4 'EN_NEWEST': "Did you ever hear a folk tale about a giant turtle?", # The newest English base speaker model
5 'EN': "Did you ever hear a folk tale about a giant turtle?",
(...)
10 'KR': "안녕하세요! 오늘은 날씨가 정말 좋네요.",
11 }
14 src_path = f'{output_dir}/tmp.wav'

ModuleNotFoundError: No module named 'melo.api'
---------------------------------------------------------------------------`

I have tried
pip install git+https://github.com/myshell-ai/MeloTTS.git
and
python -m unidic download

then I checked with
(.venv) PS C:\Users\yacine\Desktop\OpenVoice> pip list | findstr melo

the answer was
melo 1.1.0
melotts 0.1.2

but I still have the same error

Any idea ?

Copy link

dosubot bot commented Feb 23, 2025

Hey @quantum304! 👋 I'm here to help you with any bugs, questions, or becoming a contributor. Let's squash those bugs together!

The error you're encountering suggests that the melo.api module is not being recognized, even though the package seems to be installed. Here are a few steps you can take to troubleshoot this issue:

  1. Verify Directory Structure: Ensure that the melo directory contains the api module. The correct structure should have the api module inside the melo directory, as indicated by the import statement from melo.api import TTS [1].

  2. Check Python Path: Make sure that the directory containing the melo package is included in your Python path. You can do this by printing sys.path in your script and verifying that the path to the melo package is listed.

  3. Virtual Environment: Double-check that you are using the correct virtual environment where MeloTTS is installed. You can activate the environment and run pip list to confirm that melo and melotts are installed in the active environment.

  4. Reinstall the Package: Sometimes, reinstalling the package can resolve path issues. You can try uninstalling and then reinstalling the package:

    pip uninstall melo melotts
    pip install git+https://github.com/myshell-ai/MeloTTS.git
  5. Check for Additional Setup: Review any additional setup steps or dependencies that might be required for the MeloTTS package. Although I couldn't find specific instructions in the repository, it's worth checking any README or installation guides provided with the package.

By following these steps, you should be able to resolve the ModuleNotFoundError for the melo.api module.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the bug Something isn't working label Feb 23, 2025
@quantum304
Copy link
Author

quantum304 commented Feb 23, 2025

@dosu
I have followed the instructions but still the same message.
Here is the content of the melo directory : no api module there except if you mean api.py file ?

Mode LastWriteTime Length Name


d----- 21/02/2025 21:52 configs
d----- 21/02/2025 21:52 data
d----- 22/02/2025 16:01 monotonic_align
d----- 22/02/2025 16:01 text
d----- 22/02/2025 16:01 pycache
-a---- 21/02/2025 21:52 5243 api.py
-a---- 21/02/2025 21:52 3228 app.py
-a---- 21/02/2025 21:52 16395 attentions.py
-a---- 21/02/2025 21:52 5116 commons.py
-a---- 21/02/2025 21:52 15242 data_utils.py
-a---- 21/02/2025 21:52 3507 download_utils.py
-a---- 21/02/2025 21:52 1023 infer.py
-a---- 21/02/2025 21:52 406 init_downloads.py
-a---- 21/02/2025 21:52 1444 losses.py
-a---- 21/02/2025 21:52 1886 main.py
-a---- 21/02/2025 21:52 6042 mel_processing.py
-a---- 21/02/2025 21:52 35057 models.py
-a---- 21/02/2025 21:52 19573 modules.py
-a---- 21/02/2025 21:52 4558 preprocess_text.py
-a---- 21/02/2025 21:52 6951 split_utils.py
-a---- 21/02/2025 21:52 23136 train.py
-a---- 21/02/2025 21:52 409 train.sh
-a---- 21/02/2025 21:52 7462 transforms.py
-a---- 21/02/2025 21:52 13647 utils.py
-a---- 21/02/2025 21:52 0 init.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant