Spear-TTS 구현 - Pytorch에서 다중 화자 텍스트 음성 변환 주의 네트워크
여기에 구축된 텍스트-의미론적 모듈은 조절을 위해 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에게 또 다른 인용을 제공합니다.
투기적 해독과 일부 즉흥 연주 통합 - 조기 종료 전략을 사용하여 동일한 모델에서 수행됨
캐시된 키/스타터 값 + 단일/그룹화된 키 값을 추가하고, 플래시 어텐션 2가 파이토치 코어에 있기 전에 플래시 어텐션이 특수한 인과 마스크를 지원할 수 있는지 확인하세요.
오디오 텍스트 생성 작업 흐름을 다듬습니다.
실제 오디오 텍스트 데이터 세트를 생성된 오디오 텍스트 데이터 세트와 연결 -> 또는 실제 오디오 텍스트 데이터 세트를 생성된 오디오 텍스트 데이터 세트로 변환할 수 있음
@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 }
}