🚀 fastspeech2-en-200_speaker-cv4
FastSpeech 2是一個文本轉語音模型,來自fairseq S²。它具備以下特點:支持英文語音合成,擁有200種男女聲線(在使用小部件時隨機選擇說話人),並且在Common Voice v4數據集上進行訓練。該模型能有效解決文本到語音的轉換問題,為語音合成應用提供了強大的支持。
🚀 快速開始
本模型可直接用於英文文本轉語音任務,以下是使用示例代碼。
💻 使用示例
基礎用法
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
import IPython.display as ipd
models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
"facebook/fastspeech2-en-200_speaker-cv4",
arg_overrides={"vocoder": "hifigan", "fp16": False}
)
model = models[0]
TTSHubInterface.update_cfg_with_data_cfg(cfg, task.data_cfg)
generator = task.build_generator(model, cfg)
text = "Hello, this is a test run."
sample = TTSHubInterface.get_model_input(task, text)
wav, rate = TTSHubInterface.get_prediction(task, model, generator, sample)
ipd.Audio(wav, rate=rate)
更多使用說明可參考 fairseq S² 示例。
📚 詳細文檔
📄 許可證
文檔中未提及相關許可證信息。
📄 引用
如果您使用了該模型,請按照以下格式進行引用:
@inproceedings{wang-etal-2021-fairseq,
title = "fairseq S{\^{}}2: A Scalable and Integrable Speech Synthesis Toolkit",
author = "Wang, Changhan and
Hsu, Wei-Ning and
Adi, Yossi and
Polyak, Adam and
Lee, Ann and
Chen, Peng-Jen and
Gu, Jiatao and
Pino, Juan",
booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
month = nov,
year = "2021",
address = "Online and Punta Cana, Dominican Republic",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.emnlp-demo.17",
doi = "10.18653/v1/2021.emnlp-demo.17",
pages = "143--152",
}