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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
+
language:
|
| 4 |
+
- ja
|
| 5 |
+
pipeline_tag: text-to-speech
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
# このモデルの長所は幼げなおっとりしたボイス生成を商用・非商用問わず無料で自由に使える点です。
|
| 9 |
+
|
| 10 |
+
# The advantage of this model is that you can freely use the childish and unapologetic voice generation for free, both commercial and non-commercial.
|
| 11 |
+
|
| 12 |
+
このモデルはRikkaBotanのスイートバージョンです。
|
| 13 |
+
セリフの読み上げに適しています。
|
| 14 |
+
もしもっと硬く話してほしい場合は、[coolバージョン](https://huggingface.co/RikkaBotan/style_bert_vits2_jp_extra_cool_original)を試してみてください。
|
| 15 |
+
|
| 16 |
+
This model is sweet version.
|
| 17 |
+
It is suitable for reading emotional text.
|
| 18 |
+
If you want them to speak more descriptively, try the [cool version](https://huggingface.co/RikkaBotan/style_bert_vits2_jp_extra_cool_original).
|
| 19 |
+
|
| 20 |
+
# モデルのサンプル音声/sample voice
|
| 21 |
+
|
| 22 |
+
このモデルのサンプル音声①です
|
| 23 |
+
|
| 24 |
+
<audio controls src="https://cdn-uploads.huggingface.co/production/uploads/6629ba7d59854b02da014f64/13q0n3OJIHEu3_jjmd3dP.wav"></audio>
|
| 25 |
+
|
| 26 |
+
このモデルのサンプル音声②です。
|
| 27 |
+
|
| 28 |
+
<audio controls src="https://cdn-uploads.huggingface.co/production/uploads/6629ba7d59854b02da014f64/kTZpgEWmXRXz8_y9YFTpU.wav"></audio>
|
| 29 |
+
|
| 30 |
+
# モデルの説明/model description
|
| 31 |
+
|
| 32 |
+
このモデルはTTS(text-to-speech)モデルである、
|
| 33 |
+
style_bert_vits2_jp_extraを独自の音声データで学習させたモデルです。
|
| 34 |
+
style_bert_vits2_jp_extraは日本語に特化した音声生成モデルであり、
|
| 35 |
+
これまでのモデルと比較して高精度かつ自然な音声生成が可能となっています。
|
| 36 |
+
学習データはモデルを作成した研究者本人の音声のみであるため、
|
| 37 |
+
ライセンスはstyle_bert_vits2_jp_extraと同様に
|
| 38 |
+
商用・非商用問わず、自由に無料でご使用いただけます。
|
| 39 |
+
|
| 40 |
+
This model is a TTS (text-to-speech) model.
|
| 41 |
+
This is a model that has trained style_bert_vits2_jp_extra with my own voice data.
|
| 42 |
+
style_bert_vits2_jp_extra is a speech generation model specialized for Japanese.
|
| 43 |
+
Compared to previous models, it is possible to generate highly accurate and natural speech.
|
| 44 |
+
Since the training data is only the voice of the researcher who created the model,
|
| 45 |
+
The license is the same as style_bert_vits2_jp_extra
|
| 46 |
+
You can use it freely and free of charge, regardless of whether it is commercial or non-commercial.
|
| 47 |
+
|
| 48 |
+
# モデルを使うときのお約束/limitation
|
| 49 |
+
|
| 50 |
+
〇できること/What you can do
|
| 51 |
+
|
| 52 |
+
成果物の加工 Processing of deliverables
|
| 53 |
+
|
| 54 |
+
成果物の商用利用 Commercial use of deliverables
|
| 55 |
+
|
| 56 |
+
成果物の学習素材としての利用 Use of deliverables as learning materials
|
| 57 |
+
|
| 58 |
+
R-18、R-18G表現への利用(ただしゾーニングは必須です(小さなお友達のことをちゃんと考えてあげてね))
|
| 59 |
+
|
| 60 |
+
Use for R-18 and R-18G expressions (but zoning is required (please think about your little friends))
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
×できないこと/What you cannot do
|
| 64 |
+
|
| 65 |
+
音声モデルの二次配布 Secondary distribution of voice models
|
| 66 |
+
|
| 67 |
+
人を批判・攻撃すること Criticizing or attacking others
|
| 68 |
+
|
| 69 |
+
特定の政治的立場・宗教・思想への賛同または反対を呼びかけること Calling for support or opposition to a particular political position, religion, or ideology
|
| 70 |
+
|
| 71 |
+
刺激の強い表現をゾーニングなしで公開すること Publishing R-18 voice without zoning
|
| 72 |
+
|
| 73 |
+
なりすましなど、提供者に不利益をもたらすこと detrimental to the provider
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
# できればやって欲しいこと/If you like
|
| 77 |
+
X(Twitter)や説明文でこのモデルを使ったことを書いてもらえると作者が喜びます。(必須ではありません)
|
| 78 |
+
If you write that you are using this model, I will be glad!
|
| 79 |
+
|
| 80 |
+
# モデルの使い方/how to use
|
| 81 |
+
|
| 82 |
+
2通りの使用方法があります。必要に応じて選択してください。There are 2 ways to use model.
|
| 83 |
+
|
| 84 |
+
1.style-bert-vits2のアプリを使ってボイスを生成する/to use style-bert-vits2 app
|
| 85 |
+
|
| 86 |
+
①Style-Bert-VITS2 インストール先の Style-Bert-VITS2/model_assets/rikka_botan/ フォルダに config.json, safetensors, style_vectors.npy の 3ファイルを置きます。
|
| 87 |
+
Put 3 files on Style-Bert-VITS2/model_assets/rikka_botan/ folder
|
| 88 |
+
②以下のプログラムを実行します execute this program
|
| 89 |
+
|
| 90 |
+
```python
|
| 91 |
+
!git clone https://github.com/litagin02/Style-Bert-VITS2.git
|
| 92 |
+
%cd Style-Bert-VITS2/
|
| 93 |
+
!pip install -r requirements.txt
|
| 94 |
+
!python initialize.py --skip_jvnv
|
| 95 |
+
|
| 96 |
+
from google.colab import drive
|
| 97 |
+
drive.mount("/content/drive")
|
| 98 |
+
|
| 99 |
+
dataset_root = "/content/drive/MyDrive/Style-Bert-VITS2/Data"
|
| 100 |
+
assets_root = "/content/drive/MyDrive/Style-Bert-VITS2/model_assets"
|
| 101 |
+
import yaml
|
| 102 |
+
with open("configs/paths.yml", "w", encoding="utf-8") as f:
|
| 103 |
+
yaml.dump({"dataset_root": dataset_root, "assets_root": assets_root}, f)
|
| 104 |
+
|
| 105 |
+
!python app.py --share
|
| 106 |
+
```
|
| 107 |
+
③public URLにアクセスします。access public url
|
| 108 |
+
|
| 109 |
+
2.以下のコー���を利用します。use this code
|
| 110 |
+
|
| 111 |
+
```python
|
| 112 |
+
# At first, we will install the required libraries
|
| 113 |
+
!git clone https://github.com/litagin02/Style-Bert-VITS2.git
|
| 114 |
+
%cd Style-Bert-VITS2/
|
| 115 |
+
!pip install -r requirements.txt
|
| 116 |
+
!pip install style-bert-vits2 --no-build-isolation # To avoid bugs
|
| 117 |
+
|
| 118 |
+
# load Japanese bert model
|
| 119 |
+
from style_bert_vits2.nlp import bert_models
|
| 120 |
+
from style_bert_vits2.constants import Languages
|
| 121 |
+
|
| 122 |
+
bert_models.load_model(Languages.JP, "ku-nlp/deberta-v2-large-japanese-char-wwm")
|
| 123 |
+
bert_models.load_tokenizer(Languages.JP, "ku-nlp/deberta-v2-large-japanese-char-wwm")
|
| 124 |
+
|
| 125 |
+
# save model files to model_assets dir
|
| 126 |
+
from pathlib import Path
|
| 127 |
+
from huggingface_hub import hf_hub_download
|
| 128 |
+
|
| 129 |
+
model_file = "rikka_botan_mokyumokyu.safetensors"
|
| 130 |
+
config_file = "config.json"
|
| 131 |
+
style_file = "style_vectors.npy"
|
| 132 |
+
|
| 133 |
+
for file in [model_file, config_file, style_file]:
|
| 134 |
+
print(file)
|
| 135 |
+
hf_hub_download(
|
| 136 |
+
"RikkaBotan/style_bert_vits2_jp_extra_sweet_original",
|
| 137 |
+
file,
|
| 138 |
+
local_dir="model_assets"
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
# By using saved model, we will test text-to-speech demo
|
| 143 |
+
from style_bert_vits2.tts_model import TTSModel
|
| 144 |
+
|
| 145 |
+
assets_root = Path("model_assets")
|
| 146 |
+
|
| 147 |
+
model = TTSModel(
|
| 148 |
+
model_path=assets_root / model_file,
|
| 149 |
+
config_path=assets_root / config_file,
|
| 150 |
+
style_vec_path=assets_root / style_file,
|
| 151 |
+
device="cuda" # If you cannot use cuda, please input cpu
|
| 152 |
+
)
|
| 153 |
+
|
| 154 |
+
# Please input the Japanese text
|
| 155 |
+
from IPython.display import Audio, display
|
| 156 |
+
|
| 157 |
+
sr, audio = model.infer(text="ここに文章を入力してください")
|
| 158 |
+
display(Audio(audio, rate=sr))
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
# 謝辞/Acknowledgments
|
| 162 |
+
style-bert-vits2-jp-extraを開発してくださった[litagin](https://huggingface.co/litagin)さんに感謝いたします。
|
| 163 |
+
We would like to thank Mr./Ms. [litagin](https://huggingface.co/litagin) for developing style-bert-vits2-jp-extra
|