如题 clone项目,在项目下新建py文件,粘贴代码,下载需要的包,修改路径,执行 `import ChatTTS import soundfile as sf
chat = ChatTTS.Chat() chat.load_models() texts = ["你好",] wavs = chat.infer(texts, use_decoder=True) sf.write(r"D:\Desktop\chattts.wav", wavs[0][0], 24000)`
如题 clone项目,在项目下新建py文件,粘贴代码,下载需要的包,修改路径,执行 `import ChatTTS import soundfile as sf
chat = ChatTTS.Chat() chat.load_models() texts = ["你好",] wavs = chat.infer(texts, use_decoder=True) sf.write(r"D:\Desktop\chattts.wav", wavs[0][0], 24000)`
import ChatTTS 这里ChatTTS是如何安装的?
import ChatTTS 这里ChatTTS是如何安装的?
不需要安装, 代码目录下面import
如果不需要安装 就一直显示错误: import ChatTTS ModuleNotFoundError: No module named 'ChatTTS'
然后就不能用了,试着下载旧版本pytorch,搞不定。 翻来覆去都在这个ChatTTS module 上,请教大家,谢谢
对于还没有安装成功或使用成功的用户,这个WebUI可以大大帮助您。请大家尝试一下,并告诉我您的反馈。您的意见对改进这个工具、让它变得更加用户友好非常重要。
谢谢
一路安装都是正常的,没有任何错误提示。文档写的很详细,步骤很清晰,就是最后一步webui 跳不出来, 显示错误如下:
( macOS 操作系统,M3 芯片)
(chattts_webui) yidian@ai ChatTTS-WebUI % python webui/main.py
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling transformers.utils.move_cache()
.
0it [00:00, ?it/s]
Load models from snapshot.
INFO:ChatTTS.core:Load from cache: /Users/yidian/.cache/huggingface/hub/models--2Noise--ChatTTS/snapshots/c0aa9139945a4d7bb1c84f07785db576f2bb1bfa
Traceback (most recent call last):
File "/Users/yidian/PycharmProjects/pythonProject3/ChatTTS-WebUI/webui/main.py", line 39, in
import sys
sys.path.append('E:/item/python/Complicate_your_life/ChatTTS-main/ChatTTS-main/')
import ChatTTS #已经安装了
一路安装都是正常的,没有任何错误提示。文档写的很详细,步骤很清晰,就是最后一步webui 跳不出来, 显示错误如下:
( macOS 操作系统,M3 芯片)
(chattts_webui) yidian@ai ChatTTS-WebUI % python webui/main.py The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling
transformers.utils.move_cache()
. 0it [00:00, ?it/s] Load models from snapshot. INFO:ChatTTS.core:Load from cache: /Users/yidian/.cache/huggingface/hub/models--2Noise--ChatTTS/snapshots/c0aa9139945a4d7bb1c84f07785db576f2bb1bfa Traceback (most recent call last): File "/Users/yidian/PycharmProjects/pythonProject3/ChatTTS-WebUI/webui/main.py", line 39, in chat.load_models() File "/Users/yidian/PycharmProjects/pythonProject3/ChatTTS-WebUI/ChatTTS/ChatTTS/core.py", line 55, in load_models self._load(**{k: os.path.join(download_path, v) for k, v in OmegaConf.load(os.path.join(download_path, 'config', 'path.yaml')).items()}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/envs/chatttswebui/lib/python3.12/site-packages/omegaconf/omegaconf.py", line 189, in load with io.open(os.path.abspath(file), "r", encoding="utf-8") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/Users/yidian/.cache/huggingface/hub/models--2Noise--ChatTTS/snapshots/c0aa9139945a4d7bb1c84f07785db576f2bb1bfa/config/path.yaml' (chattts_webui) yidian@ai ChatTTS-WebUI %
How did you solve it?
一路安装都是正常的,没有任何错误提示。文档写的很详细,步骤很清晰,就是最后一步webui 跳不出来, 显示错误如下: ( macOS 操作系统,M3 芯片) (chattts_webui) yidian@ai ChatTTS-WebUI % python webui/main.py The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling
transformers.utils.move_cache()
. 0it [00:00, ?it/s] Load models from snapshot. INFO:ChatTTS.core:Load from cache: /Users/yidian/.cache/huggingface/hub/models--2Noise--ChatTTS/snapshots/c0aa9139945a4d7bb1c84f07785db576f2bb1bfa Traceback (most recent call last): File "/Users/yidian/PycharmProjects/pythonProject3/ChatTTS-WebUI/webui/main.py", line 39, in chat.load_models() File "/Users/yidian/PycharmProjects/pythonProject3/ChatTTS-WebUI/ChatTTS/ChatTTS/core.py", line 55, in load_models self._load(**{k: os.path.join(download_path, v) for k, v in OmegaConf.load(os.path.join(download_path, 'config', 'path.yaml')).items()}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/miniconda3/envs/chatttswebui/lib/python3.12/site-packages/omegaconf/omegaconf.py", line 189, in load with io.open(os.path.abspath(file), "r", encoding="utf-8") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/Users/yidian/.cache/huggingface/hub/models--2Noise--ChatTTS/snapshots/c0aa9139945a4d7bb1c84f07785db576f2bb1bfa/config/path.yaml' (chattts_webui) yidian@ai ChatTTS-WebUI %How did you solve it?
第一次执行需要下载模型的,你看看是不是因为模型没下载好