Text-to-Audio
Transformers
PyTorch
Japanese
parler_tts
text-generation
text-to-speech
annotation
japanese
Instructions to use 2121-8/japanese-parler-tts-mini-bate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 2121-8/japanese-parler-tts-mini-bate with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="2121-8/japanese-parler-tts-mini-bate")# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("2121-8/japanese-parler-tts-mini-bate", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| language: | |
| - ja | |
| base_model: | |
| - parler-tts/parler-tts-mini-v1 | |
| - retrieva-jp/t5-base-long | |
| datasets: | |
| - ylacombe/libritts_r_filtered | |
| - ylacombe/libritts-r-filtered-descriptions-10k-v5-without-accents | |
| pipeline_tag: text-to-audio | |
| library_name: transformers | |
| tags: | |
| - text-to-speech | |
| - annotation | |
| - japanese | |
| # Japanese Parler-TTS Mini (β版) | |
| このリポジトリは、[parler-tts/parler-tts-mini-v1](https://huggingface.co/parler-tts/parler-tts-mini-v1)を基に、日本語でのテキスト読み上げを可能にするよう再学習したモデルを公開しています。本モデルは、軽量でありながら高品質な音声生成を提供します。 | |
| **注意**: 本家の[Parler-TTS](https://huggingface.co/collections/parler-tts/parler-tts-fully-open-source-high-quality-tts-66164ad285ba03e8ffde214c)で使用されているtokenizerとは互換性がありません。本モデル用に独自のtokenizerが採用されています。 | |
| **現在このリポジトリはβ版です**。機能やモデルの最適化は正式リリースに向けて進行中です。 | |
| 正式リリース版のURL: 準備中 | |
| --- | |
| ## Japanese Parler-TTS Index | |
| - [Japanese Parler-TTS Mini (878M)](https://huggingface.co/2121-8/japanese-parler-tts-mini-bate) | |
| - [Japanese Parler-TTS Large (2.33B)](https://huggingface.co/2121-8/japanese-parler-tts-large-bate) | |
| --- | |
| ## 注意点 | |
| 本モデルは学習データの構成上、男性の声に関するデータが少ないため、男性の声の生成が期待通りに行えない場合があります。特に、自然なイントネーションや音質の調整が難しい場合がありますので、ご了承ください。 | |
| --- | |
| ## 📖 クイックインデックス | |
| * [👨💻 インストール](#👨💻-インストール) | |
| * [🎲 ランダムな音声での使用方法](#🎲-ランダムな音声での使用方法) | |
| * [🎯 特定の話者を指定する方法](#🎯-特定の話者を指定する方法) | |
| --- | |
| ## 🛠️ 使用方法 | |
| ### 👨💻 インストール | |
| 以下のコマンドでインストールできます。 | |
| ```sh | |
| pip install git+https://github.com/huggingface/parler-tts.git | |
| pip install git+https://github.com/getuka/RubyInserter.git | |
| ``` | |
| --- | |
| ### 🎲 ランダムな音声での使用方法 | |
| ```python | |
| 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("2121-8/japanese-parler-tts-mini-bate").to(device) | |
| tokenizer = AutoTokenizer.from_pretrained("2121-8/japanese-parler-tts-mini-bate") | |
| prompt = "こんにちは、今日はどのようにお過ごしですか?" | |
| description = "A female speaker with a slightly high-pitched voice delivers her words at a moderate speed with a quite monotone tone in a confined environment, resulting in a quite clear audio recording." | |
| 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_japanese_out.wav", audio_arr, model.config.sampling_rate) | |
| ``` | |
| ### サンプル音声 | |
| <audio controls> | |
| <source src="https://huggingface.co/2121-8/japanese-parler-tts-mini-bate/resolve/main/audio/audio_parler_tts_japanese_out_sample_1.wav" type="audio/wav"> | |
| お使いのブラウザはオーディオタグをサポートしていません。 | |
| </audio> | |
| </br> | |
| <audio controls> | |
| <source src="https://huggingface.co/2121-8/japanese-parler-tts-mini-bate/resolve/main/audio/audio_parler_tts_japanese_out_sample_2.wav" type="audio/wav"> | |
| お使いのブラウザはオーディオタグをサポートしていません。 | |
| </audio> | |
| --- | |
| ### 🎯 特定の話者を指定する方法 | |
| 準備中 | |
| --- | |
| ### 著作権および使用に関する免責事項 | |
| 本モデルおよびリポジトリは、研究、教育、商用利用を含む幅広い目的での利用が許可されています。ただし、以下の条件を遵守してください。 | |
| 1. **商用利用に関する条件** | |
| 本モデルを使用して生成された音声や成果物を商用目的で利用することは可能ですが、本モデルそのもの(ファイルや重みデータなど)の販売は禁じられています。 | |
| 2. **適切性についての免責** | |
| 本モデルの利用により得られる結果の正確性、合法性、または適切性について、作成者は一切保証しません。 | |
| 3. **ユーザーの責任** | |
| 本モデルを使用する際は、適用されるすべての法律や規制を遵守してください。また、生成されたコンテンツに起因する責任はすべてユーザーに帰属します。 | |
| 4. **作成者の免責** | |
| 本リポジトリおよびモデルの作成者は、著作権侵害やその他の法的問題に関する責任を一切負いません。 | |
| 5. **削除要求への対応** | |
| 著作権問題が発生した場合、問題のあるリソースやデータを速やかに削除します。 | |
| --- |