库名称: transformers
标签:
- 文本转语音
- 标注
语言:
- 英语
管道标签: 文本转语音
推理: 否
数据集:
- ylacombe/jenny-tts-tagged-v1
- reach-vb/jenny_tts_dataset
Parler-TTS Large v1 - Jenny
Parler-TTS Large v1 的微调版本,基于30小时单说话者高质量Jenny(她是爱尔兰人☘️)数据集,适合训练TTS模型。
使用方法与Parler-TTS v1基本相同,只需在语音描述中指定关键词“Jenny”:
使用方法
pip install git+https://github.com/huggingface/parler-tts.git
然后可以使用以下推理代码片段运行模型:
import torch
from parler_tts import ParlerTTSForConditionalGeneration
from transformers import AutoTokenizer
import soundfile as sf
device = "cuda:0" if torch.cuda.is_available() else "cpu"
model = ParlerTTSForConditionalGeneration.from_pretrained("parler-tts/parler-large-v1-jenny").to(device)
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-large-v1-jenny")
prompt = "Hey, how are you doing today? My name is Jenny, and I'm here to help you with any questions you have."
description = "Jenny speaks at an average pace with an animated delivery in a very confined sounding environment with clear audio quality."
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
generation = model.generate(input_ids=input_ids, prompt_input_ids=prompt_input_ids)
audio_arr = generation.cpu().numpy().squeeze()
sf.write("parler_tts_out.wav", audio_arr, model.config.sampling_rate)
引用
如果您觉得这个仓库有用,请考虑引用本作品以及原始的Stability AI论文:
@misc{lacombe-etal-2024-parler-tts,
author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
title = {Parler-TTS},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/huggingface/parler-tts}}
}
@misc{lyth2024natural,
title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
author={Dan Lyth and Simon King},
year={2024},
eprint={2402.01912},
archivePrefix={arXiv},
primaryClass={cs.SD}
}
许可证
许可证 - 在通过此数据集生成音频的软件/网站/项目/界面(包括语音界面)中,必须注明归属。归属意味着:必须将语音称为“Jenny”,并在实际可行的情况下称为“Jenny (Dioco)”。分发生成的音频片段时不需要注明归属(尽管欢迎这样做)。允许商业用途。不要做不公平的事情,比如声称数据集是你自己的。没有其他限制。