GenerSpeech
1.0.0
GenerSpeech的Pytorch实现(Neurips'22):一种涉及高保真零拍的样式转移的文本到语音模型。
我们在此存储库中提供了实施和预处理的模型。
访问我们的演示页面以获取音频样本。
我们提供了一个示例,说明如何使用GenerSpeech生成高保真样本。
要尝试自己的数据集,只需将此存储库克隆到提供NVIDIA GPU + CUDA CUDNN的本地计算机中,然后按照以下说明进行操作即可。
您可以在此处提供我们提供的验证模型以及此处的数据。每个文件夹的详细信息如下:
| 模型 | 数据集(16 kHz) | 描述 |
|---|---|---|
| Generspeech | Libritts,ESD | 声学模型(config) |
| hifi-gan | Libritts,ESD | 神经声码器 |
| 编码器 | / | 情感编码器 |
更多支持的数据集即将推出。
可以通过generspeech方式创建和激活一个合适的Conda环境:
conda env create -f environment.yaml
conda activate generspeech
默认情况下,此实现使用了同样多的gpu并行的GPU,如torch.cuda.device_count()返回。您可以通过在运行训练模块之前设置CUDA_DEVICES_AVAILABLE环境变量来指定要使用的GPU。
在这里,我们使用GenerSpeech提供语音合成管道。
checkpoints/GenerSpeechcheckpoints/trainset_hifigancheckpoints/Emotion_encoder.ptdata/binary/training_set放置统计文件CUDA_VISIBLE_DEVICES= $GPU python inference/GenerSpeech.py --config modules/GenerSpeech/config/generspeech.yaml --exp_name GenerSpeech --hparams= " text='here we go',ref_audio='assets/0011_001570.wav' "默认情况下将生成的WAV文件保存在infer_out中。
raw_data_dir设置, processed_data_dir , binary_data_dir在配置文件中,然后将数据集下载到raw_data_dir 。preprocess_cls 。数据集结构需要遵循处理器preprocess_cls ,或者您可以根据数据集对其进行重写。我们在modules/GenerSpeech/config/generspeech.yaml中提供库丽特处理器作为示例emotion_encoder_path 。有关更多详细信息,请参阅此分支。 # Preprocess step: unify the file structure.
python data_gen/tts/bin/preprocess.py --config $path /to/config
# Align step: MFA alignment.
python data_gen/tts/bin/train_mfa_align.py --config $path /to/config
# Binarization step: Binarize data for fast IO.
CUDA_VISIBLE_DEVICES= $GPU python data_gen/tts/bin/binarize.py --config $path /to/config您还可以通过NatsPeech构建数据集,该数据集共享一个常见的MFA数据处理过程。我们还提供处理后的数据集(16KHz libritts+ESD)。
CUDA_VISIBLE_DEVICES= $GPU python tasks/run.py --config modules/GenerSpeech/config/generspeech.yaml --exp_name GenerSpeech --resetCUDA_VISIBLE_DEVICES= $GPU python tasks/run.py --config modules/GenerSpeech/config/generspeech.yaml --exp_name GenerSpeech --infer该实现使用以下github存储库中的代码部分:fastdiff,natspeech,如我们的代码中所述。
如果您发现此代码对您的研究有用,请引用我们的工作:
@inproceedings { huanggenerspeech ,
title = { GenerSpeech: Towards Style Transfer for Generalizable Out-Of-Domain Text-to-Speech } ,
author = { Huang, Rongjie and Ren, Yi and Liu, Jinglin and Cui, Chenye and Zhao, Zhou } ,
booktitle = { Advances in Neural Information Processing Systems }
}禁止任何组织或个人使用本文中提到的任何技术未经他/她的同意,包括但不限于政府领导人,政治人物和名人。如果您不遵守此项目,则可能违反版权法。