2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
Other
27.21k stars 2.96k forks source link

demo code running error #68

Open ghost opened 1 month ago

ghost commented 1 month ago

execute code error code is :

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`

yestolife commented 1 month ago

+1

zhijianglee commented 1 month ago

same

yestolife commented 1 month ago

已解决,参考

zhchx601 commented 1 month ago

same question, do not use pip install, use clone instead.