🚀 Parler-TTS Mini Multilingual
Parler-TTS Mini Multilingual v1 は、Parler-TTS Mini の多言語拡張版です。このモデルは、CML-TTS のクリーン版と、Multilingual LibriSpeech の非英語版を使用して微調整されています。合計で約9,200時間の非英語データが使用されています。英語の能力を維持するために、LibriTTS-R English dataset の約580時間の高品質英語データも追加されています。
Parler-TTS Mini Multilingual は、英語、フランス語、スペイン語、ポルトガル語、ポーランド語、ドイツ語、イタリア語、オランダ語の8つのヨーロッパ言語で話すことができます。また、優れたプロンプトトークナイザーにより、他の言語にも容易に拡張できます。このトークナイザーは語彙が豊富で、バイトフォールバックをサポートしているため、多言語トレーニングが容易になります。
🚨 このプロジェクトは、HuggingFaceのオーディオチームと**Quantum Squadra チームの共同作業の成果です。また、AI4Bharat チーム**からもトークン化の改善に関するアドバイスと支援を受けています。🚨
🚀 クイックスタート
👨💻 インストール
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-multilingual").to(device)
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-tts-mini-multilingual")
description_tokenizer = AutoTokenizer.from_pretrained(model.config.text_encoder._name_or_path)
prompt = "Hey, how are you doing today?"
description = "A female speaker delivers a slightly expressive and animated speech with a moderate speed and pitch. The recording is of very high quality, with the speaker's voice sounding clear and very close up."
input_ids = description_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)
ヒント:
- 生成を高速化するための推論ガイドが用意されています。SDPA、torch.compile、バッチ処理、ストリーミングなどを考慮してください。
- 最も高品質の音声を生成するには「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 の再現です。他のテキスト読み上げモデルとは異なり、Parler-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 |
タグ |
テキスト読み上げ、注釈付け |
ライセンス |
Apache 2.0 |
言語 |
英語、フランス語、スペイン語、ポルトガル語、ポーランド語、ドイツ語、オランダ語、イタリア語 |
パイプラインタグ |
テキスト読み上げ |
推論 |
無効 |
データセット |
facebook/multilingual_librispeech、parler-tts/libritts_r_filtered、parler-tts/libritts-r-filtered-speaker-descriptions、parler-tts/mls_eng、parler-tts/mls-eng-speaker-descriptions、PHBJT/mls-annotated、PHBJT/cml-tts-filtered-annotated、PHBJT/cml-tts-filtered |