jianchang512 / ChatTTS-ui

一个简单的本地网页界面,使用ChatTTS将文字合成为语音,同时支持对外提供API接口。A simple native web interface that uses ChatTTS to synthesize text into speech, along with support for external API interfaces.
https://pyvideotrans.com
Other
5.1k stars 556 forks source link

macos报错:ModuleNotFoundError: No module named 'torch._dynamo' #64

Open dingdaoyi opened 1 month ago

dingdaoyi commented 1 month ago

我按照mac的命令运行下去, 报这个错 Traceback (most recent call last): File "/Users/dingyunwei/workspace/tools/chattts/chatTTS-ui/app.py", line 6, in import torch._dynamo ModuleNotFoundError: No module named 'torch._dynamo'

jianchang512 commented 1 month ago

pip3 install torch torchaudio

这个执行了吗 如果执行了,将 app.py中

import torch._dynamo
torch._dynamo.config.suppress_errors = True
torch._dynamo.config.cache_size_limit = 64
torch._dynamo.config.suppress_errors = True

这几行代码删掉

dingdaoyi commented 1 month ago

出现这个问题了, 跟他运行同样命令报错 https://github.com/jianchang512/ChatTTS-ui/issues/60#issue-2330098399 -> % pip3 install soundfile
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: soundfile in ./venv/lib/python3.10/site-packages (0.12.1) Requirement already satisfied: cffi>=1.0 in ./venv/lib/python3.10/site-packages (from soundfile) (1.16.0) Requirement already satisfied: pycparser in ./venv/lib/python3.10/site-packages (from cffi>=1.0->soundfile) (2.22) (venv) @ [17:42:12] [~/workspace/tools/chattts/chatTTS-ui] [main *] -> % python3 app.py
Traceback (most recent call last): File "/Users/**/workspace/tools/chattts/chatTTS-ui/app.py", line 36, in import soundfile as sf ModuleNotFoundError: No module named 'soundfile' (venv)

jianchang512 commented 1 month ago

没有执行 pip install -r requirements.txt 命令 ?

jianchang512 commented 1 month ago

先执行 brew install libsndfile

再执行 pip install soundfile

dingdaoyi commented 2 weeks ago

这个问题我看了下, 是python3.10 以上版本会报错, 换成3.10 好了