Logo
Section 1 / 2

文本到语音生成系统的训练基础设施

全面了解构建前沿语音合成模型的设计、训练与评估过程。

导入

文本到语音生成系统的训练基础设施

全面了解构建前沿语音合成模型的设计、训练与评估过程。

...
用户与TTS系统的交互
...
Fish Speech TTS 架构
PageFlux AI 助手

👋 你好!我是 PageFlux AI 助手,专门帮助您理解课程内容。有什么问题尽管问我吧!

💡 选中文本后点击"AI 询问",或 Ctrl+Enter 发送消息

表格

特性Fish Speech v1Tacotron 2xTTSWaveNet
参数量10亿约5000万约5亿约2400万
多语言能力原生支持支持有限原生支持不支持(语言特定)
音频质量(MOS)~4.05~4.5~4.0~4.2
是否开源?✅✅✅❌
局限性内存占用高训练需要大量数据集架构复杂推理速度慢
1.

Why do we prefer a model with a large number of trainable parameters?

0/500

思考点

...
训练TTS模型所需的数据集格式
...
我们可以将处理后的数据集存储在Blob存储和SQL数据库中

总数据项数 = 200万

预处理单个音频文件耗时 = 100毫秒
预处理单条文本描述耗时 = 1毫秒
向数据库写入一行数据耗时 = 0.5毫秒

音频总预处理时间 (Tpa)(T_{pa}) = 单个音频预处理时间 × 总数据项数
Tpa=100ms×2M=200,000秒≈56小时T_{pa} = 100 \text{ms} \times 2\text{M} = 200,000 \text{秒} \approx 56 \text{小时}

文本总预处理时间 (Tpt)(T_{pt}) = 文本预处理时间 × 总数据项数
Tpt=1ms×2M=2,000秒≈0.5小时T_{pt} = 1 \text{ms} \times 2\text{M} = 2,000 \text{秒} \approx 0.5 \text{小时}

总存储时间 (Ts)(T_s) = 单行存储时间 × 总数据项数
Ts=0.5ms×2M=1,000秒≈0.28小时T_s = 0.5 \text{ms} \times 2\text{M} = 1,000 \text{秒} \approx 0.28 \text{小时}

...
处理并存储文本-语音数据集所需时间
1.

Can we process the audio and the text in parallel since their preprocessing is independent?

0/500

思考点

Tsec=Nparams×NFLOPS×E×D×CRops×NGPUsT_{\text{sec}} = \frac{N_{\text{params}} \times N_{\text{FLOPS}} \times E \times D \times C}{R_{\text{ops}} \times N_{\text{GPUs}}} Tsec=Nparams×NFLOPS×E×D×NstepsRops×NGPUsT_{\text{sec}} = \frac{N_{\text{params}} \times N_{\text{FLOPS}} \times E \times D \times N_{\text{steps}}}{R_{\text{ops}} \times N_{\text{GPUs}}} Nsteps=Laudio×IsecN_{\text{steps}} = L_{\text{audio}} \times I_{\text{sec}} Nsteps=10×100=1,000N_{\text{steps}} = 10 \times 100 = 1,000

其中:
Nparams=1 BillionN_{\text{params}} = 1 \ \text{Billion}(10亿)
NFLOPS=6N_{\text{FLOPS}} = 6(每参数每次迭代的浮点运算数)
E=1,000E = 1,000(训练轮数)
D=2 MillionD = 2 \ \text{Million}(数据总量,200万条)
Nsteps=1,000N_{\text{steps}} = 1,000(每条样本的步数)
Rops=156 TFLOPSR_{\text{ops}} = 156 \ \text{TFLOPS}(单GPU算力)
NGPUs=1N_{\text{GPUs}} = 1(使用GPU数量)

代入公式:

Tseconds=1×109×6×1,000×2×106×1,000156×1012 FLOPS×1T_{\text{seconds}} = \frac{1 \times 10^9 \times 6 \times 1,000 \times 2 \times 10^6 \times 1,000}{156 \times 10^{12} \ \text{FLOPS} \times 1} Tseconds≈76,923,077 秒T_{\text{seconds}} \approx 76,923,077 \ \text{秒} Tdays≈890 天T_{\text{days}} \approx 890 \ \text{天}
...
数据采集、预处理与模型训练流程
1.

How might you adapt the Fish Speech model to generate singing voices instead of just spoken language? What modifications to the architecture or training data might be necessary?

0/500

思考点

粗略估算(Back-of-the-envelope Calculations)

部署文本转语音生成模型的系统设计