RikkaBotan commited on
Commit
921f902
·
verified ·
1 Parent(s): 6cb14b7

Update README.md

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