跳到主要内容Skip to main content

文字怎么变成声音How Text Becomes Speech

How Text Becomes Speech

  • 图像语音视频Image, speech & video
  • 第四站 · 看懂Station 4 · Under the Hood
解决什么问题What problem it solves

现代 TTS 的原理:端到端一步出波形,节奏是「猜」出来的分布。How modern TTS works end to end: one model outputs the waveform, and rhythm is a distribution it samples rather than an average.

这是什么What it is

老式 TTS 分两步:先把文字转成频谱图,再用声码器还原成波形。两步分开训练,误差会叠加。

FastSpeech 2(2020)用非自回归方式并行生成频谱,训练提速三倍。

VITS(2021)把两步合成一个端到端模型,直接从文字生成波形。人耳评测接近真人录音。

「一对多」是核心难点:同一句话可以有多种语速和语调。VITS 用随机时长预测器把这种变化建模成分布,而不是取平均。

取平均的代价就是「机器人腔」。

Old-style TTS had two stages: text to spectrogram, then a vocoder back to waveform. Training them separately lets errors compound.

FastSpeech 2 (2020) generates spectrograms in parallel with a non-autoregressive model, a 3x training speed-up over FastSpeech.

VITS (2021) merges the two stages into one end-to-end model that generates waveform directly from text, with human listening tests close to real recordings.

The one-to-many mapping is the core difficulty: the same sentence can be spoken at many speeds and intonations. VITS models that variation as a distribution with a stochastic duration predictor instead of averaging it.

Averaging is exactly what produces the 'robotic' sound.

为什么需要知道Why it matters

合成语音「不像真人」时,问题多半在节奏建模,不在音质或采样率。When synthesised speech 'doesn't sound human', the problem is usually in rhythm modelling, not audio quality or sample rate.

出处Sources
  • FastSpeech 2 论文(arXiv)FastSpeech 2: Fast and High-Quality End-to-End Text to Speech (arXiv 2006.04558) ↗
  • VITS 论文(端到端语音合成,arXiv)Conditional VAE with Adversarial Learning for End-to-End TTS (arXiv 2106.06103) ↗