import torch
import ChatTTS
from IPython.display import Audio
# Initialize ChatTTS
chat = ChatTTS.Chat()
chat.load_models()
# Define the text to be converted to speech
texts = ["Hello, welcome to ChatTTS!",]
# Generate speech
wavs = chat.infer(texts, use_decoder=True)
# Play the generated audio
Audio(wavs[0], rate=24_000, autoplay=True)
error is:
Details
INFO:ChatTTS.core:use cuda:0
WARNING:ChatTTS.core:vocos not initialized.
WARNING:ChatTTS.core:gpt not initialized.
WARNING:ChatTTS.core:tokenizer not initialized.
WARNING:ChatTTS.core:dvae not initialized.
WARNING:ChatTTS.core:vocos not initialized.
WARNING:ChatTTS.core:gpt not initialized.
WARNING:ChatTTS.core:tokenizer not initialized.
WARNING:ChatTTS.core:decoder not initialized.
Traceback (most recent call last):
File "/home/jiemar/code/ChatTTS/../chatTTS.py", line 13, in
wavs = chat.infer(texts, use_decoder=True)
File "/home/jiemar/.local/lib/python3.10/site-packages/ChatTTS/core.py", line 95, in infer
assert self.check_model(use_decoder=use_decoder)
AssertionError`
execute code error code is :
error is:
Details
INFO:ChatTTS.core:use cuda:0 WARNING:ChatTTS.core:vocos not initialized. WARNING:ChatTTS.core:gpt not initialized. WARNING:ChatTTS.core:tokenizer not initialized. WARNING:ChatTTS.core:dvae not initialized. WARNING:ChatTTS.core:vocos not initialized. WARNING:ChatTTS.core:gpt not initialized. WARNING:ChatTTS.core:tokenizer not initialized. WARNING:ChatTTS.core:decoder not initialized. Traceback (most recent call last): File "/home/jiemar/code/ChatTTS/../chatTTS.py", line 13, in
wavs = chat.infer(texts, use_decoder=True)
File "/home/jiemar/.local/lib/python3.10/site-packages/ChatTTS/core.py", line 95, in infer
assert self.check_model(use_decoder=use_decoder)
AssertionError`