🚀 Parler-TTS Mini v0.1
Parler-TTS Mini v0.1 は軽量なテキスト読み上げ(TTS)モデルです。このモデルは10.5K時間の音声データで学習されており、簡単なテキストプロンプト(例:性別、背景雑音、話す速度、ピッチ、残響)を使って制御可能な機能を備え、高品質で自然な音声を生成することができます。これは Parler-TTS プロジェクトからの最初のリリースモデルであり、TTS学習リソースとデータセット前処理コードをコミュニティに提供することを目的としています。
🚀 クイックスタート
Parler-TTSを使うのは簡単です。まずは一度ライブラリをインストールしましょう。
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_tts_mini_v0.1").to(device)
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler_tts_mini_v0.1")
prompt = "Hey, how are you doing today?"
description = "A female speaker with a slightly low-pitched voice delivers her words quite expressively, in a very confined sounding environment with clear audio quality. She speaks very fast."
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)
💡 使用ヒント
- 最も高品質な音声を生成するには「very clear audio」という用語を含め、高レベルの背景雑音を生成するには「very noisy audio」を使用します。
- 句読点を使って生成の韻律を制御できます。例えば、コンマを使って発話に小さな区切りを入れることができます。
- 残りの音声機能(性別、話す速度、ピッチ、残響)はプロンプトを通じて直接制御できます。
✨ 主な機能
Parler-TTSは、Stability AIのDan Lythとエジンバラ大学のSimon Kingによる論文 Natural language guidance of high-fidelity text-to-speech with synthetic annotations の再現作です。
他のTTSモデルとは異なり、Parler-TTSは完全にオープンソースでリリースされています。すべてのデータセット、前処理、学習コード、重みが許容的なライセンスの下で公開されており、コミュニティが私たちの成果を基にして独自の強力なTTSモデルを開発できるようになっています。
Parler-TTSは以下とともにリリースされました。
📚 ドキュメント
このリポジトリが役に立った場合は、この成果と元の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}
}
📄 ライセンス
このモデルはApache 2.0ライセンスの下で許容的にライセンスされています。
属性 |
详情 |
ライブラリ名 |
transformers |
タグ |
text-to-speech、annotation |
パイプラインタグ |
text-to-speech |
推論 |
false |
データセット |
parler-tts/mls_eng_10k、blabble-io/libritts_r、parler-tts/libritts_r_tags_tagged_10k_generated、parler-tts/mls-eng-10k-tags_tagged_10k_generated |
ライセンス |
Apache 2.0 |
言語 |
en |