Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行examples/api下的实例时,提示ModuleNotFoundError: No module named 'tools.audio' #820

Open
fhqfhvtx opened this issue Nov 13, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@fhqfhvtx
Copy link

fhqfhvtx commented Nov 13, 2024

按照exaplmes/api/readme操作,操作步骤

1、clone git代码

2、安装依赖
进入Chattts目录,执行命令
pip install -r examples/api/requirements.txt

3、启动服务
fastapi dev examples/api/main.py --host 0.0.0.0 --port 8000

控制台报错:
ModuleNotFoundError: No module named 'tools.audio'

感觉错误原因是tools目录下的包并没有包含在ChatTTS的安装文件中,所有找不到。这个问题如何解决?

@fhqfhvtx fhqfhvtx changed the title 运行examples/api下的实例是,提示ModuleNotFoundError: No module named 'tools.audio' 运行examples/api下的实例时,提示ModuleNotFoundError: No module named 'tools.audio' Nov 13, 2024
@fumiama fumiama added the documentation Improvements or additions to documentation label Nov 18, 2024
@fumiama
Copy link
Member

fumiama commented Nov 18, 2024

应该是你启动方式的问题。examples/web/webui.py也引用了tools,可以尝试运行一下。

@Strive-for-excellence
Copy link

pip uninstall tools

@benknam
Copy link

benknam commented Nov 22, 2024

控制台输出:

Traceback (most recent call last):
File "/root/ctts/examples/web/webui.py", line 13, in
from funcs import *
File "/root/ctts/examples/web/funcs.py", line 7, in
from tools.audio import float_to_int16, has_ffmpeg_installed, load_audio
ModuleNotFoundError: No module named 'tools.audio'

尝试 pip uninstall tools & pip install tools ,出同样的提示,未能解决问题。

目前用Jianchang512的ChatTTS-ui覆盖并装入ffmpeg后,用其根目录的app.py启动webui,但这不是长久之计。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants