myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
3.97k stars 473 forks source link

MeloTTS requirements #146

Open dafogary opened 3 weeks ago

dafogary commented 3 weeks ago

Hi,

A few weeks ago I tried to run MeloTTS with a custom voice, but I was getting an error message saying that a NVIDIA GPU was required for my hardware. When I tried to run the localhost:8888, I tried to do a test with a random voice, but my machine crashed, I am thinking that the processing power or RAM may not be what is required.

Hence, I was wondering if there is a list of hardware requirements?

When I tried to run it, I was away on business, now I have got home I was planning on testing it on a desktop machine.

My desktop is running on Ubuntu 22.04 and has a Radeon graphics card at the moment.

I do have Docker on this machine, I am wondering if I use the Docker build would this negate the need for changing hardware. Unfortunately, I don't have the machine I tested it on, I stupidly left it in the office I was working at, which is nearly 800km away, hence I can't share the exact error I got.

Any help and guidance would be appreciated.

Gary

RedBluePrinter commented 2 weeks ago

More information about your System would be neccesary for a appropriate answer. Like for Example: VRAM

And a Nvidia Card is required for GPU inference. If you don't have a Nvidia GPU try this:

tts_device = 'cpu'
model_tts = TTS(language='EN', device=tts_device)
RedBluePrinter commented 2 weeks ago

And you should have a way to get the Error. There is a lot of things that could go wrong with Neural Network Inference. Try Searching for "Python remote error reporting" on Google

dafogary commented 1 week ago

I do have a NVIDIA GPU on it's way, but I would be interested in if this is possible for when I am on the road, but, then, I guess I could create the trained json and load it onto my laptop

When running:

python3 preprocess_text.py --metadata data/Meta.list

I get the error

/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (4.0.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
  0%|                                                     | 0/1 [00:00<?, ?it/s]Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
err! /home/user/Documents/Melo/MeloTestSamplewav.wav |Melo|EN|And there's a growing interest in looser, more relaxed shapes and unconventional materials and finishes.
 Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx

I have now run

pip3 install numpy==1.25.0 pip3 install urllib3 pip3 install chardet

Which in turn throws:

/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (4.0.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.25.0
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
  0%|                                                                                         | 0/1 [00:00<?, ?it/s]Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.bias', 'cls.seq_relationship.weight']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
err! /home/USER/Documents/Melo/MeloTestSamplewav.wav |MeloTest|EN|And there's a growing interest in looser, more relaxed shapes and unconventional materials and finishes.
 Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
100%|█████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00,  2.83s/it]

Any help is appreciated

dafogary commented 1 week ago

After looking at those errors, I have now uninstalled numpy 1.25.0 in favor of 1.24.4

I still get the urllib3 and chardet errors:

/usr/lib/python3/dist-packages/requests/__init__.py:87: RequestsDependencyWarning: urllib3 (2.2.1) or chardet (4.0.0) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
  0%|                                                                                         | 0/1 [00:00<?, ?it/s]Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.bias', 'cls.seq_relationship.weight']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
err! /home/USER/Documents/Melo/MeloTestSamplewav.wav |Melo|EN|And there's a growing interest in looser, more relaxed shapes and unconventional materials and finishes.
 Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
100%|█████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00,  2.66s/it]