🚀 风格BERT-VITS2日语额外模型(冷酷版)
本项目是一个文本转语音(TTS)模型,基于style_bert_vits2_jp_extra模型使用特定语音数据训练而来,能够生成幼态沉稳的语音,可免费用于商业和非商业用途。
🚀 快速开始
你可以通过以下两种方式使用该模型:
方法一:使用style-bert-vits2应用程序生成语音
- 将
config.json
、safetensors
和 style_vectors.npy
这三个文件放置在 Style-Bert-VITS2/model_assets/rikka_botan/
文件夹中。可以使用以下程序自动保存文件:
from google.colab import drive
drive.mount("/content/drive")
%cd /content/drive/MyDrive/
!mkdir Style-Bert-VITS2/
%cd Style-Bert-VITS2/
!mkdir model_assets/
%cd model_assets/
!mkdir rikka_botan/
from huggingface_hub import snapshot_download
model_name = "RikkaBotan/style_bert_vits2_jp_extra_cool_original"
download_path = snapshot_download(
repo_id=model_name,
local_dir = f"rikka_botan/",
local_dir_use_symlinks=False
)
- 执行以下程序:
!git clone https://github.com/litagin02/Style-Bert-VITS2.git
%cd Style-Bert-VITS2/
!pip install -r requirements.txt
!python initialize.py --skip_jvnv
from google.colab import drive
drive.mount("/content/drive")
dataset_root = "/content/drive/MyDrive/Style-Bert-VITS2/Data"
assets_root = "/content/drive/MyDrive/Style-Bert-VITS2/model_assets"
import yaml
with open("configs/paths.yml", "w", encoding="utf-8") as f:
yaml.dump({"dataset_root": dataset_root, "assets_root": assets_root}, f)
!python app.py --share
- 访问公共URL。
方法二:使用以下代码
!git clone https://github.com/litagin02/Style-Bert-VITS2.git
%cd Style-Bert-VITS2/
!pip install -r requirements.txt
!pip install style-bert-vits2 --no-build-isolation
from style_bert_vits2.nlp import bert_models
from style_bert_vits2.constants import Languages
bert_models.load_model(Languages.JP, "ku-nlp/deberta-v2-large-japanese-char-wwm")
bert_models.load_tokenizer(Languages.JP, "ku-nlp/deberta-v2-large-japanese-char-wwm")
from pathlib import Path
from huggingface_hub import hf_hub_download
model_file = "rikka_botan_cool.safetensors"
config_file = "config.json"
style_file = "style_vectors.npy"
for file in [model_file, config_file, style_file]:
print(file)
hf_hub_download(
"RikkaBotan/style_bert_vits2_jp_extra_cool_original",
file,
local_dir="model_assets"
)
from style_bert_vits2.tts_model import TTSModel
assets_root = Path("model_assets")
model = TTSModel(
model_path=assets_root / model_file,
config_path=assets_root / config_file,
style_vec_path=assets_root / style_file,
device="cuda"
)
from IPython.display import Audio, display
sr, audio = model.infer(text="ここに文章を入力してください")
display(Audio(audio, rate=sr))
✨ 主要特性
- 能够生成幼态沉稳的语音,适用于解说类文本的朗读。
- 基于
style_bert_vits2_jp_extra
模型训练,在日语语音生成方面具有高精度和自然度。
- 支持多种使用场景,包括商业和非商业用途。
- 提供了不同风格的版本,如甜美版、英语版、ASMR版和中文版,满足多样化需求。
📦 安装指南
在使用模型前,你需要按照上述快速开始部分的步骤进行操作,包括克隆仓库、安装依赖库、下载模型文件等。
💻 使用示例
基础用法
在上述快速开始部分已经给出了使用该模型进行文本转语音的基础代码示例,你可以按照代码中的步骤进行操作。
📚 详细文档
模型说明
本模型是一个TTS(文本转语音)模型,是使用独特的语音数据对 style_bert_vits2_jp_extra
进行训练得到的。style_bert_vits2_jp_extra
是专门针对日语的语音生成模型,与以往的模型相比,能够生成高精度且自然的语音。由于训练数据仅为创建该模型的研究者本人的语音,因此该模型的许可与 style_bert_vits2_jp_extra
相同,可免费用于商业和非商业用途。
模型使用限制
可以做的事情
- 对生成的成果物进行加工。
- 对生成的成果物进行商业利用。
- 将生成的成果物用作学习素材。
- 用于R-18、R-18G表达(但必须进行分区处理,要考虑到未成年人)。
不可以做的事情
- 对语音模型进行二次分发。
- 批判或攻击他人。
- 呼吁支持或反对特定的政治立场、宗教或思想。
- 未经分区处理公开刺激性强的表达。
- 进行冒充等对提供者不利的行为。
商用VRM模型
还制作了简单的可用于商业用途的VRM(Vroid)模型,可用于AI主播和视频创作等场景。点击下载
期望事项
如果你能在X(原Twitter)或说明中提及使用了该模型,作者会非常高兴,但这并非强制要求。
🔧 技术细节
本模型是基于 style_bert_vits2_jp_extra
进行训练的,该模型是专门针对日语的语音生成模型。训练数据仅使用了模型创建者本人的语音,通过特定的训练方法对模型进行优化,从而实现了高精度和自然的语音生成。
📄 许可证
本模型采用CC BY-SA 4.0许可证,可免费用于商业和非商业用途。
📦 相关链接
📢 模型样例语音
样例语音①
样例语音②
📄 致谢
感谢 litagin 开发了 style-bert-vits2-jp-extra
模型。此外,本模型是基于众多开发者的努力而创建的,在此对前辈们的付出表示深深的感谢。