You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm on python 3.13 and installed ChatTTS and its requirments.txt ... via the Pycharm packages repository (PIP)
Everything installed with no errors.
But when I run the main webpages basic example code ... in python.
import ChatTTS
import torch
import torchaudio
chat = ChatTTS.Chat()
chat.load(compile=False) # Set to True for better performance
texts = ["PUT YOUR 1st TEXT HERE", "PUT YOUR 2nd TEXT HERE"]
wavs = chat.infer(texts)
for i in range(len(wavs)):
"""
In some versions of torchaudio, the first line works but in other versions, so does the second line.
"""
try:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)
except:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]), 24000)
It returns the following error,
Traceback (most recent call last):
File "D:\GOOD\Coding\.Coding_Projects\Composite_media\Text to Speech\Audiobook_Maker\test3.py", line 8, in <module>
import ChatTTS
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\ChatTTS\__init__.py", line 1, in <module>
from .core import Chat
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\ChatTTS\core.py", line 17, in <module>
from .model import DVAE, Embed, GPT, gen_logits, Tokenizer, Speaker
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\ChatTTS\model\__init__.py", line 6, in <module>
from .tokenizer import Tokenizer
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\ChatTTS\model\tokenizer.py", line 16, in <module>
class Tokenizer:
...<121 lines>...
)
File "C:\Users\User\AppData\Local\Programs\Python\Python313\Lib\site-packages\ChatTTS\model\tokenizer.py", line 19, in Tokenizer
tokenizer_path: torch.serialization.FILE_LIKE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'torch.serialization' has no attribute 'FILE_LIKE'
The text was updated successfully, but these errors were encountered:
Hi,
I'm on python 3.13 and installed ChatTTS and its requirments.txt ... via the Pycharm packages repository (PIP)
Everything installed with no errors.
But when I run the main webpages basic example code ... in python.
It returns the following error,
The text was updated successfully, but these errors were encountered: