Skip to content

Commit c080af7

Browse files
committed
docs: update requirements.txt #217
- 主要是修复 pydantic 更新问题,并增加所有主要依赖的版本限制
1 parent 5972fa6 commit c080af7

File tree

5 files changed

+67
-159
lines changed

5 files changed

+67
-159
lines changed

README.en.md

-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ Since Forge primarily focuses on API functionality development, automatic downlo
137137

138138
> **Note**: If you need to use ModelScope to download models, use `--source modelscope`. Some models may not be available for download using ModelScope.
139139
140-
> **About CosyVoice**: It's unclear which model to use. Overall, the `instruct` model has the most features, but its quality may not be the best. If you wish to use other models, feel free to select `dl_cosyvoice_base.py`, `dl_cosyvoice_instruct.py`, or the `sft` script. The loading priority is `base` > `instruct` > `sft`, and you can determine which to load based on folder existence.
141-
142140
## FAQ
143141

144142
### How to perform voice cloning?

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Speech-AI-Forge 是一个围绕 TTS 生成模型开发的项目,实现了 API
1717

1818
## Installation and Running
1919

20-
首先,确保 [相关依赖](./docs/dependencies.md) 已经正确安装
20+
首先,确保 [相关依赖](./docs/dependencies.md) 已经正确安装,并查看 [模型下载](#模型下载) 下载所需模型
2121

2222
启动:
2323

@@ -141,8 +141,6 @@ WIP 开发中
141141

142142
> **注意**:如果需要使用 ModelScope 下载模型,请使用 `--source modelscope`。部分模型可能无法使用 ModelScope 下载。
143143
144-
> **关于 CosyVoice**:不太确定应该使用哪个模型。整体来看,`instruct` 模型功能最多,但可能质量不是最佳。如果需要使用其他模型,请自行选择 `dl_cosyvoice_base.py``dl_cosyvoice_instruct.py``sft` 脚本。加载优先级为 `base` > `instruct` > `sft`,可根据文件夹存在性判断加载顺序。
145-
146144
## FAQ
147145

148146
### 如何语音复刻?

docs/dependencies.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ apt-get install rubberband-cli
146146
> (如果直接运行某些情况可能会安装 cpu 版本,具体应该指定什么版本请自行确定)
147147
148148
```bash
149-
pip3 install torch torchvision torchaudio --index-url https://mirror.sjtu.edu.cn/pytorch-wheels/cu121
149+
pip3 install torch==2.3.1 torchvision torchaudio --index-url https://mirror.sjtu.edu.cn/pytorch-wheels/cu121
150150
```
151151

152152
如果上面无法安装 cuda 版本,可以参考下面的指令安装指定版本 torch (linux)
@@ -167,14 +167,6 @@ pip3 install https://mirror.sjtu.edu.cn/pytorch-wheels/cu121/torchvision-0.18.1%
167167
python -m pip install -r requirements.txt
168168
```
169169

170-
对于 windows 环境,请使用 `requirements.windows.txt`
171-
172-
> 因为有类似 `pynini` 这样的可选依赖库不支持在 windows 环境安装
173-
174-
```bash
175-
python -m pip install -r requirements.windows.txt
176-
```
177-
178170
## 6. 其他
179171

180172
如果需要部署 Docker 环境,请配置 Docker 和 Docker Compose。

requirements.txt

+65-55
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,98 @@
11
numpy==1.26.4
2-
scipy
3-
lxml
4-
pydub
5-
fastapi
6-
soundfile
7-
omegaconf
8-
pypinyin
9-
vocos
10-
pandas
11-
vector_quantize_pytorch
12-
einops
13-
transformers~=4.41.1
2+
scipy==1.11.4
3+
lxml==5.2.2
4+
pydub==0.25.1
5+
fastapi==0.111.0
6+
soundfile==0.12.1
7+
omegaconf==2.3.0
8+
pypinyin==0.51.0
9+
vocos==0.1.0
10+
pandas==2.1.3
11+
vector_quantize_pytorch==1.14.24
12+
einops==0.8.0
13+
transformers==4.41.2
1414
huggingface-hub==0.23.2
15-
omegaconf~=2.3.0
16-
tqdm
17-
python-ms
18-
# torch
19-
# torchvision
20-
# torchaudio
15+
tqdm==4.66.3
16+
python-ms==1.1.0
2117

2218
# colab
23-
datasets
19+
datasets==2.20.0
2420

2521
# TN
26-
emojiswitch
27-
python-dotenv
28-
zhon
22+
emojiswitch==0.0.3
23+
python-dotenv==1.0.1
24+
zhon==2.0.2
2925
mistune==3.0.2
3026

3127
# gradio
3228
gradio==4.44.0
3329
gradio_client==1.3.0
30+
## NOTE: pydantic 不要升到 2.11 会报错!
31+
pydantic==2.8.2
32+
pydantic-core==2.20.1
3433

3534
# audio_denoiser
36-
python-box
37-
ftfy
38-
librosa
39-
pyrubberband
40-
pybase16384
41-
cachetools
42-
langdetect
43-
WeTextProcessing
35+
python-box==7.1.1
36+
ftfy==6.2.0
37+
librosa==0.10.1
38+
pyrubberband==0.3.0
39+
pybase16384==0.3.8
40+
cachetools==5.3.3
41+
langdetect==1.0.9
42+
WeTextProcessing; sys_platform=="linux"
4443

4544
#### fish-speech
46-
hydra-core
47-
loguru
48-
lightning
49-
natsort
50-
pyrootutils
51-
loralib
52-
wandb
53-
45+
hydra-core==1.3.2
46+
loguru==0.7.2
47+
lightning==2.3.3
48+
natsort==8.4.0
49+
pyrootutils==1.0.4
50+
loralib==0.1.2
51+
wandb==0.17.4
52+
# NOTE: 安装这个是为了保证没有 Import error 其实是用不到的,所以版本可能不对
53+
accelerate==1.6.0
5454

5555
### cosyvoice
56-
hyperpyyaml
57-
openai-whisper
58-
onnxruntime
59-
inflect
60-
matcha-tts
56+
hyperpyyaml==1.2.2
57+
openai-whisper==20231117
58+
onnxruntime==1.18.1
59+
inflect==7.3.1
60+
unidecode==1.3.8
61+
# NOTE: 这个似乎不需要
62+
# matcha-tts
6163

6264
# whisper
6365
faster_whisper==1.0.3
6466

6567
# webui
66-
pysubs2
68+
pysubs2==1.7.3
6769

6870
# OpenVoice
69-
eng-to-ipa
70-
jieba
71-
cn2an
71+
eng-to-ipa==0.0.2
72+
jieba==0.42.1
73+
cn2an==0.5.22
7274

7375
### fire red tts
74-
lingua-language-detector
76+
lingua-language-detector==2.0.2
77+
diffusers==0.32.2
7578

7679
### F5 TTS
77-
torchdiffeq
78-
x-transformers
79-
ema-pytorch
80-
funasr
81-
jiwer
82-
zhconv
80+
torchdiffeq==0.2.4
81+
x-transformers==1.39.1
82+
ema-pytorch==0.7.0
83+
funasr==1.1.12
84+
jiwer==3.0.4
85+
zhconv==1.4.3
86+
tomli==2.2.1
8387

8488
### webui tools
8589
moviepy==1.0.3
8690

8791
### downloader script
88-
modelscope
92+
modelscope==1.20.0
93+
94+
### PyTorch Dependencies (using custom source for CUDA)
95+
--extra-index-url https://download.pytorch.org/whl/cu121
96+
torch==2.3.1+cu121
97+
torchvision==0.18.1+cu121
98+
torchaudio==2.3.1+cu121

requirements.windows.txt

-90
This file was deleted.

0 commit comments

Comments
 (0)