MeloTTS icon indicating copy to clipboard operation
MeloTTS copied to clipboard

even the newest macbookpro its not work

Open cantoneseslang opened this issue 11 months ago • 4 comments

Text split to sentences. The field of text-to-speech has seen rapid development recently.

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). Traceback (most recent call last): File "/Users/user/Library/Python/3.9/lib/python/site-packages/gradio/queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "/Users/user/Library/Python/3.9/lib/python/site-packages/gradio/route_utils.py", line 235, in call_process_api output = await app.get_blocks().process_api( File "/Users/user/Library/Python/3.9/lib/python/site-packages/gradio/blocks.py", line 1627, in process_api result = await self.call_function( File "/Users/user/Library/Python/3.9/lib/python/site-packages/gradio/blocks.py", line 1173, in call_function prediction = await anyio.to_thread.run_sync( File "/Users/user/Library/Python/3.9/lib/python/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/Users/user/Library/Python/3.9/lib/python/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread return await future File "/Users/user/Library/Python/3.9/lib/python/site-packages/anyio/_backends/_asyncio.py", line 851, in run result = context.run(func, *args) File "/Users/user/Library/Python/3.9/lib/python/site-packages/gradio/utils.py", line 690, in wrapper response = f(*args, **kwargs) File "/Users/user/Downloads/MeloTTS-main/melo/app.py", line 35, in synthesize models[language].tts_to_file(text, models[language].hps.data.spk2id[speaker], bio, speed=speed, pbar=progress.tqdm, format='wav') File "/Users/user/Downloads/MeloTTS-main/melo/api.py", line 107, in tts_to_file audio = self.model.infer( File "/Users/user/Downloads/MeloTTS-main/melo/models.py", line 998, in infer x, m_p, logs_p, x_mask = self.enc_p( File "/Users/user/Library/Python/3.9/lib/python/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/Users/user/Downloads/MeloTTS-main/melo/models.py", line 376, in forward x = self.encoder(x * x_mask, x_mask, g=g) File "/Users/user/Library/Python/3.9/lib/python/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/Users/user/Downloads/MeloTTS-main/melo/attentions.py", line 107, in forward y = self.attn_layers[i](x, x, attn_mask) File "/Users/user/Library/Python/3.9/lib/python/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/Users/user/Downloads/MeloTTS-main/melo/attentions.py", line 263, in forward x, self.attn = self.attention(q, k, v, mask=attn_mask) File "/Users/user/Downloads/MeloTTS-main/melo/attentions.py", line 280, in attention key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s) File "/Users/user/Downloads/MeloTTS-main/melo/attentions.py", line 344, in _get_relative_embeddings padded_relative_embeddings = F.pad( IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)

installed list: MyMacBookProM3Max MeloTTS-main % pip list Package Version


aiofiles 23.2.1 altair 5.2.0 altgraph 0.17.2 annotated-types 0.6.0 anyascii 0.3.2 anyio 4.3.0 attrs 23.2.0 audioread 3.0.1 Babel 2.14.0 boto3 1.34.50 botocore 1.34.50 cached_path 1.6.0 cachetools 5.3.3 certifi 2024.2.2 cffi 1.16.0 charset-normalizer 3.3.2 click 8.1.7 cn2an 0.5.22 colorama 0.4.6 contourpy 1.2.0 cycler 0.12.1 dateparser 1.1.8 decorator 5.1.1 Deprecated 1.2.14 Distance 0.1.3 docopt 0.6.2 easyocr 1.7.0 eng-to-ipa 0.0.2 exceptiongroup 1.2.0 fastapi 0.110.0 ffmpy 0.3.2 filelock 3.13.1 filterpy 1.4.5 fonttools 4.49.0 fsspec 2024.2.0 fugashi 1.3.0 future 0.18.2 g2p-en 2.1.0 g2pkk 0.1.2 google-api-core 2.17.1 google-auth 2.28.1 google-cloud-core 2.4.1 google-cloud-storage 2.14.0 google-crc32c 1.5.0 google-resumable-media 2.7.0 googleapis-common-protos 1.62.0 gradio 4.19.2 gradio_client 0.10.1 gruut 2.2.3 gruut-ipa 0.13.0 gruut-lang-de 2.0.0 gruut-lang-en 2.0.0 gruut-lang-es 2.0.0 gruut-lang-fr 2.0.2 h11 0.14.0 httpcore 1.0.4 httpx 0.27.0 huggingface-hub 0.20.3 idna 3.6 imageio 2.34.0 importlib-resources 6.1.1 inflect 7.0.0 jaconv 0.3.4 jamo 0.4.1 jieba 0.42.1 Jinja2 3.1.3 jmespath 1.0.1 joblib 1.3.2 jsonlines 1.2.0 jsonschema 4.21.1 jsonschema-specifications 2023.12.1 kiwisolver 1.4.5 langid 1.1.6 lazy_loader 0.3 librosa 0.9.1 llvmlite 0.42.0 macholib 1.15.2 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.8.3 mdurl 0.1.2 mecab-python3 1.0.5 melo 0.1.1 mpmath 1.3.0 networkx 2.8.8 ninja 1.11.1.1 nltk 3.8.1 num2words 0.5.12 numba 0.59.0 numpy 1.24.3 opencv-python 4.7.0.72 opencv-python-headless 4.9.0.80 orjson 3.9.15 packaging 23.2 pandas 2.0.2 pillow 10.2.0 pip 24.0 plac 1.4.3 platformdirs 4.2.0 pooch 1.8.1 proces 0.1.7 protobuf 4.25.3 psutil 5.9.8 pyasn1 0.5.1 pyasn1-modules 0.3.0 pyclipper 1.3.0.post5 pycparser 2.21 pydantic 2.6.2 pydantic_core 2.16.3 pydub 0.25.1 Pygments 2.17.2 pykakasi 2.2.1 pyparsing 3.1.1 pypinyin 0.50.0 python-bidi 0.4.2 python-crfsuite 0.9.10 python-dateutil 2.8.2 python-multipart 0.0.9 pytz 2024.1 PyYAML 6.0.1 referencing 0.33.0 regex 2023.12.25 requests 2.31.0 resampy 0.4.2 rich 13.7.0 rpds-py 0.18.0 rsa 4.9 ruff 0.2.2 s3transfer 0.10.0 scikit-image 0.22.0 scikit-learn 1.4.1.post1 scipy 1.10.1 seaborn 0.13.2 semantic-version 2.10.0 setuptools 69.1.1 shapely 2.0.3 shellingham 1.5.4 six 1.15.0 sniffio 1.3.1 soundfile 0.12.1 starlette 0.36.3 sympy 1.12 threadpoolctl 3.3.0 tifffile 2024.2.12 tokenizers 0.13.3 tomlkit 0.12.0 toolz 0.12.1 torch 1.13.1 torchaudio 0.13.1 torchvision 0.17.0 tqdm 4.66.2 transformers 4.27.4 txtsplit 1.0.0 typer 0.9.0 typing_extensions 4.9.0 tzdata 2024.1 tzlocal 5.2 ultralytics 8.0.114 Unidecode 1.3.7 unidic 1.1.0 unidic-lite 1.0.8 urllib3 1.26.18 uvicorn 0.27.1 wasabi 0.10.1 websockets 11.0.3 wheel 0.37.0 wrapt 1.16.0 zipp 3.17.0

Could not run and just error,how can I fix it? スクリーンショット 2024-02-27 16 06 30

cantoneseslang avatar Feb 27 '24 08:02 cantoneseslang

I have encountered the same issue.

MacBook Pro 2018_x86_Python 3.9.12

NiCaijia avatar Feb 27 '24 08:02 NiCaijia

https://github.com/myshell-ai/MeloTTS/blob/main/docs/install.md#windows-and-macos-install

Zengyi-Qin avatar Feb 28 '24 01:02 Zengyi-Qin

pip install -U torch==2.2.1 pip install -U torchaudio==2.2.1 pip install -U transformers==4.38.1

Ignore the following errors:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. melotts 0.1.1 requires torch<2.0, but you have torch 2.2.1 which is incompatible. melotts 0.1.1 requires transformers==4.27.4, but you have transformers 4.38.1 which is incompatible.

it's work.

longkeyy avatar Feb 29 '24 05:02 longkeyy

@longkeyy It work for me , M2 mac

Johnson-yue avatar Mar 18 '24 14:03 Johnson-yue