nix tts
1.0.0
这是我们论文的存储库吗? nix-tts (被IEEE SLT 2022接受)。我们在下面发布了验证的模型,交互式演示和音频样本。
[[?纸链接](即将推出!)] [?互动演示] [?音频样本]
摘要轻巧的TT的几种解决方案显示出令人鼓舞的结果。尽管如此,他们要么依赖于达到最小尺寸的手工设计的设计,要么使用神经建筑搜索,但经常遭受培训费用。我们提出了Nix-TTS,这是一种通过知识蒸馏到高质量但大型,非自动进取和端到端(不含Vocoder)TTS TTS教师模型的轻量级TT。具体而言,我们提供模块蒸馏,使编码器和解码器模块具有柔性和独立的蒸馏。由此产生的Nix-TT遗传了从教师端到端的非解放和端到端的优势性能,但规模较小,只有523万参数或最高为89.34%的教师模型; it also achieves over 3.04$times$ and 8.36$times$ inference speedup on Intel-i7 CPU and Raspberry Pi 3B respectively and still retains a fair voice naturalness and intelligibility compared to the teacher model.
克隆nix-tts存储库,然后移至其目录
git clone https://github.com/rendchevi/nix-tts.git
cd nix-tts安装依赖项
python >= 3.8 pip install -r requirements.txt sudo apt-get install espeak或按照官方指示行动,以防万一。
在此处下载您选择的预训练模型。
| 模型 | num。参数 | 比实时 *快* (CPU Intel-i7) | 比实时 *快* (RASPI 3B) |
|---|---|---|---|
| nix-tts(onnx) | 5.23 m | 11.9倍 | 0.50x |
| nix-tts带随机持续时间(ONNX) | 6.03 m | 10.8倍 | 0.50x |
*在这里,我们计算该模型的运行速度比实时因子(RTF)的倒数更快。所有型号加速的完整表都在纸上详细介绍。
并且运行nix-tts很容易:
from nix . models . TTS import NixTTSInference
from IPython . display import Audio
# Initiate Nix-TTS
nix = NixTTSInference ( model_dir = "<path_to_the_downloaded_model>" )
# Tokenize input text
c , c_length , phoneme = nix . tokenize ( "Born to multiply, born to gaze into night skies." )
# Convert text to raw speech
xw = nix . vocalize ( c , c_length )
# Listen to the generated speech
Audio ( xw [ 0 , 0 ], rate = 22050 )