spear tts pytorch
0.4.8
在 Pytorch 中实现 Spear-TTS - 多说话者文本转语音注意网络
这里构建的文本到语义模块将用于 SoundStorm 进行调节。
他们慷慨的赞助工作和开源尖端人工智能研究的稳定性
Lucas Newman 完成了反向翻译部分以及波束搜索解码!
Lucas Newman 完成了最终文本到语义转换器的训练代码!
$ pip install spear-tts-pytorch
import torch
from audiolm_pytorch import HubertWithKmeans
from spear_tts_pytorch import (
TextToSemantic ,
SemanticToTextDatasetGenerator ,
GeneratedAudioTextDataset ,
MockDataset
)
wav2vec = HubertWithKmeans (
checkpoint_path = './hubert_base_ls960.pt' ,
kmeans_path = './hubert_base_ls960_L9_km500.bin'
)
model = TextToSemantic (
wav2vec = wav2vec ,
dim = 512 ,
num_text_token_ids = 256 ,
heads = 8 ,
target_kv_heads = 2 , # grouped query attention, for memory efficient decoding
source_depth = 1 ,
target_depth = 1
)
ds = MockDataset ( 10 )
dataset_generator = SemanticToTextDatasetGenerator (
model = model ,
dataset = ds ,
folder = './output_folder'
)
dataset_generator ( max_length = 2 )
generated_dataset = GeneratedAudioTextDataset (
folder = './output_folder'
)
assert len ( generated_dataset ) == 10
添加 eos 逻辑 + 生成,并在 soundstorm 中连接端到端生成
添加第一个预训练语音到语音,重建 60% 已删除的标记
由于资源匮乏,为此项目添加辍学者
增加训练期间冻结编码器/解码器层的总体灵活性
添加小语音训练步骤 -> 文本语料库并生成伪标记数据集 + 微调(感谢@lucasnewman)
添加对文本 -> 语音 + 伪标签数据集进行微调的最后一步
找出存储和管理伪标签生成数据集的最佳方法
批量波束搜索解码
允许在解码器中使用旋转位置+闪光注意,给Tri另一个引用
将推测性解码与一些即兴创作相结合 - 使用早期退出策略在同一模型中完成
为 starter + 单个/分组键值添加缓存的键/值,确保在 Flash Attention 2 进入 pytorch 核心之前 Flash Attention 可以支持专门的因果掩码
完善音频文本生成工作流程
将真实的音频文本数据集与生成的数据集连接起来 -> 或者能够将真实的音频文本数据集转换为生成的数据集
@misc { kharitonov2023speak ,
title = { Speak, Read and Prompt: High-Fidelity Text-to-Speech with Minimal Supervision } ,
author = { Eugene Kharitonov and Damien Vincent and Zalán Borsos and Raphaël Marinier and Sertan Girgin and Olivier Pietquin and Matt Sharifi and Marco Tagliasacchi and Neil Zeghidour } ,
year = { 2023 } ,
eprint = { 2302.03540 } ,
archivePrefix = { arXiv } ,
primaryClass = { cs.SD }
}
@inproceedings { dao2022flashattention ,
title = { Flash{A}ttention: Fast and Memory-Efficient Exact Attention with {IO}-Awareness } ,
author = { Dao, Tri and Fu, Daniel Y. and Ermon, Stefano and Rudra, Atri and R{'e}, Christopher } ,
booktitle = { Advances in Neural Information Processing Systems } ,
year = { 2022 }
}
@misc { shi2023enhance ,
title = { Enhance audio generation controllability through representation similarity regularization } ,
author = { Yangyang Shi and Gael Le Lan and Varun Nagaraja and Zhaoheng Ni and Xinhao Mei and Ernie Chang and Forrest Iandola and Yang Liu and Vikas Chandra } ,
year = { 2023 } ,
eprint = { 2309.08773 } ,
archivePrefix = { arXiv } ,
primaryClass = { cs.SD }
}
@article { Ainslie2023GQATG ,
title = { GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints } ,
author = { Joshua Ainslie and James Lee-Thorp and Michiel de Jong and Yury Zemlyanskiy and Federico Lebr'on and Sumit K. Sanghai } ,
journal = { ArXiv } ,
year = { 2023 } ,
volume = { abs/2305.13245 } ,
url = { https://api.semanticscholar.org/CorpusID:258833177 }
}
@inproceedings { Leviathan2022FastIF ,
title = { Fast Inference from Transformers via Speculative Decoding } ,
author = { Yaniv Leviathan and Matan Kalman and Y. Matias } ,
booktitle = { International Conference on Machine Learning } ,
year = { 2022 } ,
url = { https://api.semanticscholar.org/CorpusID:254096365 }
}