Skip to content

Commit 415e194

Browse files
committed
补充打包懒人包的说明
1 parent a0e233b commit 415e194

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,22 @@ ps:依赖[golang](https://go.dev/dl/)环境,还没有的话,手动补一补[
284284
生成UI代码 `pyuic5 -o UI_main.py ui\main.ui`
285285

286286

287+
## 打包懒人包
288+
289+
1、本地装有conda环境
290+
2、在本文件夹创建虚拟环境
291+
`conda create --prefix ./venv python=3.10`
292+
3、安装依赖
293+
`venv\python.exe -m pip install -r requirements_bilibili.txt -i https://pypi.tuna.tsinghua.edu.cn/simple`
294+
`venv\python.exe -m pip install -r requirements_dy.txt -i https://pypi.tuna.tsinghua.edu.cn/simple`
295+
`venv\python.exe -m pip install -r requirements_ks.txt -i https://pypi.tuna.tsinghua.edu.cn/simple`
296+
4、安装chatterbot(可选)
297+
`venv\python.exe -m pip install spacy SQLAlchemy==1.3.24 -i https://pypi.tuna.tsinghua.edu.cn/simple`
298+
前提是你在当前目录下有clone chatterbot的项目(自行调整路径关系)
299+
`venv\python.exe setup.py install`
300+
5、修改`audio.py``edge-tts`的调用实现
301+
302+
287303
## FAQ 常问问题
288304

289305
### 1.openai 接口报错:《empty message》

utils/audio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def my_play_voice(self, type, data, config, content):
114114
# 过滤" '字符
115115
content = content.replace('"', '').replace("'", '').replace(" ", ',')
116116
# 使用 Edge TTS 生成回复消息的语音文件
117+
# 注意此处,在打包整合包时,需要改为 venv\python.exe venv\Scripts\edge-tts.exe
117118
cmd = f'edge-tts --voice {data["voice"]} --text "{content}" --write-media {voice_tmp_path} --rate={data["rate"]} --volume={data["volume"]}'
118119
subprocess.run(cmd, shell=True)
119120

0 commit comments

Comments
 (0)