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

error while running #39

Open
danialhedaiat opened this issue Jun 16, 2024 · 0 comments
Open

error while running #39

danialhedaiat opened this issue Jun 16, 2024 · 0 comments

Comments

@danialhedaiat
Copy link

hi i got this error when i run your tutorial code

Traceback (most recent call last):
  File "D:\workspace\AIs\MyTTS.py", line 34, in <module>
    tts.tts_to_file(".زندگی فقط یک بار است؛ از آن به خوبی استفاده کن",file_path='output.wav')
  File "D:\workspace\AIs\venv\Lib\site-packages\TTS\api.py", line 332, in tts_to_file
    self._check_arguments(speaker=speaker, language=language, speaker_wav=speaker_wav, **kwargs)
  File "D:\workspace\AIs\venv\Lib\site-packages\TTS\api.py", line 228, in _check_arguments
    if self.is_multi_lingual and language is None:
       ^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\AIs\venv\Lib\site-packages\torch\nn\modules\module.py", line 1709, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'TTS' object has no attribute 'is_multi_lingual'

Process finished with exit code 1

and this is the code

from TTS.api import TTS
tts=TTS(model_path="https://huggingface.co/Kamtera/persian-tts-male1-vits/resolve/main/checkpoint_88000.pth",
        config_path="https://huggingface.co/Kamtera/persian-tts-male1-vits/resolve/main/config.json")
tts.tts_to_file(".زندگی فقط یک بار است؛ از آن به خوبی استفاده کن",file_path='output.wav') 

i also got same error when i download a model , that you pretrained and run it with this code

import torch
from TTS.api import TTS

device = "cuda" if torch.cuda.is_available() else "cpu"

# Initialize the TTS model
tts = TTS(
    model_path="persian-tts-male1-vits_checkpoint_88000.pth",  # Use custom model
    config_path="persian-tts-male1-vits_config.json"
).to(device)

text = "سلام به همه حالتون چطوره سلاطین"

tts.tts_to_file(text=text, language="fa", file_path="output.wav")

and this is the error

Traceback (most recent call last):
  File "D:\workspace\AIs\MyTTS.py", line 18, in <module>
    tts.tts_to_file(text=text, language="fa", file_path="output.wav")
  File "D:\workspace\AIs\venv\Lib\site-packages\TTS\api.py", line 332, in tts_to_file
    self._check_arguments(speaker=speaker, language=language, speaker_wav=speaker_wav, **kwargs)
  File "D:\workspace\AIs\venv\Lib\site-packages\TTS\api.py", line 228, in _check_arguments
    if self.is_multi_lingual and language is None:
       ^^^^^^^^^^^^^^^^^^^^^
  File "D:\workspace\AIs\venv\Lib\site-packages\torch\nn\modules\module.py", line 1709, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'TTS' object has no attribute 'is_multi_lingual'

Process finished with exit code 1

can any one help me ?

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

1 participant