运行样例时报错,所用代码如下:
import ChatTTS
from IPython.display import Audio
chat = ChatTTS.Chat()
chat.load_models()
texts = ["PUT YOUR TEXT HERE",]
wavs = chat.infer(texts, use_decoder=True)
Audio(wavs[0], rate=24_000, autoplay=True)
运行结果如下: runfile('C:/Users/user/untitled0.py', wdir='C:/Users/user') WARNING:ChatTTS.utils.gpu_utils:No GPU found, use CPU instead INFO:ChatTTS.core:use cpu 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 ~\mambaforge\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File c:\users\user\untitled0.py:16 wavs = chat.infer(texts, use_decoder=True)
File ~\mambaforge\lib\site-packages\ChatTTS\core.py:95 in infer assert self.check_model(use_decoder=use_decoder)
AssertionError