This commit is contained in:
pengoosedev 2024-02-18 23:02:19 +09:00
commit 133d0351ac
91 changed files with 144988 additions and 2724 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
docs
logs
output
reference
SoVITS_weights
.git

14
.gitignore vendored
View File

@ -1,2 +1,14 @@
.DS_Store
__pycache__
*.pyc
env
runtime
runtime
.idea
output
logs
reference
GPT_weights
SoVITS_weights
TEMP

3
Docker/damo.sha256 Normal file
View File

@ -0,0 +1,3 @@
5bba782a5e9196166233b9ab12ba04cadff9ef9212b4ff6153ed9290ff679025 /workspace/tools/damo_asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.pb
b3be75be477f0780277f3bae0fe489f48718f585f3a6e45d7dd1fbb1a4255fc5 /workspace/tools/damo_asr/models/speech_fsmn_vad_zh-cn-16k-common-pytorch/model.pb
a5818bb9d933805a916eebe41eb41648f7f9caad30b4bd59d56f3ca135421916 /workspace/tools/damo_asr/models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/model.pb

5
Docker/download.py Normal file
View File

@ -0,0 +1,5 @@
# Download moda ASR related models
from modelscope import snapshot_download
model_dir = snapshot_download('damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',revision="v2.0.4")
model_dir = snapshot_download('damo/speech_fsmn_vad_zh-cn-16k-common-pytorch',revision="v2.0.4")
model_dir = snapshot_download('damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',revision="v2.0.4")

11
Docker/download.sh Normal file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -Eeuo pipefail
echo "Downloading models..."
aria2c --disable-ipv6 --input-file /workspace/Docker/links.txt --dir /workspace --continue
echo "Checking SHA256..."
parallel --will-cite -a /workspace/Docker/links.sha256 "echo -n {} | sha256sum -c"

12
Docker/links.sha256 Normal file
View File

@ -0,0 +1,12 @@
b1c1e17e9c99547a89388f72048cd6e1b41b5a18b170e86a46dfde0324d63eb1 /workspace/GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt
fc579c1db3c1e21b721001cf99d7a584214280df19b002e200b630a34fa06eb8 /workspace/GPT_SoVITS/pretrained_models/s2D488k.pth
020a014e1e01e550e510f2f61fae5e5f5b6aab40f15c22f1f12f724df507e835 /workspace/GPT_SoVITS/pretrained_models/s2G488k.pth
24164f129c66499d1346e2aa55f183250c223161ec2770c0da3d3b08cf432d3c /workspace/GPT_SoVITS/pretrained_models/chinese-hubert-base/pytorch_model.bin
e53a693acc59ace251d143d068096ae0d7b79e4b1b503fa84c9dcf576448c1d8 /workspace/GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/pytorch_model.bin
39796caa5db18d7f9382d8ac997ac967bfd85f7761014bb807d2543cc844ef05 /workspace/tools/uvr5/uvr5_weights/HP2_all_vocals.pth
45e6b65199e781b4a6542002699be9f19cd3d1cb7d1558bc2bfbcd84674dfe28 /workspace/tools/uvr5/uvr5_weights/HP3_all_vocals.pth
5908891829634926119720241e8573d97cbeb8277110a7512bdb0bd7563258ee /workspace/tools/uvr5/uvr5_weights/HP5_only_main_vocal.pth
8c8fd1582f9aabc363e47af62ddb88df6cae7e064cae75bbf041a067a5e0aee2 /workspace/tools/uvr5/uvr5_weights/VR-DeEchoAggressive.pth
01376dd2a571bf3cb9cced680732726d2d732609d09216a610b0d110f133febe /workspace/tools/uvr5/uvr5_weights/VR-DeEchoDeReverb.pth
56aba59db3bcdd14a14464e62f3129698ecdea62eee0f003b9360923eb3ac79e /workspace/tools/uvr5/uvr5_weights/VR-DeEchoNormal.pth
233bb5c6aaa365e568659a0a81211746fa881f8f47f82d9e864fce1f7692db80 /workspace/tools/uvr5/uvr5_weights/onnx_dereverb_By_FoxJoy/vocals.onnx

34
Docker/links.txt Normal file
View File

@ -0,0 +1,34 @@
# GPT-SoVITS models
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/s1bert25hz-2kh-longer-epoch%3D68e-step%3D50232.ckpt
out=GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/s2D488k.pth
out=GPT_SoVITS/pretrained_models/s2D488k.pth
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/s2G488k.pth
out=GPT_SoVITS/pretrained_models/s2G488k.pth
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-hubert-base/config.json
out=GPT_SoVITS/pretrained_models/chinese-hubert-base/config.json
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-hubert-base/preprocessor_config.json
out=GPT_SoVITS/pretrained_models/chinese-hubert-base/preprocessor_config.json
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-hubert-base/pytorch_model.bin
out=GPT_SoVITS/pretrained_models/chinese-hubert-base/pytorch_model.bin
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-roberta-wwm-ext-large/config.json
out=GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/config.json
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-roberta-wwm-ext-large/pytorch_model.bin
out=GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/pytorch_model.bin
https://huggingface.co/lj1995/GPT-SoVITS/resolve/main/chinese-roberta-wwm-ext-large/tokenizer.json
out=GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large/tokenizer.json
# UVR5
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2_all_vocals.pth
out=tools/uvr5/uvr5_weights/HP2_all_vocals.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP3_all_vocals.pth
out=tools/uvr5/uvr5_weights/HP3_all_vocals.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5_only_main_vocal.pth
out=tools/uvr5/uvr5_weights/HP5_only_main_vocal.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoAggressive.pth
out=tools/uvr5/uvr5_weights/VR-DeEchoAggressive.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoDeReverb.pth
out=tools/uvr5/uvr5_weights/VR-DeEchoDeReverb.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/VR-DeEchoNormal.pth
out=tools/uvr5/uvr5_weights/VR-DeEchoNormal.pth
https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/onnx_dereverb_By_FoxJoy/vocals.onnx
out=tools/uvr5/uvr5_weights/onnx_dereverb_By_FoxJoy/vocals.onnx

45
Dockerfile Normal file
View File

@ -0,0 +1,45 @@
# Base CUDA image
FROM cnstark/pytorch:2.0.1-py3.9.17-cuda11.8.0-ubuntu20.04
LABEL maintainer="breakstring@hotmail.com"
LABEL version="dev-20240209"
LABEL description="Docker image for GPT-SoVITS"
# Install 3rd party apps
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN apt-get update && \
apt-get install -y --no-install-recommends tzdata ffmpeg libsox-dev parallel aria2 git git-lfs && \
git lfs install && \
rm -rf /var/lib/apt/lists/*
# Copy only requirements.txt initially to leverage Docker cache
WORKDIR /workspace
COPY requirements.txt /workspace/
RUN pip install --no-cache-dir -r requirements.txt
# Define a build-time argument for image type
ARG IMAGE_TYPE=full
# Conditional logic based on the IMAGE_TYPE argument
# Always copy the Docker directory, but only use it if IMAGE_TYPE is not "elite"
COPY ./Docker /workspace/Docker
# elite 类型的镜像里面不包含额外的模型
RUN if [ "$IMAGE_TYPE" != "elite" ]; then \
chmod +x /workspace/Docker/download.sh && \
/workspace/Docker/download.sh && \
python /workspace/Docker/download.py && \
python -m nltk.downloader averaged_perceptron_tagger cmudict; \
fi
# Copy the rest of the application
COPY . /workspace
# Copy the rest of the application
COPY . /workspace
EXPOSE 9871 9872 9873 9874 9880
CMD ["python", "webui.py"]

View File

@ -41,12 +41,13 @@ class DistributedBucketSampler(Sampler[T_co]):
if num_replicas is None:
if not dist.is_available():
raise RuntimeError("Requires distributed package to be available")
num_replicas = dist.get_world_size()
num_replicas = dist.get_world_size() if torch.cuda.is_available() else 1
if rank is None:
if not dist.is_available():
raise RuntimeError("Requires distributed package to be available")
rank = dist.get_rank()
torch.cuda.set_device(rank)
rank = dist.get_rank() if torch.cuda.is_available() else 0
if torch.cuda.is_available():
torch.cuda.set_device(rank)
if rank >= num_replicas or rank < 0:
raise ValueError(
"Invalid rank {}, rank should be in the interval"

View File

@ -41,7 +41,8 @@ class Text2SemanticDataModule(LightningDataModule):
# pad_val=self.config['data']['pad_val'])
def train_dataloader(self):
batch_size = self.config["train"]["batch_size"]
batch_size=self.config["train"]["batch_size"]//2 if self.config["train"].get("if_dpo",False)==True else self.config["train"]["batch_size"]
batch_size = max(min(batch_size,len(self._train_dataset)//4),1)#防止不保存
sampler = DistributedBucketSampler(self._train_dataset, batch_size=batch_size)
return DataLoader(
self._train_dataset,

View File

@ -11,7 +11,6 @@ from AR.models.t2s_model import Text2SemanticDecoder
from AR.modules.lr_schedulers import WarmupCosineLRSchedule
from AR.modules.optim import ScaledAdam
class Text2SemanticLightningModule(LightningModule):
def __init__(self, config, output_dir, is_train=True):
super().__init__()
@ -35,7 +34,8 @@ class Text2SemanticLightningModule(LightningModule):
def training_step(self, batch: Dict, batch_idx: int):
opt = self.optimizers()
scheduler = self.lr_schedulers()
loss, acc = self.model.forward(
forward=self.model.forward if self.config["train"].get("if_dpo",False)==True else self.model.forward_old
loss, acc = forward(
batch["phoneme_ids"],
batch["phoneme_ids_len"],
batch["semantic_ids"],

View File

@ -0,0 +1,106 @@
# modified from https://github.com/feng-yufei/shared_debugging_code/blob/main/model/t2s_lightning_module.py
import os, sys
now_dir = os.getcwd()
sys.path.append(now_dir)
from typing import Dict
import torch
from pytorch_lightning import LightningModule
from AR.models.t2s_model_onnx import Text2SemanticDecoder
from AR.modules.lr_schedulers import WarmupCosineLRSchedule
from AR.modules.optim import ScaledAdam
class Text2SemanticLightningModule(LightningModule):
def __init__(self, config, output_dir, is_train=True):
super().__init__()
self.config = config
self.top_k = 3
self.model = Text2SemanticDecoder(config=config, top_k=self.top_k)
pretrained_s1 = config.get("pretrained_s1")
if pretrained_s1 and is_train:
# print(self.load_state_dict(torch.load(pretrained_s1,map_location="cpu")["state_dict"]))
print(
self.load_state_dict(
torch.load(pretrained_s1, map_location="cpu")["weight"]
)
)
if is_train:
self.automatic_optimization = False
self.save_hyperparameters()
self.eval_dir = output_dir / "eval"
self.eval_dir.mkdir(parents=True, exist_ok=True)
def training_step(self, batch: Dict, batch_idx: int):
opt = self.optimizers()
scheduler = self.lr_schedulers()
loss, acc = self.model.forward(
batch["phoneme_ids"],
batch["phoneme_ids_len"],
batch["semantic_ids"],
batch["semantic_ids_len"],
batch["bert_feature"],
)
self.manual_backward(loss)
if batch_idx > 0 and batch_idx % 4 == 0:
opt.step()
opt.zero_grad()
scheduler.step()
self.log(
"total_loss",
loss,
on_step=True,
on_epoch=True,
prog_bar=True,
sync_dist=True,
)
self.log(
"lr",
scheduler.get_last_lr()[0],
on_epoch=True,
prog_bar=True,
sync_dist=True,
)
self.log(
f"top_{self.top_k}_acc",
acc,
on_step=True,
on_epoch=True,
prog_bar=True,
sync_dist=True,
)
def validation_step(self, batch: Dict, batch_idx: int):
return
def configure_optimizers(self):
model_parameters = self.model.parameters()
parameters_names = []
parameters_names.append(
[name_param_pair[0] for name_param_pair in self.model.named_parameters()]
)
lm_opt = ScaledAdam(
model_parameters,
lr=0.01,
betas=(0.9, 0.95),
clipping_scale=2.0,
parameters_names=parameters_names,
show_dominant_parameters=False,
clipping_update_period=1000,
)
return {
"optimizer": lm_opt,
"lr_scheduler": {
"scheduler": WarmupCosineLRSchedule(
lm_opt,
init_lr=self.config["optimizer"]["lr_init"],
peak_lr=self.config["optimizer"]["lr"],
end_lr=self.config["optimizer"]["lr_end"],
warmup_steps=self.config["optimizer"]["warmup_steps"],
total_steps=self.config["optimizer"]["decay_steps"],
)
},
}

View File

@ -8,6 +8,9 @@ from AR.models.utils import (
sample,
logits_to_probs,
multinomial_sample_one_no_sync,
dpo_loss,
make_reject_y,
get_batch_logps
)
from AR.modules.embedding import SinePositionalEmbedding
from AR.modules.embedding import TokenEmbedding
@ -85,11 +88,104 @@ class Text2SemanticDecoder(nn.Module):
ignore_index=self.EOS,
)
def make_input_data(self, x, x_lens, y, y_lens, bert_feature):
x = self.ar_text_embedding(x)
x = x + self.bert_proj(bert_feature.transpose(1, 2))
x = self.ar_text_position(x)
x_mask = make_pad_mask(x_lens)
y_mask = make_pad_mask(y_lens)
y_mask_int = y_mask.type(torch.int64)
codes = y.type(torch.int64) * (1 - y_mask_int)
# Training
# AR Decoder
y, targets = self.pad_y_eos(codes, y_mask_int, eos_id=self.EOS)
x_len = x_lens.max()
y_len = y_lens.max()
y_emb = self.ar_audio_embedding(y)
y_pos = self.ar_audio_position(y_emb)
xy_padding_mask = torch.concat([x_mask, y_mask], dim=1)
ar_xy_padding_mask = xy_padding_mask
x_attn_mask = F.pad(
torch.zeros((x_len, x_len), dtype=torch.bool, device=x.device),
(0, y_len),
value=True,
)
y_attn_mask = F.pad(
torch.triu(
torch.ones(y_len, y_len, dtype=torch.bool, device=x.device),
diagonal=1,
),
(x_len, 0),
value=False,
)
xy_attn_mask = torch.concat([x_attn_mask, y_attn_mask], dim=0)
bsz, src_len = x.shape[0], x_len + y_len
_xy_padding_mask = (
ar_xy_padding_mask.view(bsz, 1, 1, src_len)
.expand(-1, self.num_head, -1, -1)
.reshape(bsz * self.num_head, 1, src_len)
)
xy_attn_mask = xy_attn_mask.logical_or(_xy_padding_mask)
new_attn_mask = torch.zeros_like(xy_attn_mask, dtype=x.dtype)
new_attn_mask.masked_fill_(xy_attn_mask, float("-inf"))
xy_attn_mask = new_attn_mask
# x 和完整的 y 一次性输入模型
xy_pos = torch.concat([x, y_pos], dim=1)
return xy_pos, xy_attn_mask, targets
def forward(self, x, x_lens, y, y_lens, bert_feature):
"""
x: phoneme_ids
y: semantic_ids
"""
reject_y, reject_y_lens = make_reject_y(y, y_lens)
xy_pos, xy_attn_mask, targets = self.make_input_data(x, x_lens, y, y_lens, bert_feature)
xy_dec, _ = self.h(
(xy_pos, None),
mask=xy_attn_mask,
)
x_len = x_lens.max()
logits = self.ar_predict_layer(xy_dec[:, x_len:])
###### DPO #############
reject_xy_pos, reject_xy_attn_mask, reject_targets = self.make_input_data(x, x_lens, reject_y, reject_y_lens, bert_feature)
reject_xy_dec, _ = self.h(
(reject_xy_pos, None),
mask=reject_xy_attn_mask,
)
x_len = x_lens.max()
reject_logits = self.ar_predict_layer(reject_xy_dec[:, x_len:])
# loss
# from feiteng: 每次 duration 越多, 梯度更新也应该更多, 所以用 sum
loss_1 = F.cross_entropy(logits.permute(0, 2, 1), targets, reduction="sum")
acc = self.ar_accuracy_metric(logits.permute(0, 2, 1).detach(), targets).item()
A_logits, R_logits = get_batch_logps(logits, reject_logits, targets, reject_targets)
loss_2, _, _ = dpo_loss(A_logits, R_logits, 0, 0, 0.2, reference_free=True)
loss = loss_1 + loss_2
return loss, acc
def forward_old(self, x, x_lens, y, y_lens, bert_feature):
"""
x: phoneme_ids
y: semantic_ids
"""
x = self.ar_text_embedding(x)
x = x + self.bert_proj(bert_feature.transpose(1, 2))
x = self.ar_text_position(x)
@ -231,6 +327,7 @@ class Text2SemanticDecoder(nn.Module):
prompts, ####参考音频token
bert_feature,
top_k: int = -100,
top_p: int = 100,
early_stop_num: int = -1,
temperature: float = 1.0,
):
@ -240,7 +337,7 @@ class Text2SemanticDecoder(nn.Module):
# AR Decoder
y = prompts
prefix_len = y.shape[1]
x_len = x.shape[1]
x_attn_mask = torch.zeros((x_len, x_len), dtype=torch.bool)
stop = False
@ -256,55 +353,55 @@ class Text2SemanticDecoder(nn.Module):
"first_infer": 1,
"stage": 0,
}
for idx in tqdm(range(1500)):
if cache["first_infer"] == 1:
y_emb = self.ar_audio_embedding(y)
else:
y_emb = torch.cat(
[cache["y_emb"], self.ar_audio_embedding(y[:, -1:])], 1
)
cache["y_emb"] = y_emb
################### first step ##########################
if y is not None:
y_emb = self.ar_audio_embedding(y)
y_len = y_emb.shape[1]
prefix_len = y.shape[1]
y_pos = self.ar_audio_position(y_emb)
# x 和逐渐增长的 y 一起输入给模型
if cache["first_infer"] == 1:
xy_pos = torch.concat([x, y_pos], dim=1)
else:
xy_pos = y_pos[:, -1:]
y_len = y_pos.shape[1]
###以下3个不做缓存
if cache["first_infer"] == 1:
x_attn_mask_pad = F.pad(
xy_pos = torch.concat([x, y_pos], dim=1)
cache["y_emb"] = y_emb
ref_free = False
else:
y_emb = None
y_len = 0
prefix_len = 0
y_pos = None
xy_pos = x
y = torch.zeros(x.shape[0], 0, dtype=torch.int, device=x.device)
ref_free = True
x_attn_mask_pad = F.pad(
x_attn_mask,
(0, y_len), ###xx的纯0扩展到xx纯0+xy纯1(x,x+y)
value=True,
)
y_attn_mask = F.pad( ###yy的右上1扩展到左边xy的0,(y,x+y)
torch.triu(torch.ones(y_len, y_len, dtype=torch.bool), diagonal=1),
(x_len, 0),
value=False,
)
xy_attn_mask = torch.concat([x_attn_mask_pad, y_attn_mask], dim=0).to(
y.device
)
else:
###最右边一列(是错的)
# xy_attn_mask=torch.ones((1, x_len+y_len), dtype=torch.bool,device=xy_pos.device)
# xy_attn_mask[:,-1]=False
###最下面一行(是对的)
xy_attn_mask = torch.zeros(
(1, x_len + y_len), dtype=torch.bool, device=xy_pos.device
)
# pdb.set_trace()
###缓存重头戏
# print(1111,xy_pos.shape,xy_attn_mask.shape,x_len,y_len)
y_attn_mask = F.pad( ###yy的右上1扩展到左边xy的0,(y,x+y)
torch.triu(torch.ones(y_len, y_len, dtype=torch.bool), diagonal=1),
(x_len, 0),
value=False,
)
xy_attn_mask = torch.concat([x_attn_mask_pad, y_attn_mask], dim=0).to(
x.device
)
for idx in tqdm(range(1500)):
xy_dec, _ = self.h((xy_pos, None), mask=xy_attn_mask, cache=cache)
logits = self.ar_predict_layer(
xy_dec[:, -1]
) ##不用改如果用了cache的默认就是只有一帧取最后一帧一样的
# samples = topk_sampling(logits, top_k=top_k, top_p=1.0, temperature=temperature)
if(idx==0):###第一次跑不能EOS否则没有了
logits = logits[:, :-1] ###刨除1024终止符号的概率
samples = sample(
logits[0], y, top_k=top_k, top_p=1.0, repetition_penalty=1.35
logits[0], y, top_k=top_k, top_p=top_p, repetition_penalty=1.35, temperature=temperature
)[0].unsqueeze(0)
# 本次生成的 semantic_ids 和之前的 y 构成新的 y
# print(samples.shape)#[1,1]#第一个1是bs
y = torch.concat([y, samples], dim=1)
if early_stop_num != -1 and (y.shape[1] - prefix_len) > early_stop_num:
print("use early stop num:", early_stop_num)
stop = True
@ -313,13 +410,38 @@ class Text2SemanticDecoder(nn.Module):
# print(torch.argmax(logits, dim=-1)[0] == self.EOS, samples[0, 0] == self.EOS)
stop = True
if stop:
if prompts.shape[1] == y.shape[1]:
# if prompts.shape[1] == y.shape[1]:
# y = torch.concat([y, torch.zeros_like(samples)], dim=1)
# print("bad zero prediction")
if y.shape[1]==0:
y = torch.concat([y, torch.zeros_like(samples)], dim=1)
print("bad zero prediction")
print(f"T2S Decoding EOS [{prefix_len} -> {y.shape[1]}]")
break
# 本次生成的 semantic_ids 和之前的 y 构成新的 y
# print(samples.shape)#[1,1]#第一个1是bs
y = torch.concat([y, samples], dim=1)
####################### update next step ###################################
cache["first_infer"] = 0
return y, idx
if cache["y_emb"] is not None:
y_emb = torch.cat(
[cache["y_emb"], self.ar_audio_embedding(y[:, -1:])], dim = 1
)
cache["y_emb"] = y_emb
y_pos = self.ar_audio_position(y_emb)
xy_pos = y_pos[:, -1:]
else:
y_emb = self.ar_audio_embedding(y[:, -1:])
cache["y_emb"] = y_emb
y_pos = self.ar_audio_position(y_emb)
xy_pos = y_pos
y_len = y_pos.shape[1]
###最右边一列(是错的)
# xy_attn_mask=torch.ones((1, x_len+y_len), dtype=torch.bool,device=xy_pos.device)
# xy_attn_mask[:,-1]=False
###最下面一行(是对的)
xy_attn_mask = torch.zeros(
(1, x_len + y_len), dtype=torch.bool, device=xy_pos.device
)
if ref_free:
return y[:, :-1], 0
return y[:, :-1], idx-1

View File

@ -0,0 +1,337 @@
# modified from https://github.com/feng-yufei/shared_debugging_code/blob/main/model/t2s_model.py
import torch
from tqdm import tqdm
from AR.modules.embedding_onnx import SinePositionalEmbedding
from AR.modules.embedding_onnx import TokenEmbedding
from AR.modules.transformer_onnx import LayerNorm
from AR.modules.transformer_onnx import TransformerEncoder
from AR.modules.transformer_onnx import TransformerEncoderLayer
from torch import nn
from torch.nn import functional as F
from torchmetrics.classification import MulticlassAccuracy
default_config = {
"embedding_dim": 512,
"hidden_dim": 512,
"num_head": 8,
"num_layers": 12,
"num_codebook": 8,
"p_dropout": 0.0,
"vocab_size": 1024 + 1,
"phoneme_vocab_size": 512,
"EOS": 1024,
}
inf_tensor_value = torch.FloatTensor([-float("Inf")]).float()
def logits_to_probs(
logits,
previous_tokens = None,
temperature: float = 1.0,
top_k = None,
top_p = None,
repetition_penalty: float = 1.0,
):
previous_tokens = previous_tokens.squeeze()
if previous_tokens is not None and repetition_penalty != 1.0:
previous_tokens = previous_tokens.long()
score = torch.gather(logits, dim=0, index=previous_tokens)
score = torch.where(
score < 0, score * repetition_penalty, score / repetition_penalty
)
logits.scatter_(dim=0, index=previous_tokens, src=score)
if top_p is not None and top_p < 1.0:
sorted_logits, sorted_indices = torch.sort(logits, descending=True)
cum_probs = torch.cumsum(
torch.nn.functional.softmax(sorted_logits, dim=-1), dim=-1
)
sorted_indices_to_remove = cum_probs > top_p
sorted_indices_to_remove[0] = False # keep at least one option
indices_to_remove = sorted_indices_to_remove.scatter(
dim=0, index=sorted_indices, src=sorted_indices_to_remove
)
logits = logits.masked_fill(indices_to_remove, -float("Inf"))
logits = logits / max(temperature, 1e-5)
if top_k is not None:
v, _ = torch.topk(logits, top_k)
pivot = v.select(-1, -1).unsqueeze(-1)
logits = torch.where(logits < pivot, inf_tensor_value, logits)
probs = torch.nn.functional.softmax(logits, dim=-1)
return probs
def multinomial_sample_one_no_sync(
probs_sort
): # Does multinomial sampling without a cuda synchronization
q = torch.randn_like(probs_sort)
return torch.argmax(probs_sort / q, dim=-1, keepdim=True).to(dtype=torch.int)
def sample(
logits,
previous_tokens,
**sampling_kwargs,
):
probs = logits_to_probs(
logits=logits, previous_tokens=previous_tokens, **sampling_kwargs
)
idx_next = multinomial_sample_one_no_sync(probs)
return idx_next, probs
class OnnxEncoder(nn.Module):
def __init__(self, ar_text_embedding, bert_proj, ar_text_position):
super().__init__()
self.ar_text_embedding = ar_text_embedding
self.bert_proj = bert_proj
self.ar_text_position = ar_text_position
def forward(self, x, bert_feature):
x = self.ar_text_embedding(x)
x = x + self.bert_proj(bert_feature.transpose(1, 2))
return self.ar_text_position(x)
class T2SFirstStageDecoder(nn.Module):
def __init__(self, ar_audio_embedding, ar_audio_position, h, ar_predict_layer, loss_fct, ar_accuracy_metric,
top_k, early_stop_num, num_layers):
super().__init__()
self.ar_audio_embedding = ar_audio_embedding
self.ar_audio_position = ar_audio_position
self.h = h
self.ar_predict_layer = ar_predict_layer
self.loss_fct = loss_fct
self.ar_accuracy_metric = ar_accuracy_metric
self.top_k = top_k
self.early_stop_num = early_stop_num
self.num_layers = num_layers
def forward(self, x, prompt):
y = prompt
x_example = x[:,:,0] * 0.0
#N, 1, 512
cache = {
"all_stage": self.num_layers,
"k": None,
"v": None,
"y_emb": None,
"first_infer": 1,
"stage": 0,
}
y_emb = self.ar_audio_embedding(y)
cache["y_emb"] = y_emb
y_pos = self.ar_audio_position(y_emb)
xy_pos = torch.concat([x, y_pos], dim=1)
y_example = y_pos[:,:,0] * 0.0
x_attn_mask = torch.matmul(x_example.transpose(0, 1) , x_example).bool()
y_attn_mask = torch.ones_like(torch.matmul(y_example.transpose(0, 1), y_example), dtype=torch.int64)
y_attn_mask = torch.cumsum(y_attn_mask, dim=1) - torch.cumsum(
torch.ones_like(y_example.transpose(0, 1), dtype=torch.int64), dim=0
)
y_attn_mask = y_attn_mask > 0
x_y_pad = torch.matmul(x_example.transpose(0, 1), y_example).bool()
y_x_pad = torch.matmul(y_example.transpose(0, 1), x_example).bool()
x_attn_mask_pad = torch.cat([x_attn_mask, torch.ones_like(x_y_pad)], dim=1)
y_attn_mask = torch.cat([y_x_pad, y_attn_mask], dim=1)
xy_attn_mask = torch.concat([x_attn_mask_pad, y_attn_mask], dim=0)
cache["k"] = torch.matmul(x_attn_mask_pad[0].float().unsqueeze(-1), torch.zeros((1, 512)))\
.unsqueeze(1).repeat(self.num_layers, 1, 1, 1)
cache["v"] = torch.matmul(x_attn_mask_pad[0].float().unsqueeze(-1), torch.zeros((1, 512)))\
.unsqueeze(1).repeat(self.num_layers, 1, 1, 1)
xy_dec = self.h(xy_pos, mask=xy_attn_mask, cache=cache)
logits = self.ar_predict_layer(xy_dec[:, -1])
samples = sample(logits[0], y, top_k=self.top_k, top_p=1.0, repetition_penalty=1.35)[0].unsqueeze(0)
y = torch.concat([y, samples], dim=1)
return y, cache["k"], cache["v"], cache["y_emb"], x_example
class T2SStageDecoder(nn.Module):
def __init__(self, ar_audio_embedding, ar_audio_position, h, ar_predict_layer, loss_fct, ar_accuracy_metric,
top_k, early_stop_num, num_layers):
super().__init__()
self.ar_audio_embedding = ar_audio_embedding
self.ar_audio_position = ar_audio_position
self.h = h
self.ar_predict_layer = ar_predict_layer
self.loss_fct = loss_fct
self.ar_accuracy_metric = ar_accuracy_metric
self.top_k = top_k
self.early_stop_num = early_stop_num
self.num_layers = num_layers
def forward(self, y, k, v, y_emb, x_example):
cache = {
"all_stage": self.num_layers,
"k": torch.nn.functional.pad(k, (0, 0, 0, 0, 0, 1)),
"v": torch.nn.functional.pad(v, (0, 0, 0, 0, 0, 1)),
"y_emb": y_emb,
"first_infer": 0,
"stage": 0,
}
y_emb = torch.cat(
[cache["y_emb"], self.ar_audio_embedding(y[:, -1:])], 1
)
cache["y_emb"] = y_emb
y_pos = self.ar_audio_position(y_emb)
xy_pos = y_pos[:, -1:]
y_example = y_pos[:,:,0] * 0.0
xy_attn_mask = torch.cat([x_example, y_example], dim=1)
xy_attn_mask = torch.zeros_like(xy_attn_mask, dtype=torch.bool)
xy_dec = self.h(xy_pos, mask=xy_attn_mask, cache=cache)
logits = self.ar_predict_layer(xy_dec[:, -1])
samples = sample(logits[0], y, top_k=self.top_k, top_p=1.0, repetition_penalty=1.35)[0].unsqueeze(0)
y = torch.concat([y, samples], dim=1)
return y, cache["k"], cache["v"], cache["y_emb"], logits, samples
class Text2SemanticDecoder(nn.Module):
def __init__(self, config, norm_first=False, top_k=3):
super(Text2SemanticDecoder, self).__init__()
self.model_dim = config["model"]["hidden_dim"]
self.embedding_dim = config["model"]["embedding_dim"]
self.num_head = config["model"]["head"]
self.num_layers = config["model"]["n_layer"]
self.norm_first = norm_first
self.vocab_size = config["model"]["vocab_size"]
self.phoneme_vocab_size = config["model"]["phoneme_vocab_size"]
self.p_dropout = float(config["model"]["dropout"])
self.EOS = config["model"]["EOS"]
self.norm_first = norm_first
assert self.EOS == self.vocab_size - 1
self.bert_proj = nn.Linear(1024, self.embedding_dim)
self.ar_text_embedding = TokenEmbedding(self.embedding_dim, self.phoneme_vocab_size, self.p_dropout)
self.ar_text_position = SinePositionalEmbedding(self.embedding_dim, dropout=0.1, scale=False, alpha=True)
self.ar_audio_embedding = TokenEmbedding(self.embedding_dim, self.vocab_size, self.p_dropout)
self.ar_audio_position = SinePositionalEmbedding(self.embedding_dim, dropout=0.1, scale=False, alpha=True)
self.h = TransformerEncoder(
TransformerEncoderLayer(
d_model=self.model_dim,
nhead=self.num_head,
dim_feedforward=self.model_dim * 4,
dropout=0.1,
batch_first=True,
norm_first=norm_first,
),
num_layers=self.num_layers,
norm=LayerNorm(self.model_dim) if norm_first else None,
)
self.ar_predict_layer = nn.Linear(self.model_dim, self.vocab_size, bias=False)
self.loss_fct = nn.CrossEntropyLoss(reduction="sum")
self.ar_accuracy_metric = MulticlassAccuracy(
self.vocab_size,
top_k=top_k,
average="micro",
multidim_average="global",
ignore_index=self.EOS,
)
self.top_k = torch.LongTensor([1])
self.early_stop_num = torch.LongTensor([-1])
def init_onnx(self):
self.onnx_encoder = OnnxEncoder(self.ar_text_embedding, self.bert_proj, self.ar_text_position)
self.first_stage_decoder = T2SFirstStageDecoder(self.ar_audio_embedding, self.ar_audio_position, self.h,
self.ar_predict_layer, self.loss_fct, self.ar_accuracy_metric, self.top_k, self.early_stop_num,
self.num_layers)
self.stage_decoder = T2SStageDecoder(self.ar_audio_embedding, self.ar_audio_position, self.h,
self.ar_predict_layer, self.loss_fct, self.ar_accuracy_metric, self.top_k, self.early_stop_num,
self.num_layers)
def forward(self, x, prompts, bert_feature):
early_stop_num = self.early_stop_num
prefix_len = prompts.shape[1]
x = self.onnx_encoder(x, bert_feature)
y, k, v, y_emb, stage, x_example = self.first_stage_decoder(x, prompts)
stop = False
for idx in range(1, 1500):
enco = self.stage_decoder(y, k, v, y_emb, stage, x_example)
y, k, v, y_emb, stage, logits, samples = enco
if early_stop_num != -1 and (y.shape[1] - prefix_len) > early_stop_num:
stop = True
if torch.argmax(logits, dim=-1)[0] == self.EOS or samples[0, 0] == self.EOS:
stop = True
if stop:
break
y[0, -1] = 0
return y, idx
def infer(self, x, prompts, bert_feature):
top_k = self.top_k
early_stop_num = self.early_stop_num
x = self.onnx_encoder(x, bert_feature)
y = prompts
prefix_len = y.shape[1]
x_len = x.shape[1]
x_example = x[:,:,0] * 0.0
x_attn_mask = torch.matmul(x_example.transpose(0, 1), x_example)
x_attn_mask = torch.zeros_like(x_attn_mask, dtype=torch.bool)
stop = False
cache = {
"all_stage": self.num_layers,
"k": [None] * self.num_layers,
"v": [None] * self.num_layers,
"y_emb": None,
"first_infer": 1,
"stage": 0,
}
for idx in range(1500):
if cache["first_infer"] == 1:
y_emb = self.ar_audio_embedding(y)
else:
y_emb = torch.cat(
[cache["y_emb"], self.ar_audio_embedding(y[:, -1:])], 1
)
cache["y_emb"] = y_emb
y_pos = self.ar_audio_position(y_emb)
if cache["first_infer"] == 1:
xy_pos = torch.concat([x, y_pos], dim=1)
else:
xy_pos = y_pos[:, -1:]
y_len = y_pos.shape[1]
if cache["first_infer"] == 1:
x_attn_mask_pad = F.pad(x_attn_mask, (0, y_len), value=True)
y_attn_mask = F.pad(
torch.triu(torch.ones(y_len, y_len, dtype=torch.bool), diagonal=1),
(x_len, 0), value=False
)
xy_attn_mask = torch.concat([x_attn_mask_pad, y_attn_mask], dim=0)
else:
xy_attn_mask = torch.zeros((1, x_len + y_len), dtype=torch.bool)
xy_dec = self.h(xy_pos, mask=xy_attn_mask, cache=cache)
logits = self.ar_predict_layer(xy_dec[:, -1])
samples = sample(logits[0], y, top_k=top_k, top_p=1.0, repetition_penalty=1.35)[0].unsqueeze(0)
if early_stop_num != -1 and (y.shape[1] - prefix_len) > early_stop_num:
stop = True
if torch.argmax(logits, dim=-1)[0] == self.EOS or samples[0, 0] == self.EOS:
stop = True
if stop:
if prompts.shape[1] == y.shape[1]:
y = torch.concat([y, torch.zeros_like(samples)], dim=1)
break
y = torch.concat([y, samples], dim=1)
cache["first_infer"] = 0
return y, idx

View File

@ -1,7 +1,7 @@
# modified from https://github.com/feng-yufei/shared_debugging_code/blob/main/model/utils.py\
import torch
import torch.nn.functional as F
from typing import Tuple
def sequence_mask(length, max_length=None):
if max_length is None:
@ -114,7 +114,8 @@ def logits_to_probs(
top_p: Optional[int] = None,
repetition_penalty: float = 1.0,
):
previous_tokens = previous_tokens.squeeze()
if previous_tokens is not None:
previous_tokens = previous_tokens.squeeze()
# print(logits.shape,previous_tokens.shape)
# pdb.set_trace()
if previous_tokens is not None and repetition_penalty != 1.0:
@ -158,3 +159,70 @@ def sample(
)
idx_next = multinomial_sample_one_no_sync(probs)
return idx_next, probs
def dpo_loss(policy_chosen_logps: torch.FloatTensor,
policy_rejected_logps: torch.FloatTensor,
reference_chosen_logps: torch.FloatTensor,
reference_rejected_logps: torch.FloatTensor,
beta: float,
reference_free: bool = False) -> Tuple[torch.FloatTensor, torch.FloatTensor, torch.FloatTensor]:
pi_logratios = policy_chosen_logps - policy_rejected_logps
ref_logratios = reference_chosen_logps - reference_rejected_logps
if reference_free:
ref_logratios = 0
logits = pi_logratios - ref_logratios
losses = -F.logsigmoid(beta * logits)
chosen_rewards = beta * (policy_chosen_logps - reference_chosen_logps).detach()
rejected_rewards = beta * (policy_rejected_logps - reference_rejected_logps).detach()
return losses.mean(), chosen_rewards, rejected_rewards
def get_batch_logps(logits_target: torch.FloatTensor, logits_reject: torch.FloatTensor, labels_target: torch.LongTensor, labels_reject: torch.LongTensor, average_log_prob: bool = False) -> Tuple[torch.FloatTensor, torch.FloatTensor]:
# dummy token; we'll ignore the losses on these tokens later
per_token_logps_target = torch.gather(logits_target.log_softmax(-1), dim=2, index=labels_target.unsqueeze(2)).squeeze(2)
per_token_logps_reject = torch.gather(logits_reject.log_softmax(-1), dim=2, index=labels_reject.unsqueeze(2)).squeeze(2)
return per_token_logps_target.sum(-1), per_token_logps_reject.sum(-1)
def make_reject_y(y_o, y_lens):
def repeat_P(y):
range_idx, _ = torch.randint(0, len(y), size=(2,)).sort()
pre = y[:range_idx[0]]
shf = y[range_idx[1]:]
range_text = y[range_idx[0]:range_idx[1]]
new_y = torch.cat([pre, range_text, range_text, shf])
return new_y
def lost_P(y):
range_idx, _ = torch.randint(0, len(y), size=(2,)).sort()
pre = y[:range_idx[0]]
shf = y[range_idx[1]:]
range_text = y[range_idx[0]:range_idx[1]]
new_y = torch.cat([pre, shf])
return new_y
bs = len(y_lens)
reject_y = []
reject_y_lens = []
for b in range(bs):
process_item_idx = torch.randint(0, 1, size=(1, ))[0]
if process_item_idx == 0:
new_y = repeat_P(y_o[b])
reject_y.append(new_y)
reject_y_lens.append(len(new_y))
elif process_item_idx==1:
new_y = lost_P(y_o[b])
reject_y.append(new_y)
reject_y_lens.append(len(new_y))
max_length = max(reject_y_lens)
for b in range(bs):
pad_length = max_length - reject_y_lens[b]
reject_y[b] = torch.cat([reject_y[b], torch.zeros(pad_length, dtype=y_o.dtype, device=y_o.device)], dim=0)
reject_y = torch.stack(reject_y, dim = 0)
reject_y_lens = torch.tensor(reject_y_lens, device=y_lens.device)
return reject_y, reject_y_lens

View File

@ -0,0 +1,178 @@
# modified from https://github.com/lifeiteng/vall-e/blob/main/valle/modules/activation.py
from typing import Optional
from typing import Tuple
import torch
from torch import Tensor
from torch.nn import Linear
from torch.nn import Module
from torch.nn.init import constant_
from torch.nn.init import xavier_normal_
from torch.nn.init import xavier_uniform_
from torch.nn.modules.linear import NonDynamicallyQuantizableLinear
from torch.nn.parameter import Parameter
from torch.nn import functional as F
from AR.modules.patched_mha_with_cache_onnx import multi_head_attention_forward_patched
class MultiheadAttention(Module):
__constants__ = ["batch_first"]
bias_k: Optional[torch.Tensor]
bias_v: Optional[torch.Tensor]
def __init__(
self,
embed_dim,
num_heads,
dropout=0.0,
bias=True,
add_bias_kv=False,
add_zero_attn=False,
kdim=None,
vdim=None,
batch_first=False,
linear1_cls=Linear,
linear2_cls=Linear,
device=None,
dtype=None,
) -> None:
factory_kwargs = {"device": device, "dtype": dtype}
super(MultiheadAttention, self).__init__()
self.embed_dim = embed_dim
self.kdim = kdim if kdim is not None else embed_dim
self.vdim = vdim if vdim is not None else embed_dim
self._qkv_same_embed_dim = self.kdim == embed_dim and self.vdim == embed_dim
self.num_heads = num_heads
self.dropout = dropout
self.batch_first = batch_first
self.head_dim = embed_dim // num_heads
assert (
self.head_dim * num_heads == self.embed_dim
), "embed_dim must be divisible by num_heads"
if add_bias_kv:
self.bias_k = Parameter(torch.empty((1, 1, embed_dim), **factory_kwargs))
self.bias_v = Parameter(torch.empty((1, 1, embed_dim), **factory_kwargs))
else:
self.bias_k = self.bias_v = None
if linear1_cls == Linear:
if not self._qkv_same_embed_dim:
self.q_proj_weight = Parameter(
torch.empty((embed_dim, embed_dim), **factory_kwargs)
)
self.k_proj_weight = Parameter(
torch.empty((embed_dim, self.kdim), **factory_kwargs)
)
self.v_proj_weight = Parameter(
torch.empty((embed_dim, self.vdim), **factory_kwargs)
)
self.register_parameter("in_proj_weight", None)
else:
self.in_proj_weight = Parameter(
torch.empty((3 * embed_dim, embed_dim), **factory_kwargs)
)
self.register_parameter("q_proj_weight", None)
self.register_parameter("k_proj_weight", None)
self.register_parameter("v_proj_weight", None)
if bias:
self.in_proj_bias = Parameter(
torch.empty(3 * embed_dim, **factory_kwargs)
)
else:
self.register_parameter("in_proj_bias", None)
self.out_proj = NonDynamicallyQuantizableLinear(
embed_dim, embed_dim, bias=bias, **factory_kwargs
)
self._reset_parameters()
else:
if not self._qkv_same_embed_dim:
raise NotImplementedError
else:
self.in_proj_linear = linear1_cls(
embed_dim, 3 * embed_dim, bias=bias, **factory_kwargs
)
self.in_proj_weight = self.in_proj_linear.weight
self.register_parameter("q_proj_weight", None)
self.register_parameter("k_proj_weight", None)
self.register_parameter("v_proj_weight", None)
if bias:
self.in_proj_bias = self.in_proj_linear.bias
else:
self.register_parameter("in_proj_bias", None)
self.out_proj = linear2_cls(
embed_dim, embed_dim, bias=bias, **factory_kwargs
)
if self.bias_k is not None:
xavier_normal_(self.bias_k)
if self.bias_v is not None:
xavier_normal_(self.bias_v)
self.add_zero_attn = add_zero_attn
def _reset_parameters(self):
if self._qkv_same_embed_dim:
xavier_uniform_(self.in_proj_weight)
else:
xavier_uniform_(self.q_proj_weight)
xavier_uniform_(self.k_proj_weight)
xavier_uniform_(self.v_proj_weight)
if self.in_proj_bias is not None:
constant_(self.in_proj_bias, 0.0)
constant_(self.out_proj.bias, 0.0)
if self.bias_k is not None:
xavier_normal_(self.bias_k)
if self.bias_v is not None:
xavier_normal_(self.bias_v)
def __setstate__(self, state):
# Support loading old MultiheadAttention checkpoints generated by v1.1.0
if "_qkv_same_embed_dim" not in state:
state["_qkv_same_embed_dim"] = True
super(MultiheadAttention, self).__setstate__(state)
def forward(
self,
query: Tensor,
key: Tensor,
value: Tensor,
key_padding_mask: Optional[Tensor] = None,
need_weights: bool = True,
attn_mask: Optional[Tensor] = None,
average_attn_weights: bool = True,
cache=None,
) -> Tuple[Tensor, Optional[Tensor]]:
any_nested = query.is_nested or key.is_nested or value.is_nested
query = key = value = query.transpose(1, 0)
attn_output = multi_head_attention_forward_patched(
query,
key,
value,
self.embed_dim,
self.num_heads,
self.in_proj_weight,
self.in_proj_bias,
self.bias_k,
self.bias_v,
self.add_zero_attn,
self.dropout,
self.out_proj.weight,
self.out_proj.bias,
training=self.training,
key_padding_mask=key_padding_mask,
need_weights=need_weights,
attn_mask=attn_mask,
average_attn_weights=average_attn_weights,
cache=cache,
)
return attn_output.transpose(1, 0)

View File

@ -0,0 +1,63 @@
# modified from https://github.com/lifeiteng/vall-e/blob/main/valle/modules/embedding.py
import math
import torch
from torch import nn
class TokenEmbedding(nn.Module):
def __init__(
self,
embedding_dim: int,
vocab_size: int,
dropout: float = 0.0,
):
super().__init__()
self.vocab_size = vocab_size
self.embedding_dim = embedding_dim
self.dropout = torch.nn.Dropout(p=dropout)
self.word_embeddings = nn.Embedding(self.vocab_size, self.embedding_dim)
@property
def weight(self) -> torch.Tensor:
return self.word_embeddings.weight
def embedding(self, index: int) -> torch.Tensor:
return self.word_embeddings.weight[index : index + 1]
def forward(self, x: torch.Tensor):
x = self.word_embeddings(x)
x = self.dropout(x)
return x
class SinePositionalEmbedding(nn.Module):
def __init__(
self,
embedding_dim: int,
dropout: float = 0.0,
scale: bool = False,
alpha: bool = False,
):
super().__init__()
self.embedding_dim = embedding_dim
self.x_scale = math.sqrt(embedding_dim) if scale else 1.0
self.alpha = nn.Parameter(torch.ones(1), requires_grad=alpha)
self.dropout = torch.nn.Dropout(p=dropout)
self.reverse = False
self.div_term = torch.exp(torch.arange(0, self.embedding_dim, 2) * -(math.log(10000.0) / self.embedding_dim))
def extend_pe(self, x):
position = torch.cumsum(torch.ones_like(x[:,:,0]), dim=1).transpose(0, 1)
scpe = (position * self.div_term).unsqueeze(0)
pe = torch.cat([torch.sin(scpe), torch.cos(scpe)]).permute(1, 2, 0)
pe = pe.contiguous().view(1, -1, self.embedding_dim)
return pe
def forward(self, x: torch.Tensor) -> torch.Tensor:
pe = self.extend_pe(x)
output = x.unsqueeze(-1) if x.ndim == 2 else x
output = output * self.x_scale + self.alpha * pe
return self.dropout(output)

View File

@ -5,8 +5,8 @@ from torch.nn.functional import (
_none_or_dtype,
_in_projection_packed,
)
# import torch
from torch.nn import functional as F
import torch
# Tensor = torch.Tensor
# from typing import Callable, List, Optional, Tuple, Union
@ -448,9 +448,11 @@ def multi_head_attention_forward_patched(
k = k.view(bsz, num_heads, src_len, head_dim)
v = v.view(bsz, num_heads, src_len, head_dim)
# with torch.backends.cuda.sdp_kernel(enable_flash=True, enable_math=True, enable_mem_efficient=True):
attn_output = scaled_dot_product_attention(
q, k, v, attn_mask, dropout_p, is_causal
)
attn_output = (
attn_output.permute(2, 0, 1, 3).contiguous().view(bsz * tgt_len, embed_dim)
)

View File

@ -0,0 +1,92 @@
from torch.nn.functional import *
from torch.nn.functional import (
_mha_shape_check,
_canonical_mask,
_none_or_dtype,
_in_projection_packed,
)
def multi_head_attention_forward_patched(
query,
key,
value,
embed_dim_to_check: int,
num_heads: int,
in_proj_weight,
in_proj_bias: Optional[Tensor],
bias_k: Optional[Tensor],
bias_v: Optional[Tensor],
add_zero_attn: bool,
dropout_p: float,
out_proj_weight: Tensor,
out_proj_bias: Optional[Tensor],
training: bool = True,
key_padding_mask: Optional[Tensor] = None,
need_weights: bool = True,
attn_mask: Optional[Tensor] = None,
use_separate_proj_weight: bool = False,
q_proj_weight: Optional[Tensor] = None,
k_proj_weight: Optional[Tensor] = None,
v_proj_weight: Optional[Tensor] = None,
static_k: Optional[Tensor] = None,
static_v: Optional[Tensor] = None,
average_attn_weights: bool = True,
is_causal: bool = False,
cache=None,
) -> Tuple[Tensor, Optional[Tensor]]:
# set up shape vars
_, _, embed_dim = query.shape
attn_mask = _canonical_mask(
mask=attn_mask,
mask_name="attn_mask",
other_type=None,
other_name="",
target_type=query.dtype,
check_other=False,
)
head_dim = embed_dim // num_heads
proj_qkv = linear(query, in_proj_weight, in_proj_bias)
proj_qkv = proj_qkv.unflatten(-1, (3, query.size(-1))).unsqueeze(0).transpose(0, -2).squeeze(-2).contiguous()
q, k, v = proj_qkv[0], proj_qkv[1], proj_qkv[2]
if cache["first_infer"] == 1:
cache["k"][cache["stage"]] = k
cache["v"][cache["stage"]] = v
else:
cache["k"][cache["stage"]] = torch.cat([cache["k"][cache["stage"]][:-1], k], 0)
cache["v"][cache["stage"]] = torch.cat([cache["v"][cache["stage"]][:-1], v], 0)
k = cache["k"][cache["stage"]]
v = cache["v"][cache["stage"]]
cache["stage"] = (cache["stage"] + 1) % cache["all_stage"]
attn_mask = _canonical_mask(
mask=attn_mask,
mask_name="attn_mask",
other_type=None,
other_name="",
target_type=q.dtype,
check_other=False,
)
attn_mask = attn_mask.unsqueeze(0)
q = q.view(-1, num_heads, head_dim).transpose(0, 1)
k = k.view(-1, num_heads, head_dim).transpose(0, 1)
v = v.view(-1, num_heads, head_dim).transpose(0, 1)
dropout_p = 0.0
attn_mask = attn_mask.unsqueeze(0)
q = q.view(num_heads, -1, head_dim).unsqueeze(0)
k = k.view(num_heads, -1, head_dim).unsqueeze(0)
v = v.view(num_heads, -1, head_dim).unsqueeze(0)
attn_output = scaled_dot_product_attention(
q, k, v, attn_mask, dropout_p, is_causal
)
attn_output = (
attn_output.permute(2, 0, 1, 3).contiguous().view(-1, embed_dim)
)
attn_output = linear(attn_output, out_proj_weight, out_proj_bias)
attn_output = attn_output.view(-1, 1, attn_output.size(1))
return attn_output

View File

@ -0,0 +1,292 @@
# modified from https://github.com/lifeiteng/vall-e/blob/main/valle/modules/transformer.py
import copy
import numbers
from functools import partial
from typing import Any
from typing import Callable
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
import torch
from AR.modules.activation_onnx import MultiheadAttention
from AR.modules.scaling import BalancedDoubleSwish
from torch import nn
from torch import Tensor
from torch.nn import functional as F
_shape_t = Union[int, List[int], torch.Size]
class LayerNorm(nn.Module):
__constants__ = ["normalized_shape", "eps", "elementwise_affine"]
normalized_shape: Tuple[int, ...]
eps: float
elementwise_affine: bool
def __init__(
self,
normalized_shape: _shape_t,
eps: float = 1e-5,
elementwise_affine: bool = True,
device=None,
dtype=None,
) -> None:
factory_kwargs = {"device": device, "dtype": dtype}
super(LayerNorm, self).__init__()
if isinstance(normalized_shape, numbers.Integral):
# mypy error: incompatible types in assignment
normalized_shape = (normalized_shape,) # type: ignore[assignment]
self.normalized_shape = tuple(normalized_shape) # type: ignore[arg-type]
self.eps = eps
self.elementwise_affine = elementwise_affine
if self.elementwise_affine:
self.weight = nn.Parameter(
torch.empty(self.normalized_shape, **factory_kwargs)
)
self.bias = nn.Parameter(
torch.empty(self.normalized_shape, **factory_kwargs)
)
else:
self.register_parameter("weight", None)
self.register_parameter("bias", None)
self.reset_parameters()
def reset_parameters(self) -> None:
if self.elementwise_affine:
nn.init.ones_(self.weight)
nn.init.zeros_(self.bias)
def forward(self, input: Tensor, embedding: Any = None) -> Tensor:
if isinstance(input, tuple):
input, embedding = input
return (
F.layer_norm(
input,
self.normalized_shape,
self.weight,
self.bias,
self.eps,
),
embedding,
)
assert embedding is None
return F.layer_norm(
input, self.normalized_shape, self.weight, self.bias, self.eps
)
def extra_repr(self) -> str:
return (
"{normalized_shape}, eps={eps}, "
"elementwise_affine={elementwise_affine}".format(**self.__dict__)
)
class IdentityNorm(nn.Module):
def __init__(
self,
d_model: int,
eps: float = 1e-5,
device=None,
dtype=None,
) -> None:
super(IdentityNorm, self).__init__()
def forward(self, input: Tensor, embedding: Any = None) -> Tensor:
if isinstance(input, tuple):
return input
assert embedding is None
return input
class TransformerEncoder(nn.Module):
r"""TransformerEncoder is a stack of N encoder layers. Users can build the
BERT(https://arxiv.org/abs/1810.04805) model with corresponding parameters.
Args:
encoder_layer: an instance of the TransformerEncoderLayer() class (required).
num_layers: the number of sub-encoder-layers in the encoder (required).
norm: the layer normalization component (optional).
enable_nested_tensor: if True, input will automatically convert to nested tensor
(and convert back on output). This will improve the overall performance of
TransformerEncoder when padding rate is high. Default: ``True`` (enabled).
Examples::
>>> encoder_layer = TransformerEncoderLayer(d_model=512, nhead=8)
>>> transformer_encoder = TransformerEncoder(encoder_layer, num_layers=6)
>>> src = torch.rand(10, 32, 512)
>>> out = transformer_encoder(src)
"""
__constants__ = ["norm"]
def __init__(self, encoder_layer, num_layers, norm=None):
super(TransformerEncoder, self).__init__()
self.layers = _get_clones(encoder_layer, num_layers)
self.num_layers = num_layers
self.norm = norm
def forward(
self,
src: Tensor,
mask: Optional[Tensor] = None,
src_key_padding_mask: Optional[Tensor] = None,
return_layer_states: bool = False,
cache=None,
) -> Tensor:
output = src
for mod in self.layers:
output = mod(
output,
src_mask=mask,
src_key_padding_mask=src_key_padding_mask,
cache=cache,
)
if self.norm is not None:
output = self.norm(output)
return output
class TransformerEncoderLayer(nn.Module):
__constants__ = ["batch_first", "norm_first"]
def __init__(
self,
d_model: int,
nhead: int,
dim_feedforward: int = 2048,
dropout: float = 0.1,
activation: Union[str, Callable[[Tensor], Tensor]] = F.relu,
batch_first: bool = False,
norm_first: bool = False,
device=None,
dtype=None,
linear1_self_attention_cls: nn.Module = nn.Linear,
linear2_self_attention_cls: nn.Module = nn.Linear,
linear1_feedforward_cls: nn.Module = nn.Linear,
linear2_feedforward_cls: nn.Module = nn.Linear,
layer_norm_cls: nn.Module = LayerNorm,
layer_norm_eps: float = 1e-5,
adaptive_layer_norm=False,
) -> None:
factory_kwargs = {"device": device, "dtype": dtype}
super(TransformerEncoderLayer, self).__init__()
self.self_attn = MultiheadAttention(
d_model, # 512 16
nhead,
dropout=dropout,
batch_first=batch_first,
linear1_cls=linear1_self_attention_cls,
linear2_cls=linear2_self_attention_cls,
**factory_kwargs,
)
self.linear1 = linear1_feedforward_cls(
d_model, dim_feedforward, **factory_kwargs
)
self.dropout = nn.Dropout(dropout)
self.linear2 = linear2_feedforward_cls(
dim_feedforward, d_model, **factory_kwargs
)
self.norm_first = norm_first
self.dropout1 = nn.Dropout(dropout)
self.dropout2 = nn.Dropout(dropout)
if isinstance(activation, str):
activation = _get_activation_fn(activation)
elif isinstance(activation, partial):
activation = activation(d_model)
elif activation == BalancedDoubleSwish:
activation = BalancedDoubleSwish(d_model)
self.activation = activation
norm1 = layer_norm_cls(d_model, eps=layer_norm_eps, **factory_kwargs)
if layer_norm_cls == IdentityNorm:
norm2 = BalancedBasicNorm(d_model, eps=layer_norm_eps, **factory_kwargs)
else:
norm2 = layer_norm_cls(d_model, eps=layer_norm_eps, **factory_kwargs)
if adaptive_layer_norm:
self.norm1 = AdaptiveLayerNorm(d_model, norm1)
self.norm2 = AdaptiveLayerNorm(d_model, norm2)
else:
self.norm1 = norm1
self.norm2 = norm2
def __setstate__(self, state):
super(TransformerEncoderLayer, self).__setstate__(state)
if not hasattr(self, "activation"):
self.activation = F.relu
def forward(
self,
src: Tensor,
src_mask: Optional[Tensor] = None,
src_key_padding_mask: Optional[Tensor] = None,
cache=None,
) -> Tensor:
x = src
stage_embedding = None
x = self.norm1(
x + self._sa_block(x, src_mask, src_key_padding_mask, cache=cache),
stage_embedding,
)
x = self.norm2(x + self._ff_block(x), stage_embedding)
return x
def _sa_block(
self,
x: Tensor,
attn_mask: Optional[Tensor],
key_padding_mask: Optional[Tensor],
cache=None,
) -> Tensor:
x = self.self_attn(
x,
x,
x,
attn_mask=attn_mask,
key_padding_mask=key_padding_mask,
need_weights=False,
cache=cache,
)
return self.dropout1(x)
def _ff_block(self, x: Tensor) -> Tensor:
x = self.linear2(self.dropout(self.activation(self.linear1(x))))
return self.dropout2(x)
class AdaptiveLayerNorm(nn.Module):
r"""Adaptive Layer Normalization"""
def __init__(self, d_model, norm) -> None:
super(AdaptiveLayerNorm, self).__init__()
self.project_layer = nn.Linear(d_model, 2 * d_model)
self.norm = norm
self.d_model = d_model
self.eps = self.norm.eps
def forward(self, input: Tensor, embedding: Tensor = None) -> Tensor:
if isinstance(input, tuple):
input, embedding = input
weight, bias = torch.split(
self.project_layer(embedding),
split_size_or_sections=self.d_model,
dim=-1,
)
return (weight * self.norm(input) + bias, embedding)
weight, bias = torch.split(
self.project_layer(embedding),
split_size_or_sections=self.d_model,
dim=-1,
)
return weight * self.norm(input) + bias
def _get_clones(module, N):
return nn.ModuleList([copy.deepcopy(module) for i in range(N)])

340
GPT_SoVITS/inference_gui.py Normal file
View File

@ -0,0 +1,340 @@
import sys
from PyQt5.QtCore import QEvent
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QLineEdit, QPushButton, QTextEdit
from PyQt5.QtWidgets import QGridLayout, QVBoxLayout, QWidget, QFileDialog, QStatusBar, QComboBox
import soundfile as sf
from tools.i18n.i18n import I18nAuto
i18n = I18nAuto()
from GPT_SoVITS.inference_webui import change_gpt_weights, change_sovits_weights, get_tts_wav
class GPTSoVITSGUI(QMainWindow):
def __init__(self):
super().__init__()
self.init_ui()
def init_ui(self):
self.setWindowTitle('GPT-SoVITS GUI')
self.setGeometry(800, 450, 950, 850)
self.setStyleSheet("""
QWidget {
background-color: #a3d3b1;
}
QTabWidget::pane {
background-color: #a3d3b1;
}
QTabWidget::tab-bar {
alignment: left;
}
QTabBar::tab {
background: #8da4bf;
color: #ffffff;
padding: 8px;
}
QTabBar::tab:selected {
background: #2a3f54;
}
QLabel {
color: #000000;
}
QPushButton {
background-color: #4CAF50;
color: white;
padding: 8px;
border: 1px solid #4CAF50;
border-radius: 4px;
}
QPushButton:hover {
background-color: #45a049;
border: 1px solid #45a049;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}
""")
license_text = (
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. "
"如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.")
license_label = QLabel(license_text)
license_label.setWordWrap(True)
self.GPT_model_label = QLabel("选择GPT模型:")
self.GPT_model_input = QLineEdit()
self.GPT_model_input.setPlaceholderText("拖拽或选择文件")
self.GPT_model_input.setReadOnly(True)
self.GPT_model_button = QPushButton("选择GPT模型文件")
self.GPT_model_button.clicked.connect(self.select_GPT_model)
self.SoVITS_model_label = QLabel("选择SoVITS模型:")
self.SoVITS_model_input = QLineEdit()
self.SoVITS_model_input.setPlaceholderText("拖拽或选择文件")
self.SoVITS_model_input.setReadOnly(True)
self.SoVITS_model_button = QPushButton("选择SoVITS模型文件")
self.SoVITS_model_button.clicked.connect(self.select_SoVITS_model)
self.ref_audio_label = QLabel("上传参考音频:")
self.ref_audio_input = QLineEdit()
self.ref_audio_input.setPlaceholderText("拖拽或选择文件")
self.ref_audio_input.setReadOnly(True)
self.ref_audio_button = QPushButton("选择音频文件")
self.ref_audio_button.clicked.connect(self.select_ref_audio)
self.ref_text_label = QLabel("参考音频文本:")
self.ref_text_input = QLineEdit()
self.ref_text_input.setPlaceholderText("拖拽或选择文件")
self.ref_text_input.setReadOnly(True)
self.ref_text_button = QPushButton("上传文本")
self.ref_text_button.clicked.connect(self.upload_ref_text)
self.language_label = QLabel("参考音频语言:")
self.language_combobox = QComboBox()
self.language_combobox.addItems(["中文", "英文", "日文"])
self.target_text_label = QLabel("合成目标文本:")
self.target_text_input = QLineEdit()
self.target_text_input.setPlaceholderText("拖拽或选择文件")
self.target_text_input.setReadOnly(True)
self.target_text_button = QPushButton("上传文本")
self.target_text_button.clicked.connect(self.upload_target_text)
self.language_label_02 = QLabel("合成音频语言:")
self.language_combobox_02 = QComboBox()
self.language_combobox_02.addItems(["中文", "英文", "日文"])
self.output_label = QLabel("输出音频路径:")
self.output_input = QLineEdit()
self.output_input.setPlaceholderText("拖拽或选择文件")
self.output_input.setReadOnly(True)
self.output_button = QPushButton("选择文件夹")
self.output_button.clicked.connect(self.select_output_path)
self.output_text = QTextEdit()
self.output_text.setReadOnly(True)
self.add_drag_drop_events([
self.GPT_model_input,
self.SoVITS_model_input,
self.ref_audio_input,
self.ref_text_input,
self.target_text_input,
self.output_input,
])
self.synthesize_button = QPushButton("合成")
self.synthesize_button.clicked.connect(self.synthesize)
self.clear_output_button = QPushButton("清空输出")
self.clear_output_button.clicked.connect(self.clear_output)
self.status_bar = QStatusBar()
main_layout = QVBoxLayout()
input_layout = QGridLayout()
input_layout.setSpacing(10)
self.setLayout(input_layout)
input_layout.addWidget(license_label, 0, 0, 1, 3)
input_layout.addWidget(self.GPT_model_label, 1, 0)
input_layout.addWidget(self.GPT_model_input, 2, 0, 1, 2)
input_layout.addWidget(self.GPT_model_button, 2, 2)
input_layout.addWidget(self.SoVITS_model_label, 3, 0)
input_layout.addWidget(self.SoVITS_model_input, 4, 0, 1, 2)
input_layout.addWidget(self.SoVITS_model_button, 4, 2)
input_layout.addWidget(self.ref_audio_label, 5, 0)
input_layout.addWidget(self.ref_audio_input, 6, 0, 1, 2)
input_layout.addWidget(self.ref_audio_button, 6, 2)
input_layout.addWidget(self.language_label, 7, 0)
input_layout.addWidget(self.language_combobox, 8, 0, 1, 1)
input_layout.addWidget(self.ref_text_label, 9, 0)
input_layout.addWidget(self.ref_text_input, 10, 0, 1, 2)
input_layout.addWidget(self.ref_text_button, 10, 2)
input_layout.addWidget(self.language_label_02, 11, 0)
input_layout.addWidget(self.language_combobox_02, 12, 0, 1, 1)
input_layout.addWidget(self.target_text_label, 13, 0)
input_layout.addWidget(self.target_text_input, 14, 0, 1, 2)
input_layout.addWidget(self.target_text_button, 14, 2)
input_layout.addWidget(self.output_label, 15, 0)
input_layout.addWidget(self.output_input, 16, 0, 1, 2)
input_layout.addWidget(self.output_button, 16, 2)
main_layout.addLayout(input_layout)
output_layout = QVBoxLayout()
output_layout.addWidget(self.output_text)
main_layout.addLayout(output_layout)
main_layout.addWidget(self.synthesize_button)
main_layout.addWidget(self.clear_output_button)
main_layout.addWidget(self.status_bar)
self.central_widget = QWidget()
self.central_widget.setLayout(main_layout)
self.setCentralWidget(self.central_widget)
def dragEnterEvent(self, event):
if event.mimeData().hasUrls():
event.acceptProposedAction()
def dropEvent(self, event):
if event.mimeData().hasUrls():
file_paths = [url.toLocalFile() for url in event.mimeData().urls()]
if len(file_paths) == 1:
self.update_ref_audio(file_paths[0])
self.update_input_paths(self.ref_audio_input, file_paths[0])
else:
self.update_ref_audio(", ".join(file_paths))
def add_drag_drop_events(self, widgets):
for widget in widgets:
widget.setAcceptDrops(True)
widget.installEventFilter(self)
def eventFilter(self, obj, event):
if event.type() == QEvent.DragEnter:
mime_data = event.mimeData()
if mime_data.hasUrls():
event.acceptProposedAction()
elif event.type() == QEvent.Drop:
mime_data = event.mimeData()
if mime_data.hasUrls():
file_paths = [url.toLocalFile() for url in mime_data.urls()]
if len(file_paths) == 1:
self.update_input_paths(obj, file_paths[0])
else:
self.update_input_paths(obj, ", ".join(file_paths))
event.acceptProposedAction()
return super().eventFilter(obj, event)
def select_GPT_model(self):
file_path, _ = QFileDialog.getOpenFileName(self, "选择GPT模型文件", "", "GPT Files (*.ckpt)")
if file_path:
self.GPT_model_input.setText(file_path)
def select_SoVITS_model(self):
file_path, _ = QFileDialog.getOpenFileName(self, "选择SoVITS模型文件", "", "SoVITS Files (*.pth)")
if file_path:
self.SoVITS_model_input.setText(file_path)
def select_ref_audio(self):
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
options |= QFileDialog.ShowDirsOnly
file_dialog = QFileDialog()
file_dialog.setOptions(options)
file_dialog.setFileMode(QFileDialog.AnyFile)
file_dialog.setNameFilter("Audio Files (*.wav *.mp3)")
if file_dialog.exec_():
file_paths = file_dialog.selectedFiles()
if len(file_paths) == 1:
self.update_ref_audio(file_paths[0])
self.update_input_paths(self.ref_audio_input, file_paths[0])
else:
self.update_ref_audio(", ".join(file_paths))
def upload_ref_text(self):
file_path, _ = QFileDialog.getOpenFileName(self, "选择文本文件", "", "Text Files (*.txt)")
if file_path:
with open(file_path, 'r', encoding='utf-8') as file:
content = file.read()
self.ref_text_input.setText(content)
self.update_input_paths(self.ref_text_input, file_path)
def upload_target_text(self):
file_path, _ = QFileDialog.getOpenFileName(self, "选择文本文件", "", "Text Files (*.txt)")
if file_path:
with open(file_path, 'r', encoding='utf-8') as file:
content = file.read()
self.target_text_input.setText(content)
self.update_input_paths(self.target_text_input, file_path)
def select_output_path(self):
options = QFileDialog.Options()
options |= QFileDialog.DontUseNativeDialog
options |= QFileDialog.ShowDirsOnly
folder_dialog = QFileDialog()
folder_dialog.setOptions(options)
folder_dialog.setFileMode(QFileDialog.Directory)
if folder_dialog.exec_():
folder_path = folder_dialog.selectedFiles()[0]
self.output_input.setText(folder_path)
def update_ref_audio(self, file_path):
self.ref_audio_input.setText(file_path)
def update_input_paths(self, input_box, file_path):
input_box.setText(file_path)
def clear_output(self):
self.output_text.clear()
def synthesize(self):
GPT_model_path = self.GPT_model_input.text()
SoVITS_model_path = self.SoVITS_model_input.text()
ref_audio_path = self.ref_audio_input.text()
language_combobox = self.language_combobox.currentText()
language_combobox = i18n(language_combobox)
ref_text = self.ref_text_input.text()
language_combobox_02 = self.language_combobox_02.currentText()
language_combobox_02 = i18n(language_combobox_02)
target_text = self.target_text_input.text()
output_path = self.output_input.text()
change_gpt_weights(gpt_path=GPT_model_path)
change_sovits_weights(sovits_path=SoVITS_model_path)
synthesis_result = get_tts_wav(ref_wav_path=ref_audio_path,
prompt_text=ref_text,
prompt_language=language_combobox,
text=target_text,
text_language=language_combobox_02)
result_list = list(synthesis_result)
if result_list:
last_sampling_rate, last_audio_data = result_list[-1]
output_wav_path = os.path.join(output_path, "output.wav")
sf.write(output_wav_path, last_audio_data, last_sampling_rate)
result = "Audio saved to " + output_wav_path
self.status_bar.showMessage("合成完成!输出路径:" + output_wav_path, 5000)
self.output_text.append("处理结果:\n" + result)
def main():
app = QApplication(sys.argv)
mainWin = GPTSoVITSGUI()
mainWin.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,354 @@
import math
import torch
from torch import nn
from torch.nn import functional as F
from module import commons
from module.modules import LayerNorm
class LayerNorm(nn.Module):
def __init__(self, channels, eps=1e-5):
super().__init__()
self.channels = channels
self.eps = eps
self.gamma = nn.Parameter(torch.ones(channels))
self.beta = nn.Parameter(torch.zeros(channels))
def forward(self, x):
x = x.transpose(1, -1)
x = F.layer_norm(x, (self.channels,), self.gamma, self.beta, self.eps)
return x.transpose(1, -1)
@torch.jit.script
def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels):
n_channels_int = n_channels[0]
in_act = input_a + input_b
t_act = torch.tanh(in_act[:, :n_channels_int, :])
s_act = torch.sigmoid(in_act[:, n_channels_int:, :])
acts = t_act * s_act
return acts
class Encoder(nn.Module):
def __init__(
self,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size=1,
p_dropout=0.0,
window_size=4,
isflow=True,
**kwargs
):
super().__init__()
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.window_size = window_size
# if isflow:
# cond_layer = torch.nn.Conv1d(256, 2*hidden_channels*n_layers, 1)
# self.cond_pre = torch.nn.Conv1d(hidden_channels, 2*hidden_channels, 1)
# self.cond_layer = weight_norm(cond_layer, name='weight')
# self.gin_channels = 256
self.cond_layer_idx = self.n_layers
if "gin_channels" in kwargs:
self.gin_channels = kwargs["gin_channels"]
if self.gin_channels != 0:
self.spk_emb_linear = nn.Linear(self.gin_channels, self.hidden_channels)
# vits2 says 3rd block, so idx is 2 by default
self.cond_layer_idx = (
kwargs["cond_layer_idx"] if "cond_layer_idx" in kwargs else 2
)
logging.debug(self.gin_channels, self.cond_layer_idx)
assert (
self.cond_layer_idx < self.n_layers
), "cond_layer_idx should be less than n_layers"
self.drop = nn.Dropout(p_dropout)
self.attn_layers = nn.ModuleList()
self.norm_layers_1 = nn.ModuleList()
self.ffn_layers = nn.ModuleList()
self.norm_layers_2 = nn.ModuleList()
for i in range(self.n_layers):
self.attn_layers.append(
MultiHeadAttention(
hidden_channels,
hidden_channels,
n_heads,
p_dropout=p_dropout,
window_size=window_size,
)
)
self.norm_layers_1.append(LayerNorm(hidden_channels))
self.ffn_layers.append(
FFN(
hidden_channels,
hidden_channels,
filter_channels,
kernel_size,
p_dropout=p_dropout,
)
)
self.norm_layers_2.append(LayerNorm(hidden_channels))
def forward(self, x, x_mask, g=None):
attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
x = x * x_mask
for i in range(self.n_layers):
if i == self.cond_layer_idx and g is not None:
g = self.spk_emb_linear(g.transpose(1, 2))
g = g.transpose(1, 2)
x = x + g
x = x * x_mask
y = self.attn_layers[i](x, x, attn_mask)
y = self.drop(y)
x = self.norm_layers_1[i](x + y)
y = self.ffn_layers[i](x, x_mask)
y = self.drop(y)
x = self.norm_layers_2[i](x + y)
x = x * x_mask
return x
class MultiHeadAttention(nn.Module):
def __init__(
self,
channels,
out_channels,
n_heads,
p_dropout=0.0,
window_size=None,
heads_share=True,
block_length=None,
proximal_bias=False,
proximal_init=False,
):
super().__init__()
assert channels % n_heads == 0
self.channels = channels
self.out_channels = out_channels
self.n_heads = n_heads
self.p_dropout = p_dropout
self.window_size = window_size
self.heads_share = heads_share
self.block_length = block_length
self.proximal_bias = proximal_bias
self.proximal_init = proximal_init
self.attn = None
self.k_channels = channels // n_heads
self.conv_q = nn.Conv1d(channels, channels, 1)
self.conv_k = nn.Conv1d(channels, channels, 1)
self.conv_v = nn.Conv1d(channels, channels, 1)
self.conv_o = nn.Conv1d(channels, out_channels, 1)
self.drop = nn.Dropout(p_dropout)
if window_size is not None:
n_heads_rel = 1 if heads_share else n_heads
rel_stddev = self.k_channels**-0.5
self.emb_rel_k = nn.Parameter(
torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels)
* rel_stddev
)
self.emb_rel_v = nn.Parameter(
torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels)
* rel_stddev
)
nn.init.xavier_uniform_(self.conv_q.weight)
nn.init.xavier_uniform_(self.conv_k.weight)
nn.init.xavier_uniform_(self.conv_v.weight)
if proximal_init:
with torch.no_grad():
self.conv_k.weight.copy_(self.conv_q.weight)
self.conv_k.bias.copy_(self.conv_q.bias)
def forward(self, x, c, attn_mask=None):
q = self.conv_q(x)
k = self.conv_k(c)
v = self.conv_v(c)
x, self.attn = self.attention(q, k, v, mask=attn_mask)
x = self.conv_o(x)
return x
def attention(self, query, key, value, mask=None):
# reshape [b, d, t] -> [b, n_h, t, d_k]
b, d, t_s, _ = (*key.size(), query.size(2))
query = query.view(b, self.n_heads, self.k_channels, -1).transpose(2, 3)
key = key.view(b, self.n_heads, self.k_channels, -1).transpose(2, 3)
value = value.view(b, self.n_heads, self.k_channels, -1).transpose(2, 3)
scores = torch.matmul(query / math.sqrt(self.k_channels), key.transpose(-2, -1))
if self.window_size is not None:
key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s)
rel_logits = self._matmul_with_relative_keys(query / math.sqrt(self.k_channels), key_relative_embeddings)
scores_local = self._relative_position_to_absolute_position(rel_logits)
scores = scores + scores_local
if mask is not None:
scores = scores.masked_fill(mask == 0, -1e4)
p_attn = F.softmax(scores, dim=-1)
p_attn = self.drop(p_attn)
output = torch.matmul(p_attn, value)
if self.window_size is not None:
relative_weights = self._absolute_position_to_relative_position(p_attn)
value_relative_embeddings = self._get_relative_embeddings(self.emb_rel_v, t_s)
output = output + self._matmul_with_relative_values(relative_weights, value_relative_embeddings)
output = (output.transpose(2, 3).contiguous().view(b, d, -1))
return output, p_attn
def _matmul_with_relative_values(self, x, y):
"""
x: [b, h, l, m]
y: [h or 1, m, d]
ret: [b, h, l, d]
"""
ret = torch.matmul(x, y.unsqueeze(0))
return ret
def _matmul_with_relative_keys(self, x, y):
"""
x: [b, h, l, d]
y: [h or 1, m, d]
ret: [b, h, l, m]
"""
ret = torch.matmul(x, y.unsqueeze(0).transpose(-2, -1))
return ret
def _get_relative_embeddings(self, relative_embeddings, length):
max_relative_position = 2 * self.window_size + 1
# Pad first before slice to avoid using cond ops.
pad_l = torch.zeros((1), dtype = torch.int64) + length - (self.window_size + 1)
pad_s = torch.zeros((1), dtype = torch.int64) + (self.window_size + 1) - length
pad_length = torch.max(pad_l, other=torch.zeros((1), dtype = torch.int64))
slice_start_position = torch.max(pad_s, other=torch.zeros((1), dtype = torch.int64))
slice_end_position = slice_start_position + 2 * length - 1
padded_relative_embeddings = F.pad(
relative_embeddings,
commons.convert_pad_shape([[0, 0], [pad_length, pad_length], [0, 0]]),
)
used_relative_embeddings = padded_relative_embeddings[
:, slice_start_position:slice_end_position
]
return used_relative_embeddings
def _relative_position_to_absolute_position(self, x):
"""
x: [b, h, l, 2*l-1]
ret: [b, h, l, l]
"""
batch, heads, length, _ = x.size()
# Concat columns of pad to shift from relative to absolute indexing.
x = F.pad(x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, 1]]))
# Concat extra elements so to add up to shape (len+1, 2*len-1).
x_flat = x.view([batch, heads, length * 2 * length])
x_flat = F.pad(
x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [0, length - 1]])
)
# Reshape and slice out the padded elements.
x_final = x_flat.view([batch, heads, length + 1, 2 * length - 1])[
:, :, :length, length - 1 :
]
return x_final
def _absolute_position_to_relative_position(self, x):
"""
x: [b, h, l, l]
ret: [b, h, l, 2*l-1]
"""
batch, heads, length, _ = x.size()
# padd along column
x = F.pad(
x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, length - 1]])
)
x_flat = x.view([batch, heads, length**2 + length * (length - 1)])
# add 0's in the beginning that will skew the elements after reshape
x_flat = F.pad(x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [length, 0]]))
x_final = x_flat.view([batch, heads, length, 2 * length])[:, :, :, 1:]
return x_final
def _attention_bias_proximal(self, length):
"""Bias for self-attention to encourage attention to close positions.
Args:
length: an integer scalar.
Returns:
a Tensor with shape [1, 1, length, length]
"""
r = torch.arange(length, dtype=torch.float32)
diff = torch.unsqueeze(r, 0) - torch.unsqueeze(r, 1)
return torch.unsqueeze(torch.unsqueeze(-torch.log1p(torch.abs(diff)), 0), 0)
class FFN(nn.Module):
def __init__(
self,
in_channels,
out_channels,
filter_channels,
kernel_size,
p_dropout=0.0,
activation=None,
causal=False,
):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.activation = activation
self.causal = causal
if causal:
self.padding = self._causal_padding
else:
self.padding = self._same_padding
self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size)
self.conv_2 = nn.Conv1d(filter_channels, out_channels, kernel_size)
self.drop = nn.Dropout(p_dropout)
def forward(self, x, x_mask):
x = self.conv_1(self.padding(x * x_mask))
if self.activation == "gelu":
x = x * torch.sigmoid(1.702 * x)
else:
x = torch.relu(x)
x = self.drop(x)
x = self.conv_2(self.padding(x * x_mask))
return x * x_mask
def _causal_padding(self, x):
if self.kernel_size == 1:
return x
pad_l = self.kernel_size - 1
pad_r = 0
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
x = F.pad(x, commons.convert_pad_shape(padding))
return x
def _same_padding(self, x):
if self.kernel_size == 1:
return x
pad_l = (self.kernel_size - 1) // 2
pad_r = self.kernel_size // 2
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
x = F.pad(x, commons.convert_pad_shape(padding))
return x

View File

@ -1,6 +1,8 @@
import time, logging
import time
import logging
import os
import random, traceback
import random
import traceback
import numpy as np
import torch
import torch.utils.data
@ -12,15 +14,12 @@ from text import cleaned_text_to_sequence
from utils import load_wav_to_torch, load_filepaths_and_text
import torch.nn.functional as F
from functools import lru_cache
import torch
import requests
from scipy.io import wavfile
from io import BytesIO
# from config import exp_dir
from my_utils import load_audio
# ZeroDivisionError fixed by Tybost (https://github.com/RVC-Boss/GPT-SoVITS/issues/79)
class TextAudioSpeakerLoader(torch.utils.data.Dataset):
"""
1) loads audio, speaker_id, text pairs
@ -44,7 +43,7 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
for line in lines:
tmp = line.split("\t")
if len(tmp) != 4:
if (len(tmp) != 4):
continue
self.phoneme_data[tmp[0]] = [tmp[1]]
@ -52,7 +51,7 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
tmp = self.audiopaths_sid_text
leng = len(tmp)
min_num = 100
if leng < min_num:
if (leng < min_num):
self.audiopaths_sid_text = []
for _ in range(max(2, int(min_num / leng))):
self.audiopaths_sid_text += tmp
@ -77,20 +76,28 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
for audiopath in tqdm(self.audiopaths_sid_text):
try:
phoneme = self.phoneme_data[audiopath][0]
phoneme = phoneme.split(" ")
phoneme = phoneme.split(' ')
phoneme_ids = cleaned_text_to_sequence(phoneme)
except Exception:
print(f"{audiopath} not in self.phoneme_data !")
skipped_phone += 1
continue
size = os.path.getsize("%s/%s" % (self.path5, audiopath))
duration = size / self.sampling_rate / 2
if duration == 0:
print(f"Zero duration for {audiopath}, skipping...")
skipped_dur += 1
continue
if 54 > duration > 0.6 or self.val:
audiopaths_sid_text_new.append([audiopath, phoneme_ids])
lengths.append(size // (2 * self.hop_length))
else:
skipped_dur += 1
continue
print("skipped_phone: ", skipped_phone, ", skipped_dur: ", skipped_dur)
print("total left: ", len(audiopaths_sid_text_new))
assert len(audiopaths_sid_text_new) > 1 # 至少能凑够batch size这里todo
@ -103,10 +110,8 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
try:
spec, wav = self.get_audio("%s/%s" % (self.path5, audiopath))
with torch.no_grad():
ssl = torch.load(
"%s/%s.pt" % (self.path4, audiopath), map_location="cpu"
)
if ssl.shape[-1] != spec.shape[-1]:
ssl = torch.load("%s/%s.pt" % (self.path4, audiopath), map_location="cpu")
if (ssl.shape[-1] != spec.shape[-1]):
typee = ssl.dtype
ssl = F.pad(ssl.float(), (0, 1), mode="replicate").to(typee)
ssl.requires_grad = False
@ -117,25 +122,15 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
ssl = torch.zeros(1, 768, 100)
text = text[-1:]
print("load audio or ssl error!!!!!!", audiopath)
# print(ssl.requires_grad,spec.requires_grad,wav.requires_grad,text.requires_grad)
return (ssl, spec, wav, text)
def get_audio(self, filename):
audio_array = load_audio(
filename, self.sampling_rate
) # load_audio的方法是已经归一化到-1~1之间的不用再/32768
# print(filename,audio_array.max(),audio_array.min(),audio_array.mean())
audio_array = load_audio(filename, self.sampling_rate) # load_audio的方法是已经归一化到-1~1之间的不用再/32768
audio = torch.FloatTensor(audio_array) # /32768
audio_norm = audio
audio_norm = audio_norm.unsqueeze(0)
spec = spectrogram_torch(
audio_norm,
self.filter_length,
self.sampling_rate,
self.hop_length,
self.win_length,
center=False,
)
spec = spectrogram_torch(audio_norm, self.filter_length, self.sampling_rate, self.hop_length, self.win_length,
center=False)
spec = torch.squeeze(spec, 0)
return spec, audio_norm
@ -152,14 +147,11 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
def random_slice(self, ssl, wav, mel):
assert abs(ssl.shape[-1] - wav.shape[-1] // self.hop_length) < 3, (
"first",
ssl.shape,
wav.shape,
)
"first", ssl.shape, wav.shape)
len_mel = mel.shape[1]
if self.val:
reference_mel = mel[:, : len_mel // 3]
reference_mel = mel[:, :len_mel // 3]
return reference_mel, ssl, wav, mel
dir = random.randint(0, 1)
sep_point = random.randint(int(len_mel // 3), int(len_mel // 3 * 2))
@ -167,29 +159,22 @@ class TextAudioSpeakerLoader(torch.utils.data.Dataset):
if dir == 0:
reference_mel = mel[:, :sep_point]
ssl = ssl[:, :, sep_point:]
wav2 = wav[:, sep_point * self.hop_length :]
wav2 = wav[:, sep_point * self.hop_length:]
mel = mel[:, sep_point:]
else:
reference_mel = mel[:, sep_point:]
ssl = ssl[:, :, :sep_point]
wav2 = wav[:, : sep_point * self.hop_length]
wav2 = wav[:, :sep_point * self.hop_length]
mel = mel[:, :sep_point]
assert abs(ssl.shape[-1] - wav2.shape[-1] // self.hop_length) < 3, (
ssl.shape,
wav.shape,
wav2.shape,
mel.shape,
sep_point,
self.hop_length,
sep_point * self.hop_length,
dir,
)
ssl.shape, wav.shape, wav2.shape, mel.shape, sep_point, self.hop_length, sep_point * self.hop_length, dir)
return reference_mel, ssl, wav2, mel
class TextAudioSpeakerCollate:
"""Zero-pads model inputs and targets"""
class TextAudioSpeakerCollate():
""" Zero-pads model inputs and targets
"""
def __init__(self, return_ids=False):
self.return_ids = return_ids
@ -202,8 +187,8 @@ class TextAudioSpeakerCollate:
"""
# Right zero-pad all one-hot text sequences to max input length
_, ids_sorted_decreasing = torch.sort(
torch.LongTensor([x[1].size(1) for x in batch]), dim=0, descending=True
)
torch.LongTensor([x[1].size(1) for x in batch]),
dim=0, descending=True)
max_ssl_len = max([x[0].size(2) for x in batch])
max_ssl_len = int(2 * ((max_ssl_len // 2) + 1))
@ -231,31 +216,22 @@ class TextAudioSpeakerCollate:
row = batch[ids_sorted_decreasing[i]]
ssl = row[0]
ssl_padded[i, :, : ssl.size(2)] = ssl[0, :, :]
ssl_padded[i, :, :ssl.size(2)] = ssl[0, :, :]
ssl_lengths[i] = ssl.size(2)
spec = row[1]
spec_padded[i, :, : spec.size(1)] = spec
spec_padded[i, :, :spec.size(1)] = spec
spec_lengths[i] = spec.size(1)
wav = row[2]
wav_padded[i, :, : wav.size(1)] = wav
wav_padded[i, :, :wav.size(1)] = wav
wav_lengths[i] = wav.size(1)
text = row[3]
text_padded[i, : text.size(0)] = text
text_padded[i, :text.size(0)] = text
text_lengths[i] = text.size(0)
return (
ssl_padded,
ssl_lengths,
spec_padded,
spec_lengths,
wav_padded,
wav_lengths,
text_padded,
text_lengths,
)
return ssl_padded, ssl_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, text_padded, text_lengths
class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
@ -268,18 +244,9 @@ class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
Ex) boundaries = [b1, b2, b3] -> any x s.t. length(x) <= b1 or length(x) > b3 are discarded.
"""
def __init__(
self,
dataset,
batch_size,
boundaries,
num_replicas=None,
rank=None,
shuffle=True,
):
def __init__(self, dataset, batch_size, boundaries, num_replicas=None, rank=None, shuffle=True):
super().__init__(dataset, num_replicas=num_replicas, rank=rank, shuffle=shuffle)
self.lengths = dataset.lengths
# print(233333333333333,self.lengths,dir(dataset))
self.batch_size = batch_size
self.boundaries = boundaries
@ -295,24 +262,22 @@ class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
if idx_bucket != -1:
buckets[idx_bucket].append(i)
for i in range(len(buckets) - 1, 0, -1):
# for i in range(len(buckets) - 1, -1, -1):
i = len(buckets) - 1
while i >= 0:
if len(buckets[i]) == 0:
buckets.pop(i)
self.boundaries.pop(i + 1)
i -= 1
num_samples_per_bucket = []
for i in range(len(buckets)):
len_bucket = len(buckets[i])
total_batch_size = self.num_replicas * self.batch_size
rem = (
total_batch_size - (len_bucket % total_batch_size)
) % total_batch_size
rem = (total_batch_size - (len_bucket % total_batch_size)) % total_batch_size
num_samples_per_bucket.append(len_bucket + rem)
return buckets, num_samples_per_bucket
def __iter__(self):
# deterministically shuffle based on epoch
g = torch.Generator()
g.manual_seed(self.epoch)
@ -331,25 +296,13 @@ class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
ids_bucket = indices[i]
num_samples_bucket = self.num_samples_per_bucket[i]
# add extra samples to make it evenly divisible
rem = num_samples_bucket - len_bucket
ids_bucket = (
ids_bucket
+ ids_bucket * (rem // len_bucket)
+ ids_bucket[: (rem % len_bucket)]
)
ids_bucket = ids_bucket + ids_bucket * (rem // len_bucket) + ids_bucket[:(rem % len_bucket)]
# subsample
ids_bucket = ids_bucket[self.rank :: self.num_replicas]
ids_bucket = ids_bucket[self.rank::self.num_replicas]
# batching
for j in range(len(ids_bucket) // self.batch_size):
batch = [
bucket[idx]
for idx in ids_bucket[
j * self.batch_size : (j + 1) * self.batch_size
]
]
batch = [bucket[idx] for idx in ids_bucket[j * self.batch_size:(j + 1) * self.batch_size]]
batches.append(batch)
if self.shuffle:
@ -376,4 +329,4 @@ class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler):
return -1
def __len__(self):
return self.num_samples // self.batch_size
return self.num_samples // self.batch_size

View File

@ -228,6 +228,7 @@ class TextEncoder(nn.Module):
)
y = self.ssl_proj(y * y_mask) * y_mask
y = self.encoder_ssl(y * y_mask, y_mask)
text_mask = torch.unsqueeze(
@ -958,11 +959,13 @@ class SynthesizerTrn(nn.Module):
@torch.no_grad()
def decode(self, codes, text, refer, noise_scale=0.5):
refer_lengths = torch.LongTensor([refer.size(2)]).to(refer.device)
refer_mask = torch.unsqueeze(
commons.sequence_mask(refer_lengths, refer.size(2)), 1
).to(refer.dtype)
ge = self.ref_enc(refer * refer_mask, refer_mask)
ge = None
if refer is not None:
refer_lengths = torch.LongTensor([refer.size(2)]).to(refer.device)
refer_mask = torch.unsqueeze(
commons.sequence_mask(refer_lengths, refer.size(2)), 1
).to(refer.dtype)
ge = self.ref_enc(refer * refer_mask, refer_mask)
y_lengths = torch.LongTensor([codes.size(2) * 2]).to(codes.device)
text_lengths = torch.LongTensor([text.size(-1)]).to(text.device)

View File

@ -0,0 +1,918 @@
import copy
import math
import torch
from torch import nn
from torch.nn import functional as F
from module import commons
from module import modules
from module import attentions_onnx as attentions
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
from module.commons import init_weights, get_padding
from module.mrte_model import MRTE
from module.quantize import ResidualVectorQuantizer
from text import symbols
from torch.cuda.amp import autocast
class StochasticDurationPredictor(nn.Module):
def __init__(
self,
in_channels,
filter_channels,
kernel_size,
p_dropout,
n_flows=4,
gin_channels=0,
):
super().__init__()
filter_channels = in_channels # it needs to be removed from future version.
self.in_channels = in_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.n_flows = n_flows
self.gin_channels = gin_channels
self.log_flow = modules.Log()
self.flows = nn.ModuleList()
self.flows.append(modules.ElementwiseAffine(2))
for i in range(n_flows):
self.flows.append(
modules.ConvFlow(2, filter_channels, kernel_size, n_layers=3)
)
self.flows.append(modules.Flip())
self.post_pre = nn.Conv1d(1, filter_channels, 1)
self.post_proj = nn.Conv1d(filter_channels, filter_channels, 1)
self.post_convs = modules.DDSConv(
filter_channels, kernel_size, n_layers=3, p_dropout=p_dropout
)
self.post_flows = nn.ModuleList()
self.post_flows.append(modules.ElementwiseAffine(2))
for i in range(4):
self.post_flows.append(
modules.ConvFlow(2, filter_channels, kernel_size, n_layers=3)
)
self.post_flows.append(modules.Flip())
self.pre = nn.Conv1d(in_channels, filter_channels, 1)
self.proj = nn.Conv1d(filter_channels, filter_channels, 1)
self.convs = modules.DDSConv(
filter_channels, kernel_size, n_layers=3, p_dropout=p_dropout
)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, filter_channels, 1)
def forward(self, x, x_mask, w=None, g=None, reverse=False, noise_scale=1.0):
x = torch.detach(x)
x = self.pre(x)
if g is not None:
g = torch.detach(g)
x = x + self.cond(g)
x = self.convs(x, x_mask)
x = self.proj(x) * x_mask
if not reverse:
flows = self.flows
assert w is not None
logdet_tot_q = 0
h_w = self.post_pre(w)
h_w = self.post_convs(h_w, x_mask)
h_w = self.post_proj(h_w) * x_mask
e_q = (
torch.randn(w.size(0), 2, w.size(2)).to(device=x.device, dtype=x.dtype)
* x_mask
)
z_q = e_q
for flow in self.post_flows:
z_q, logdet_q = flow(z_q, x_mask, g=(x + h_w))
logdet_tot_q += logdet_q
z_u, z1 = torch.split(z_q, [1, 1], 1)
u = torch.sigmoid(z_u) * x_mask
z0 = (w - u) * x_mask
logdet_tot_q += torch.sum(
(F.logsigmoid(z_u) + F.logsigmoid(-z_u)) * x_mask, [1, 2]
)
logq = (
torch.sum(-0.5 * (math.log(2 * math.pi) + (e_q**2)) * x_mask, [1, 2])
- logdet_tot_q
)
logdet_tot = 0
z0, logdet = self.log_flow(z0, x_mask)
logdet_tot += logdet
z = torch.cat([z0, z1], 1)
for flow in flows:
z, logdet = flow(z, x_mask, g=x, reverse=reverse)
logdet_tot = logdet_tot + logdet
nll = (
torch.sum(0.5 * (math.log(2 * math.pi) + (z**2)) * x_mask, [1, 2])
- logdet_tot
)
return nll + logq # [b]
else:
flows = list(reversed(self.flows))
flows = flows[:-2] + [flows[-1]] # remove a useless vflow
z = (
torch.randn(x.size(0), 2, x.size(2)).to(device=x.device, dtype=x.dtype)
* noise_scale
)
for flow in flows:
z = flow(z, x_mask, g=x, reverse=reverse)
z0, z1 = torch.split(z, [1, 1], 1)
logw = z0
return logw
class DurationPredictor(nn.Module):
def __init__(
self, in_channels, filter_channels, kernel_size, p_dropout, gin_channels=0
):
super().__init__()
self.in_channels = in_channels
self.filter_channels = filter_channels
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.gin_channels = gin_channels
self.drop = nn.Dropout(p_dropout)
self.conv_1 = nn.Conv1d(
in_channels, filter_channels, kernel_size, padding=kernel_size // 2
)
self.norm_1 = modules.LayerNorm(filter_channels)
self.conv_2 = nn.Conv1d(
filter_channels, filter_channels, kernel_size, padding=kernel_size // 2
)
self.norm_2 = modules.LayerNorm(filter_channels)
self.proj = nn.Conv1d(filter_channels, 1, 1)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, in_channels, 1)
def forward(self, x, x_mask, g=None):
x = torch.detach(x)
if g is not None:
g = torch.detach(g)
x = x + self.cond(g)
x = self.conv_1(x * x_mask)
x = torch.relu(x)
x = self.norm_1(x)
x = self.drop(x)
x = self.conv_2(x * x_mask)
x = torch.relu(x)
x = self.norm_2(x)
x = self.drop(x)
x = self.proj(x * x_mask)
return x * x_mask
class TextEncoder(nn.Module):
def __init__(
self,
out_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout,
latent_channels=192,
):
super().__init__()
self.out_channels = out_channels
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.latent_channels = latent_channels
self.ssl_proj = nn.Conv1d(768, hidden_channels, 1)
self.encoder_ssl = attentions.Encoder(
hidden_channels,
filter_channels,
n_heads,
n_layers // 2,
kernel_size,
p_dropout,
)
self.encoder_text = attentions.Encoder(
hidden_channels, filter_channels, n_heads, n_layers, kernel_size, p_dropout
)
self.text_embedding = nn.Embedding(len(symbols), hidden_channels)
self.mrte = MRTE()
self.encoder2 = attentions.Encoder(
hidden_channels,
filter_channels,
n_heads,
n_layers // 2,
kernel_size,
p_dropout,
)
self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
def forward(self, y, text, ge):
y_mask = torch.ones_like(y[:1,:1,:])
y = self.ssl_proj(y * y_mask) * y_mask
y = self.encoder_ssl(y * y_mask, y_mask)
text_mask = torch.ones_like(text).to(y.dtype).unsqueeze(0)
text = self.text_embedding(text).transpose(1, 2)
text = self.encoder_text(text * text_mask, text_mask)
y = self.mrte(y, y_mask, text, text_mask, ge)
y = self.encoder2(y * y_mask, y_mask)
stats = self.proj(y) * y_mask
m, logs = torch.split(stats, self.out_channels, dim=1)
return y, m, logs, y_mask
def extract_latent(self, x):
x = self.ssl_proj(x)
quantized, codes, commit_loss, quantized_list = self.quantizer(x)
return codes.transpose(0, 1)
def decode_latent(self, codes, y_mask, refer, refer_mask, ge):
quantized = self.quantizer.decode(codes)
y = self.vq_proj(quantized) * y_mask
y = self.encoder_ssl(y * y_mask, y_mask)
y = self.mrte(y, y_mask, refer, refer_mask, ge)
y = self.encoder2(y * y_mask, y_mask)
stats = self.proj(y) * y_mask
m, logs = torch.split(stats, self.out_channels, dim=1)
return y, m, logs, y_mask, quantized
class ResidualCouplingBlock(nn.Module):
def __init__(
self,
channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
n_flows=4,
gin_channels=0,
):
super().__init__()
self.channels = channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.n_flows = n_flows
self.gin_channels = gin_channels
self.flows = nn.ModuleList()
for i in range(n_flows):
self.flows.append(
modules.ResidualCouplingLayer(
channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=gin_channels,
mean_only=True,
)
)
self.flows.append(modules.Flip())
def forward(self, x, x_mask, g=None, reverse=False):
if not reverse:
for flow in self.flows:
x, _ = flow(x, x_mask, g=g, reverse=reverse)
else:
for flow in reversed(self.flows):
x = flow(x, x_mask, g=g, reverse=reverse)
return x
class PosteriorEncoder(nn.Module):
def __init__(
self,
in_channels,
out_channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=0,
):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.gin_channels = gin_channels
self.pre = nn.Conv1d(in_channels, hidden_channels, 1)
self.enc = modules.WN(
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=gin_channels,
)
self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
def forward(self, x, x_lengths, g=None):
if g != None:
g = g.detach()
x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(
x.dtype
)
x = self.pre(x) * x_mask
x = self.enc(x, x_mask, g=g)
stats = self.proj(x) * x_mask
m, logs = torch.split(stats, self.out_channels, dim=1)
z = (m + torch.randn_like(m) * torch.exp(logs)) * x_mask
return z, m, logs, x_mask
class WNEncoder(nn.Module):
def __init__(
self,
in_channels,
out_channels,
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=0,
):
super().__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.hidden_channels = hidden_channels
self.kernel_size = kernel_size
self.dilation_rate = dilation_rate
self.n_layers = n_layers
self.gin_channels = gin_channels
self.pre = nn.Conv1d(in_channels, hidden_channels, 1)
self.enc = modules.WN(
hidden_channels,
kernel_size,
dilation_rate,
n_layers,
gin_channels=gin_channels,
)
self.proj = nn.Conv1d(hidden_channels, out_channels, 1)
self.norm = modules.LayerNorm(out_channels)
def forward(self, x, x_lengths, g=None):
x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(
x.dtype
)
x = self.pre(x) * x_mask
x = self.enc(x, x_mask, g=g)
out = self.proj(x) * x_mask
out = self.norm(out)
return out
class Generator(torch.nn.Module):
def __init__(
self,
initial_channel,
resblock,
resblock_kernel_sizes,
resblock_dilation_sizes,
upsample_rates,
upsample_initial_channel,
upsample_kernel_sizes,
gin_channels=0,
):
super(Generator, self).__init__()
self.num_kernels = len(resblock_kernel_sizes)
self.num_upsamples = len(upsample_rates)
self.conv_pre = Conv1d(
initial_channel, upsample_initial_channel, 7, 1, padding=3
)
resblock = modules.ResBlock1 if resblock == "1" else modules.ResBlock2
self.ups = nn.ModuleList()
for i, (u, k) in enumerate(zip(upsample_rates, upsample_kernel_sizes)):
self.ups.append(
weight_norm(
ConvTranspose1d(
upsample_initial_channel // (2**i),
upsample_initial_channel // (2 ** (i + 1)),
k,
u,
padding=(k - u) // 2,
)
)
)
self.resblocks = nn.ModuleList()
for i in range(len(self.ups)):
ch = upsample_initial_channel // (2 ** (i + 1))
for j, (k, d) in enumerate(
zip(resblock_kernel_sizes, resblock_dilation_sizes)
):
self.resblocks.append(resblock(ch, k, d))
self.conv_post = Conv1d(ch, 1, 7, 1, padding=3, bias=False)
self.ups.apply(init_weights)
if gin_channels != 0:
self.cond = nn.Conv1d(gin_channels, upsample_initial_channel, 1)
def forward(self, x, g=None):
x = self.conv_pre(x)
if g is not None:
x = x + self.cond(g)
for i in range(self.num_upsamples):
x = F.leaky_relu(x, modules.LRELU_SLOPE)
x = self.ups[i](x)
xs = None
for j in range(self.num_kernels):
if xs is None:
xs = self.resblocks[i * self.num_kernels + j](x)
else:
xs += self.resblocks[i * self.num_kernels + j](x)
x = xs / self.num_kernels
x = F.leaky_relu(x)
x = self.conv_post(x)
x = torch.tanh(x)
return x
def remove_weight_norm(self):
print("Removing weight norm...")
for l in self.ups:
remove_weight_norm(l)
for l in self.resblocks:
l.remove_weight_norm()
class DiscriminatorP(torch.nn.Module):
def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False):
super(DiscriminatorP, self).__init__()
self.period = period
self.use_spectral_norm = use_spectral_norm
norm_f = weight_norm if use_spectral_norm == False else spectral_norm
self.convs = nn.ModuleList(
[
norm_f(
Conv2d(
1,
32,
(kernel_size, 1),
(stride, 1),
padding=(get_padding(kernel_size, 1), 0),
)
),
norm_f(
Conv2d(
32,
128,
(kernel_size, 1),
(stride, 1),
padding=(get_padding(kernel_size, 1), 0),
)
),
norm_f(
Conv2d(
128,
512,
(kernel_size, 1),
(stride, 1),
padding=(get_padding(kernel_size, 1), 0),
)
),
norm_f(
Conv2d(
512,
1024,
(kernel_size, 1),
(stride, 1),
padding=(get_padding(kernel_size, 1), 0),
)
),
norm_f(
Conv2d(
1024,
1024,
(kernel_size, 1),
1,
padding=(get_padding(kernel_size, 1), 0),
)
),
]
)
self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0)))
def forward(self, x):
fmap = []
# 1d to 2d
b, c, t = x.shape
if t % self.period != 0: # pad first
n_pad = self.period - (t % self.period)
x = F.pad(x, (0, n_pad), "reflect")
t = t + n_pad
x = x.view(b, c, t // self.period, self.period)
for l in self.convs:
x = l(x)
x = F.leaky_relu(x, modules.LRELU_SLOPE)
fmap.append(x)
x = self.conv_post(x)
fmap.append(x)
x = torch.flatten(x, 1, -1)
return x, fmap
class DiscriminatorS(torch.nn.Module):
def __init__(self, use_spectral_norm=False):
super(DiscriminatorS, self).__init__()
norm_f = weight_norm if use_spectral_norm == False else spectral_norm
self.convs = nn.ModuleList(
[
norm_f(Conv1d(1, 16, 15, 1, padding=7)),
norm_f(Conv1d(16, 64, 41, 4, groups=4, padding=20)),
norm_f(Conv1d(64, 256, 41, 4, groups=16, padding=20)),
norm_f(Conv1d(256, 1024, 41, 4, groups=64, padding=20)),
norm_f(Conv1d(1024, 1024, 41, 4, groups=256, padding=20)),
norm_f(Conv1d(1024, 1024, 5, 1, padding=2)),
]
)
self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1))
def forward(self, x):
fmap = []
for l in self.convs:
x = l(x)
x = F.leaky_relu(x, modules.LRELU_SLOPE)
fmap.append(x)
x = self.conv_post(x)
fmap.append(x)
x = torch.flatten(x, 1, -1)
return x, fmap
class MultiPeriodDiscriminator(torch.nn.Module):
def __init__(self, use_spectral_norm=False):
super(MultiPeriodDiscriminator, self).__init__()
periods = [2, 3, 5, 7, 11]
discs = [DiscriminatorS(use_spectral_norm=use_spectral_norm)]
discs = discs + [
DiscriminatorP(i, use_spectral_norm=use_spectral_norm) for i in periods
]
self.discriminators = nn.ModuleList(discs)
def forward(self, y, y_hat):
y_d_rs = []
y_d_gs = []
fmap_rs = []
fmap_gs = []
for i, d in enumerate(self.discriminators):
y_d_r, fmap_r = d(y)
y_d_g, fmap_g = d(y_hat)
y_d_rs.append(y_d_r)
y_d_gs.append(y_d_g)
fmap_rs.append(fmap_r)
fmap_gs.append(fmap_g)
return y_d_rs, y_d_gs, fmap_rs, fmap_gs
class ReferenceEncoder(nn.Module):
"""
inputs --- [N, Ty/r, n_mels*r] mels
outputs --- [N, ref_enc_gru_size]
"""
def __init__(self, spec_channels, gin_channels=0):
super().__init__()
self.spec_channels = spec_channels
ref_enc_filters = [32, 32, 64, 64, 128, 128]
K = len(ref_enc_filters)
filters = [1] + ref_enc_filters
convs = [
weight_norm(
nn.Conv2d(
in_channels=filters[i],
out_channels=filters[i + 1],
kernel_size=(3, 3),
stride=(2, 2),
padding=(1, 1),
)
)
for i in range(K)
]
self.convs = nn.ModuleList(convs)
# self.wns = nn.ModuleList([weight_norm(num_features=ref_enc_filters[i]) for i in range(K)])
out_channels = self.calculate_channels(spec_channels, 3, 2, 1, K)
self.gru = nn.GRU(
input_size=ref_enc_filters[-1] * out_channels,
hidden_size=256 // 2,
batch_first=True,
)
self.proj = nn.Linear(128, gin_channels)
def forward(self, inputs):
N = inputs.size(0)
out = inputs.view(N, 1, -1, self.spec_channels) # [N, 1, Ty, n_freqs]
for conv in self.convs:
out = conv(out)
# out = wn(out)
out = F.relu(out) # [N, 128, Ty//2^K, n_mels//2^K]
out = out.transpose(1, 2) # [N, Ty//2^K, 128, n_mels//2^K]
T = out.size(1)
N = out.size(0)
out = out.contiguous().view(N, T, -1) # [N, Ty//2^K, 128*n_mels//2^K]
self.gru.flatten_parameters()
memory, out = self.gru(out) # out --- [1, N, 128]
return self.proj(out.squeeze(0)).unsqueeze(-1)
def calculate_channels(self, L, kernel_size, stride, pad, n_convs):
for i in range(n_convs):
L = (L - kernel_size + 2 * pad) // stride + 1
return L
class Quantizer_module(torch.nn.Module):
def __init__(self, n_e, e_dim):
super(Quantizer_module, self).__init__()
self.embedding = nn.Embedding(n_e, e_dim)
self.embedding.weight.data.uniform_(-1.0 / n_e, 1.0 / n_e)
def forward(self, x):
d = (
torch.sum(x**2, 1, keepdim=True)
+ torch.sum(self.embedding.weight**2, 1)
- 2 * torch.matmul(x, self.embedding.weight.T)
)
min_indicies = torch.argmin(d, 1)
z_q = self.embedding(min_indicies)
return z_q, min_indicies
class Quantizer(torch.nn.Module):
def __init__(self, embed_dim=512, n_code_groups=4, n_codes=160):
super(Quantizer, self).__init__()
assert embed_dim % n_code_groups == 0
self.quantizer_modules = nn.ModuleList(
[
Quantizer_module(n_codes, embed_dim // n_code_groups)
for _ in range(n_code_groups)
]
)
self.n_code_groups = n_code_groups
self.embed_dim = embed_dim
def forward(self, xin):
# B, C, T
B, C, T = xin.shape
xin = xin.transpose(1, 2)
x = xin.reshape(-1, self.embed_dim)
x = torch.split(x, self.embed_dim // self.n_code_groups, dim=-1)
min_indicies = []
z_q = []
for _x, m in zip(x, self.quantizer_modules):
_z_q, _min_indicies = m(_x)
z_q.append(_z_q)
min_indicies.append(_min_indicies) # B * T,
z_q = torch.cat(z_q, -1).reshape(xin.shape)
loss = 0.25 * torch.mean((z_q.detach() - xin) ** 2) + torch.mean(
(z_q - xin.detach()) ** 2
)
z_q = xin + (z_q - xin).detach()
z_q = z_q.transpose(1, 2)
codes = torch.stack(min_indicies, -1).reshape(B, T, self.n_code_groups)
return z_q, loss, codes.transpose(1, 2)
def embed(self, x):
# idx: N, 4, T
x = x.transpose(1, 2)
x = torch.split(x, 1, 2)
ret = []
for q, embed in zip(x, self.quantizer_modules):
q = embed.embedding(q.squeeze(-1))
ret.append(q)
ret = torch.cat(ret, -1)
return ret.transpose(1, 2) # N, C, T
class CodePredictor(nn.Module):
def __init__(
self,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout,
n_q=8,
dims=1024,
ssl_dim=768,
):
super().__init__()
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.vq_proj = nn.Conv1d(ssl_dim, hidden_channels, 1)
self.ref_enc = modules.MelStyleEncoder(
ssl_dim, style_vector_dim=hidden_channels
)
self.encoder = attentions.Encoder(
hidden_channels, filter_channels, n_heads, n_layers, kernel_size, p_dropout
)
self.out_proj = nn.Conv1d(hidden_channels, (n_q - 1) * dims, 1)
self.n_q = n_q
self.dims = dims
def forward(self, x, x_mask, refer, codes, infer=False):
x = x.detach()
x = self.vq_proj(x * x_mask) * x_mask
g = self.ref_enc(refer, x_mask)
x = x + g
x = self.encoder(x * x_mask, x_mask)
x = self.out_proj(x * x_mask) * x_mask
logits = x.reshape(x.shape[0], self.n_q - 1, self.dims, x.shape[-1]).transpose(
2, 3
)
target = codes[1:].transpose(0, 1)
if not infer:
logits = logits.reshape(-1, self.dims)
target = target.reshape(-1)
loss = torch.nn.functional.cross_entropy(logits, target)
return loss
else:
_, top10_preds = torch.topk(logits, 10, dim=-1)
correct_top10 = torch.any(top10_preds == target.unsqueeze(-1), dim=-1)
top3_acc = 100 * torch.mean(correct_top10.float()).detach().cpu().item()
print("Top-10 Accuracy:", top3_acc, "%")
pred_codes = torch.argmax(logits, dim=-1)
acc = 100 * torch.mean((pred_codes == target).float()).detach().cpu().item()
print("Top-1 Accuracy:", acc, "%")
return pred_codes.transpose(0, 1)
class SynthesizerTrn(nn.Module):
"""
Synthesizer for Training
"""
def __init__(
self,
spec_channels,
segment_size,
inter_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout,
resblock,
resblock_kernel_sizes,
resblock_dilation_sizes,
upsample_rates,
upsample_initial_channel,
upsample_kernel_sizes,
n_speakers=0,
gin_channels=0,
use_sdp=True,
semantic_frame_rate=None,
freeze_quantizer=None,
**kwargs
):
super().__init__()
self.spec_channels = spec_channels
self.inter_channels = inter_channels
self.hidden_channels = hidden_channels
self.filter_channels = filter_channels
self.n_heads = n_heads
self.n_layers = n_layers
self.kernel_size = kernel_size
self.p_dropout = p_dropout
self.resblock = resblock
self.resblock_kernel_sizes = resblock_kernel_sizes
self.resblock_dilation_sizes = resblock_dilation_sizes
self.upsample_rates = upsample_rates
self.upsample_initial_channel = upsample_initial_channel
self.upsample_kernel_sizes = upsample_kernel_sizes
self.segment_size = segment_size
self.n_speakers = n_speakers
self.gin_channels = gin_channels
self.use_sdp = use_sdp
self.enc_p = TextEncoder(
inter_channels,
hidden_channels,
filter_channels,
n_heads,
n_layers,
kernel_size,
p_dropout,
)
self.dec = Generator(
inter_channels,
resblock,
resblock_kernel_sizes,
resblock_dilation_sizes,
upsample_rates,
upsample_initial_channel,
upsample_kernel_sizes,
gin_channels=gin_channels,
)
self.enc_q = PosteriorEncoder(
spec_channels,
inter_channels,
hidden_channels,
5,
1,
16,
gin_channels=gin_channels,
)
self.flow = ResidualCouplingBlock(
inter_channels, hidden_channels, 5, 1, 4, gin_channels=gin_channels
)
self.ref_enc = modules.MelStyleEncoder(
spec_channels, style_vector_dim=gin_channels
)
ssl_dim = 768
self.ssl_dim = ssl_dim
assert semantic_frame_rate in ["25hz", "50hz"]
self.semantic_frame_rate = semantic_frame_rate
if semantic_frame_rate == "25hz":
self.ssl_proj = nn.Conv1d(ssl_dim, ssl_dim, 2, stride=2)
else:
self.ssl_proj = nn.Conv1d(ssl_dim, ssl_dim, 1, stride=1)
self.quantizer = ResidualVectorQuantizer(dimension=ssl_dim, n_q=1, bins=1024)
if freeze_quantizer:
self.ssl_proj.requires_grad_(False)
self.quantizer.requires_grad_(False)
# self.enc_p.text_embedding.requires_grad_(False)
# self.enc_p.encoder_text.requires_grad_(False)
# self.enc_p.mrte.requires_grad_(False)
def forward(self, codes, text, refer):
refer_mask = torch.ones_like(refer[:1,:1,:])
ge = self.ref_enc(refer * refer_mask, refer_mask)
quantized = self.quantizer.decode(codes)
if self.semantic_frame_rate == "25hz":
dquantized = torch.cat([quantized, quantized]).permute(1, 2, 0)
quantized = dquantized.contiguous().view(1, self.ssl_dim, -1)
x, m_p, logs_p, y_mask = self.enc_p(
quantized, text, ge
)
z_p = m_p + torch.randn_like(m_p) * torch.exp(logs_p)
z = self.flow(z_p, y_mask, g=ge, reverse=True)
o = self.dec((z * y_mask)[:, :, :], g=ge)
return o
def extract_latent(self, x):
ssl = self.ssl_proj(x)
quantized, codes, commit_loss, quantized_list = self.quantizer(ssl)
return codes.transpose(0, 1)

334
GPT_SoVITS/onnx_export.py Normal file
View File

@ -0,0 +1,334 @@
from module.models_onnx import SynthesizerTrn, symbols
from AR.models.t2s_lightning_module_onnx import Text2SemanticLightningModule
import torch
import torchaudio
from torch import nn
from feature_extractor import cnhubert
cnhubert_base_path = "pretrained_models/chinese-hubert-base"
cnhubert.cnhubert_base_path=cnhubert_base_path
ssl_model = cnhubert.get_model()
from text import cleaned_text_to_sequence
import soundfile
from my_utils import load_audio
import os
import json
def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, center=False):
hann_window = torch.hann_window(win_size).to(
dtype=y.dtype, device=y.device
)
y = torch.nn.functional.pad(
y.unsqueeze(1),
(int((n_fft - hop_size) / 2), int((n_fft - hop_size) / 2)),
mode="reflect",
)
y = y.squeeze(1)
spec = torch.stft(
y,
n_fft,
hop_length=hop_size,
win_length=win_size,
window=hann_window,
center=center,
pad_mode="reflect",
normalized=False,
onesided=True,
return_complex=False,
)
spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6)
return spec
class DictToAttrRecursive(dict):
def __init__(self, input_dict):
super().__init__(input_dict)
for key, value in input_dict.items():
if isinstance(value, dict):
value = DictToAttrRecursive(value)
self[key] = value
setattr(self, key, value)
def __getattr__(self, item):
try:
return self[item]
except KeyError:
raise AttributeError(f"Attribute {item} not found")
def __setattr__(self, key, value):
if isinstance(value, dict):
value = DictToAttrRecursive(value)
super(DictToAttrRecursive, self).__setitem__(key, value)
super().__setattr__(key, value)
def __delattr__(self, item):
try:
del self[item]
except KeyError:
raise AttributeError(f"Attribute {item} not found")
class T2SEncoder(nn.Module):
def __init__(self, t2s, vits):
super().__init__()
self.encoder = t2s.onnx_encoder
self.vits = vits
def forward(self, ref_seq, text_seq, ref_bert, text_bert, ssl_content):
codes = self.vits.extract_latent(ssl_content)
prompt_semantic = codes[0, 0]
bert = torch.cat([ref_bert.transpose(0, 1), text_bert.transpose(0, 1)], 1)
all_phoneme_ids = torch.cat([ref_seq, text_seq], 1)
bert = bert.unsqueeze(0)
prompt = prompt_semantic.unsqueeze(0)
return self.encoder(all_phoneme_ids, bert), prompt
class T2SModel(nn.Module):
def __init__(self, t2s_path, vits_model):
super().__init__()
dict_s1 = torch.load(t2s_path, map_location="cpu")
self.config = dict_s1["config"]
self.t2s_model = Text2SemanticLightningModule(self.config, "ojbk", is_train=False)
self.t2s_model.load_state_dict(dict_s1["weight"])
self.t2s_model.eval()
self.vits_model = vits_model.vq_model
self.hz = 50
self.max_sec = self.config["data"]["max_sec"]
self.t2s_model.model.top_k = torch.LongTensor([self.config["inference"]["top_k"]])
self.t2s_model.model.early_stop_num = torch.LongTensor([self.hz * self.max_sec])
self.t2s_model = self.t2s_model.model
self.t2s_model.init_onnx()
self.onnx_encoder = T2SEncoder(self.t2s_model, self.vits_model)
self.first_stage_decoder = self.t2s_model.first_stage_decoder
self.stage_decoder = self.t2s_model.stage_decoder
#self.t2s_model = torch.jit.script(self.t2s_model)
def forward(self, ref_seq, text_seq, ref_bert, text_bert, ssl_content):
early_stop_num = self.t2s_model.early_stop_num
#[1,N] [1,N] [N, 1024] [N, 1024] [1, 768, N]
x, prompts = self.onnx_encoder(ref_seq, text_seq, ref_bert, text_bert, ssl_content)
prefix_len = prompts.shape[1]
#[1,N,512] [1,N]
y, k, v, y_emb, x_example = self.first_stage_decoder(x, prompts)
stop = False
for idx in range(1, 1500):
#[1, N] [N_layer, N, 1, 512] [N_layer, N, 1, 512] [1, N, 512] [1] [1, N, 512] [1, N]
enco = self.stage_decoder(y, k, v, y_emb, x_example)
y, k, v, y_emb, logits, samples = enco
if early_stop_num != -1 and (y.shape[1] - prefix_len) > early_stop_num:
stop = True
if torch.argmax(logits, dim=-1)[0] == self.t2s_model.EOS or samples[0, 0] == self.t2s_model.EOS:
stop = True
if stop:
break
y[0, -1] = 0
return y[:, -idx:].unsqueeze(0)
def export(self, ref_seq, text_seq, ref_bert, text_bert, ssl_content, project_name, dynamo=False):
#self.onnx_encoder = torch.jit.script(self.onnx_encoder)
if dynamo:
export_options = torch.onnx.ExportOptions(dynamic_shapes=True)
onnx_encoder_export_output = torch.onnx.dynamo_export(
self.onnx_encoder,
(ref_seq, text_seq, ref_bert, text_bert, ssl_content),
export_options=export_options
)
onnx_encoder_export_output.save(f"onnx/{project_name}/{project_name}_t2s_encoder.onnx")
return
torch.onnx.export(
self.onnx_encoder,
(ref_seq, text_seq, ref_bert, text_bert, ssl_content),
f"onnx/{project_name}/{project_name}_t2s_encoder.onnx",
input_names=["ref_seq", "text_seq", "ref_bert", "text_bert", "ssl_content"],
output_names=["x", "prompts"],
dynamic_axes={
"ref_seq": {1 : "ref_length"},
"text_seq": {1 : "text_length"},
"ref_bert": {0 : "ref_length"},
"text_bert": {0 : "text_length"},
"ssl_content": {2 : "ssl_length"},
},
opset_version=16
)
x, prompts = self.onnx_encoder(ref_seq, text_seq, ref_bert, text_bert, ssl_content)
torch.onnx.export(
self.first_stage_decoder,
(x, prompts),
f"onnx/{project_name}/{project_name}_t2s_fsdec.onnx",
input_names=["x", "prompts"],
output_names=["y", "k", "v", "y_emb", "x_example"],
dynamic_axes={
"x": {1 : "x_length"},
"prompts": {1 : "prompts_length"},
},
verbose=False,
opset_version=16
)
y, k, v, y_emb, x_example = self.first_stage_decoder(x, prompts)
torch.onnx.export(
self.stage_decoder,
(y, k, v, y_emb, x_example),
f"onnx/{project_name}/{project_name}_t2s_sdec.onnx",
input_names=["iy", "ik", "iv", "iy_emb", "ix_example"],
output_names=["y", "k", "v", "y_emb", "logits", "samples"],
dynamic_axes={
"iy": {1 : "iy_length"},
"ik": {1 : "ik_length"},
"iv": {1 : "iv_length"},
"iy_emb": {1 : "iy_emb_length"},
"ix_example": {1 : "ix_example_length"},
},
verbose=False,
opset_version=16
)
class VitsModel(nn.Module):
def __init__(self, vits_path):
super().__init__()
dict_s2 = torch.load(vits_path,map_location="cpu")
self.hps = dict_s2["config"]
self.hps = DictToAttrRecursive(self.hps)
self.hps.model.semantic_frame_rate = "25hz"
self.vq_model = SynthesizerTrn(
self.hps.data.filter_length // 2 + 1,
self.hps.train.segment_size // self.hps.data.hop_length,
n_speakers=self.hps.data.n_speakers,
**self.hps.model
)
self.vq_model.eval()
self.vq_model.load_state_dict(dict_s2["weight"], strict=False)
def forward(self, text_seq, pred_semantic, ref_audio):
refer = spectrogram_torch(
ref_audio,
self.hps.data.filter_length,
self.hps.data.sampling_rate,
self.hps.data.hop_length,
self.hps.data.win_length,
center=False
)
return self.vq_model(pred_semantic, text_seq, refer)[0, 0]
class GptSoVits(nn.Module):
def __init__(self, vits, t2s):
super().__init__()
self.vits = vits
self.t2s = t2s
def forward(self, ref_seq, text_seq, ref_bert, text_bert, ref_audio, ssl_content, debug=False):
pred_semantic = self.t2s(ref_seq, text_seq, ref_bert, text_bert, ssl_content)
audio = self.vits(text_seq, pred_semantic, ref_audio)
if debug:
import onnxruntime
sess = onnxruntime.InferenceSession("onnx/koharu/koharu_vits.onnx", providers=["CPU"])
audio1 = sess.run(None, {
"text_seq" : text_seq.detach().cpu().numpy(),
"pred_semantic" : pred_semantic.detach().cpu().numpy(),
"ref_audio" : ref_audio.detach().cpu().numpy()
})
return audio, audio1
return audio
def export(self, ref_seq, text_seq, ref_bert, text_bert, ref_audio, ssl_content, project_name):
self.t2s.export(ref_seq, text_seq, ref_bert, text_bert, ssl_content, project_name)
pred_semantic = self.t2s(ref_seq, text_seq, ref_bert, text_bert, ssl_content)
torch.onnx.export(
self.vits,
(text_seq, pred_semantic, ref_audio),
f"onnx/{project_name}/{project_name}_vits.onnx",
input_names=["text_seq", "pred_semantic", "ref_audio"],
output_names=["audio"],
dynamic_axes={
"text_seq": {1 : "text_length"},
"pred_semantic": {2 : "pred_length"},
"ref_audio": {1 : "audio_length"},
},
opset_version=17,
verbose=False
)
class SSLModel(nn.Module):
def __init__(self):
super().__init__()
self.ssl = ssl_model
def forward(self, ref_audio_16k):
return self.ssl.model(ref_audio_16k)["last_hidden_state"].transpose(1, 2)
def export(vits_path, gpt_path, project_name):
vits = VitsModel(vits_path)
gpt = T2SModel(gpt_path, vits)
gpt_sovits = GptSoVits(vits, gpt)
ssl = SSLModel()
ref_seq = torch.LongTensor([cleaned_text_to_sequence(["n", "i2", "h", "ao3", ",", "w", "o3", "sh", "i4", "b", "ai2", "y", "e4"])])
text_seq = torch.LongTensor([cleaned_text_to_sequence(["w", "o3", "sh", "i4", "b", "ai2", "y", "e4", "w", "o3", "sh", "i4", "b", "ai2", "y", "e4", "w", "o3", "sh", "i4", "b", "ai2", "y", "e4"])])
ref_bert = torch.randn((ref_seq.shape[1], 1024)).float()
text_bert = torch.randn((text_seq.shape[1], 1024)).float()
ref_audio = torch.randn((1, 48000 * 5)).float()
# ref_audio = torch.tensor([load_audio("rec.wav", 48000)]).float()
ref_audio_16k = torchaudio.functional.resample(ref_audio,48000,16000).float()
ref_audio_sr = torchaudio.functional.resample(ref_audio,48000,vits.hps.data.sampling_rate).float()
try:
os.mkdir(f"onnx/{project_name}")
except:
pass
ssl_content = ssl(ref_audio_16k).float()
debug = False
if debug:
a, b = gpt_sovits(ref_seq, text_seq, ref_bert, text_bert, ref_audio_sr, ssl_content, debug=debug)
soundfile.write("out1.wav", a.cpu().detach().numpy(), vits.hps.data.sampling_rate)
soundfile.write("out2.wav", b[0], vits.hps.data.sampling_rate)
return
a = gpt_sovits(ref_seq, text_seq, ref_bert, text_bert, ref_audio_sr, ssl_content).detach().cpu().numpy()
soundfile.write("out.wav", a, vits.hps.data.sampling_rate)
gpt_sovits.export(ref_seq, text_seq, ref_bert, text_bert, ref_audio_sr, ssl_content, project_name)
MoeVSConf = {
"Folder" : f"{project_name}",
"Name" : f"{project_name}",
"Type" : "GPT-SoVits",
"Rate" : vits.hps.data.sampling_rate,
"NumLayers": gpt.t2s_model.num_layers,
"EmbeddingDim": gpt.t2s_model.embedding_dim,
"Dict": "BasicDict",
"BertPath": "chinese-roberta-wwm-ext-large",
"Symbol": symbols,
"AddBlank": False
}
MoeVSConfJson = json.dumps(MoeVSConf)
with open(f"onnx/{project_name}.json", 'w') as MoeVsConfFile:
json.dump(MoeVSConf, MoeVsConfFile, indent = 4)
if __name__ == "__main__":
try:
os.mkdir("onnx")
except:
pass
gpt_path = "GPT_weights/nahida-e25.ckpt"
vits_path = "SoVITS_weights/nahida_e30_s3930.pth"
exp_path = "nahida"
export(vits_path, gpt_path, exp_path)
# soundfile.write("out.wav", a, vits.hps.data.sampling_rate)

View File

@ -1,81 +0,0 @@
import os, torch, sys
from subprocess import Popen
now_dir = os.getcwd()
sys.path.append(now_dir)
from config import (
text_path,
wav_dir,
n_card,
exp_name,
n_parts,
exp_dir,
)
os.makedirs("%s/logs_s1" % exp_dir, exist_ok=True)
os.makedirs("%s/logs_s2" % exp_dir, exist_ok=True)
##############step1
ps = []
for i_part in range(n_parts):
cmd = "python prepare/1-get-text.py %s %s %s %s %s %s" % (
text_path,
wav_dir,
exp_name,
i_part,
n_parts,
i_part % n_card,
)
print(cmd)
p = Popen(cmd, shell=True)
ps.append(p)
for p in ps:
p.wait()
opt = []
for i_part in range(n_parts):
txt_path = "%s/2-name2text-%s.txt" % (exp_dir, i_part)
with open(txt_path, "r") as f:
opt += f.read().strip("\n").split("\n")
os.remove(txt_path)
with open("%s/2-name2text.txt" % exp_dir, "w") as f:
f.write("\n".join(opt) + "\n")
############step2
ps = []
for i_part in range(n_parts):
cmd = "python prepare/2-get-hubert-wav32k.py %s %s %s %s %s %s" % (
text_path,
wav_dir,
exp_name,
i_part,
n_parts,
i_part % n_card,
)
print(cmd)
p = Popen(cmd, shell=True)
ps.append(p)
for p in ps:
p.wait()
#############step3
ps = []
for i_part in range(n_parts):
cmd = "python prepare/3-get-semantic.py %s %s %s %s %s" % (
text_path,
exp_name,
i_part,
n_parts,
i_part % n_card,
)
print(cmd)
p = Popen(cmd, shell=True)
ps.append(p)
for p in ps:
p.wait()
opt = ["item_name semantic_audio"]
for i_part in range(n_parts):
semantic_path = "%s/6-name2semantic-%s.tsv" % (exp_dir, i_part)
with open(semantic_path, "r") as f:
opt += f.read().strip("\n").split("\n")
os.remove(semantic_path)
with open("%s/6-name2semantic.tsv" % exp_dir, "w") as f:
f.write("\n".join(opt) + "\n")

View File

@ -33,12 +33,13 @@ from time import time as ttime
import shutil
def my_save(fea, path): #####fix issue: torch.save doesn't support chinese path
dir = os.path.dirname(path)
name = os.path.basename(path)
tmp_path = "%s/%s%s.pth" % (dir, ttime(), i_part)
torch.save(fea, tmp_path)
shutil.move(tmp_path, "%s/%s" % (dir, name))
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
# tmp_path="%s/%s%s.pth"%(dir,ttime(),i_part)
tmp_path="%s%s.pth"%(ttime(),i_part)
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))
txt_path = "%s/2-name2text-%s.txt" % (opt_dir, i_part)
@ -46,7 +47,12 @@ if os.path.exists(txt_path) == False:
bert_dir = "%s/3-bert" % (opt_dir)
os.makedirs(opt_dir, exist_ok=True)
os.makedirs(bert_dir, exist_ok=True)
device = "cuda:0"
if torch.cuda.is_available():
device = "cuda:0"
elif torch.backends.mps.is_available():
device = "mps"
else:
device = "cpu"
tokenizer = AutoTokenizer.from_pretrained(bert_pretrained_dir)
bert_model = AutoModelForMaskedLM.from_pretrained(bert_pretrained_dir)
if is_half == True:

View File

@ -1,23 +1,20 @@
# -*- coding: utf-8 -*-
import sys, os
inp_text = os.environ.get("inp_text")
inp_wav_dir = os.environ.get("inp_wav_dir")
exp_name = os.environ.get("exp_name")
i_part = os.environ.get("i_part")
all_parts = os.environ.get("all_parts")
os.environ["CUDA_VISIBLE_DEVICES"] = os.environ.get("_CUDA_VISIBLE_DEVICES")
import sys,os
inp_text= os.environ.get("inp_text")
inp_wav_dir= os.environ.get("inp_wav_dir")
exp_name= os.environ.get("exp_name")
i_part= os.environ.get("i_part")
all_parts= os.environ.get("all_parts")
os.environ["CUDA_VISIBLE_DEVICES"]= os.environ.get("_CUDA_VISIBLE_DEVICES")
from feature_extractor import cnhubert
opt_dir= os.environ.get("opt_dir")
cnhubert.cnhubert_base_path= os.environ.get("cnhubert_base_dir")
is_half=eval(os.environ.get("is_half","True"))
opt_dir = os.environ.get("opt_dir")
cnhubert.cnhubert_base_path = os.environ.get("cnhubert_base_dir")
is_half = eval(os.environ.get("is_half", "True"))
import pdb, traceback, numpy as np, logging
import pdb,traceback,numpy as np,logging
from scipy.io import wavfile
import librosa, torch
import librosa,torch
now_dir = os.getcwd()
sys.path.append(now_dir)
from my_utils import load_audio
@ -35,75 +32,89 @@ from my_utils import load_audio
from time import time as ttime
import shutil
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
# tmp_path="%s/%s%s.pth"%(dir,ttime(),i_part)
tmp_path="%s%s.pth"%(ttime(),i_part)
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))
hubert_dir="%s/4-cnhubert"%(opt_dir)
wav32dir="%s/5-wav32k"%(opt_dir)
os.makedirs(opt_dir,exist_ok=True)
os.makedirs(hubert_dir,exist_ok=True)
os.makedirs(wav32dir,exist_ok=True)
def my_save(fea, path): #####fix issue: torch.save doesn't support chinese path
dir = os.path.dirname(path)
name = os.path.basename(path)
tmp_path = "%s/%s%s.pth" % (dir, ttime(), i_part)
torch.save(fea, tmp_path)
shutil.move(tmp_path, "%s/%s" % (dir, name))
hubert_dir = "%s/4-cnhubert" % (opt_dir)
wav32dir = "%s/5-wav32k" % (opt_dir)
os.makedirs(opt_dir, exist_ok=True)
os.makedirs(hubert_dir, exist_ok=True)
os.makedirs(wav32dir, exist_ok=True)
maxx = 0.95
alpha = 0.5
device = "cuda:0"
model = cnhubert.get_model()
if is_half == True:
model = model.half().to(device)
maxx=0.95
alpha=0.5
if torch.cuda.is_available():
device = "cuda:0"
elif torch.backends.mps.is_available():
device = "mps"
else:
device = "cpu"
model=cnhubert.get_model()
# is_half=False
if(is_half==True):
model=model.half().to(device)
else:
model = model.to(device)
def name2go(wav_name):
hubert_path = "%s/%s.pt" % (hubert_dir, wav_name)
if os.path.exists(hubert_path):
return
wav_path = "%s/%s" % (inp_wav_dir, wav_name)
nan_fails=[]
def name2go(wav_name,wav_path):
hubert_path="%s/%s.pt"%(hubert_dir,wav_name)
if(os.path.exists(hubert_path)):return
tmp_audio = load_audio(wav_path, 32000)
tmp_max = np.abs(tmp_audio).max()
if tmp_max > 2.2:
print("%s-%s-%s-filtered" % (idx0, idx1, tmp_max))
print("%s-filtered,%s" % (wav_name, tmp_max))
return
tmp_audio32 = (tmp_audio / tmp_max * (maxx * alpha * 32768)) + (
(1 - alpha) * 32768
) * tmp_audio
tmp_audio = librosa.resample(tmp_audio32, orig_sr=32000, target_sr=16000)
tmp_audio32 = (tmp_audio / tmp_max * (maxx * alpha*32768)) + ((1 - alpha)*32768) * tmp_audio
tmp_audio32b = (tmp_audio / tmp_max * (maxx * alpha*1145.14)) + ((1 - alpha)*1145.14) * tmp_audio
tmp_audio = librosa.resample(
tmp_audio32b, orig_sr=32000, target_sr=16000
)#不是重采样问题
tensor_wav16 = torch.from_numpy(tmp_audio)
if is_half == True:
tensor_wav16 = tensor_wav16.half().to(device)
if (is_half == True):
tensor_wav16=tensor_wav16.half().to(device)
else:
tensor_wav16 = tensor_wav16.to(device)
ssl = (
model.model(tensor_wav16.unsqueeze(0))["last_hidden_state"]
.transpose(1, 2)
.cpu()
) # torch.Size([1, 768, 215])
if np.isnan(ssl.detach().numpy()).sum() != 0:
ssl=model.model(tensor_wav16.unsqueeze(0))["last_hidden_state"].transpose(1,2).cpu()#torch.Size([1, 768, 215])
if np.isnan(ssl.detach().numpy()).sum()!= 0:
nan_fails.append(wav_name)
print("nan filtered:%s"%wav_name)
return
wavfile.write(
"%s/%s" % (wav32dir, wav_name),
"%s/%s"%(wav32dir,wav_name),
32000,
tmp_audio32.astype("int16"),
)
# torch.save(ssl,hubert_path )
my_save(ssl, hubert_path)
my_save(ssl,hubert_path )
with open(inp_text,"r",encoding="utf8")as f:
lines=f.read().strip("\n").split("\n")
with open(inp_text, "r", encoding="utf8") as f:
lines = f.read().strip("\n").split("\n")
for line in lines[int(i_part) :: int(all_parts)]:
for line in lines[int(i_part)::int(all_parts)]:
try:
# wav_name,text=line.split("\t")
wav_name, spk_name, language, text = line.split("|")
wav_name = os.path.basename(wav_name)
name2go(wav_name)
if (inp_wav_dir !=None):
wav_name = os.path.basename(wav_name)
wav_path = "%s/%s"%(inp_wav_dir, wav_name)
else:
wav_path=wav_name
wav_name = os.path.basename(wav_name)
name2go(wav_name,wav_path)
except:
print(line, traceback.format_exc())
print(line,traceback.format_exc())
if(len(nan_fails)>0 and is_half==True):
is_half=False
model=model.float()
for wav_name in nan_fails:
try:
name2go(wav_name)
except:
print(wav_name,traceback.format_exc())

View File

@ -38,7 +38,12 @@ semantic_path = "%s/6-name2semantic-%s.tsv" % (opt_dir, i_part)
if os.path.exists(semantic_path) == False:
os.makedirs(opt_dir, exist_ok=True)
device = "cuda:0"
if torch.cuda.is_available():
device = "cuda"
elif torch.backends.mps.is_available():
device = "mps"
else:
device = "cpu"
hps = utils.get_hparams_from_file(s2config_path)
vq_model = SynthesizerTrn(
hps.data.filter_length // 2 + 1,

View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -1,11 +1,18 @@
import traceback
from collections import OrderedDict
from time import time as ttime
import shutil,os
import torch
from tools.i18n.i18n import I18nAuto
i18n = I18nAuto()
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
tmp_path="%s.pth"%(ttime())
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))
def savee(ckpt, name, epoch, steps, hps):
try:
@ -17,7 +24,8 @@ def savee(ckpt, name, epoch, steps, hps):
opt["weight"][key] = ckpt[key].half()
opt["config"] = hps
opt["info"] = "%sepoch_%siteration" % (epoch, steps)
torch.save(opt, "%s/%s.pth" % (hps.save_weight_dir, name))
# torch.save(opt, "%s/%s.pth" % (hps.save_weight_dir, name))
my_save(opt, "%s/%s.pth" % (hps.save_weight_dir, name))
return "Success."
except:
return traceback.format_exc()

View File

@ -24,6 +24,14 @@ torch.set_float32_matmul_precision("high")
from AR.utils import get_newest_ckpt
from collections import OrderedDict
from time import time as ttime
import shutil
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
tmp_path="%s.pth"%(ttime())
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))
class my_model_ckpt(ModelCheckpoint):
@ -44,9 +52,8 @@ class my_model_ckpt(ModelCheckpoint):
self.config = config
def on_train_epoch_end(self, trainer, pl_module):
if not self._should_skip_saving_checkpoint(
trainer
) and self._should_save_on_train_epoch_end(trainer):
# if not self._should_skip_saving_checkpoint(trainer) and self._should_save_on_train_epoch_end(trainer):
if self._should_save_on_train_epoch_end(trainer):
monitor_candidates = self._monitor_candidates(trainer)
if (
self._every_n_epochs >= 1
@ -71,7 +78,8 @@ class my_model_ckpt(ModelCheckpoint):
to_save_od["weight"][key] = dictt[key].half()
to_save_od["config"] = self.config
to_save_od["info"] = "GPT-e%s" % (trainer.current_epoch + 1)
torch.save(
# torch.save(
my_save(
to_save_od,
"%s/%s-e%s.ckpt"
% (
@ -107,6 +115,7 @@ def main(args):
dirpath=ckpt_dir,
)
logger = TensorBoardLogger(name=output_dir.stem, save_dir=output_dir)
os.environ["MASTER_ADDR"]="localhost"
trainer: Trainer = Trainer(
max_epochs=config["train"]["epochs"],
accelerator="gpu",
@ -116,9 +125,9 @@ def main(args):
devices=-1,
benchmark=False,
fast_dev_run=False,
strategy=DDPStrategy(
strategy = "auto" if torch.backends.mps.is_available() else DDPStrategy(
process_group_backend="nccl" if platform.system() != "Windows" else "gloo"
),
), # mps 不支持多节点训练
precision=config["train"]["precision"],
logger=logger,
num_sanity_val_steps=0,

View File

@ -44,9 +44,12 @@ global_step = 0
def main():
"""Assume Single Node Multi GPUs Training Only"""
assert torch.cuda.is_available(), "CPU training is not allowed."
assert torch.cuda.is_available() or torch.backends.mps.is_available(), "Only GPU training is allowed."
n_gpus = torch.cuda.device_count()
if torch.backends.mps.is_available():
n_gpus = 1
else:
n_gpus = torch.cuda.device_count()
os.environ["MASTER_ADDR"] = "localhost"
os.environ["MASTER_PORT"] = str(randint(20000, 55555))
@ -70,13 +73,14 @@ def run(rank, n_gpus, hps):
writer_eval = SummaryWriter(log_dir=os.path.join(hps.s2_ckpt_dir, "eval"))
dist.init_process_group(
backend="gloo" if os.name == "nt" else "nccl",
backend = "gloo" if os.name == "nt" or torch.backends.mps.is_available() else "nccl",
init_method="env://",
world_size=n_gpus,
rank=rank,
)
torch.manual_seed(hps.train.seed)
torch.cuda.set_device(rank)
if torch.cuda.is_available():
torch.cuda.set_device(rank)
train_dataset = TextAudioSpeakerLoader(hps.data) ########
train_sampler = DistributedBucketSampler(
@ -128,9 +132,14 @@ def run(rank, n_gpus, hps):
hps.train.segment_size // hps.data.hop_length,
n_speakers=hps.data.n_speakers,
**hps.model,
).cuda(rank)
).cuda(rank) if torch.cuda.is_available() else SynthesizerTrn(
hps.data.filter_length // 2 + 1,
hps.train.segment_size // hps.data.hop_length,
n_speakers=hps.data.n_speakers,
**hps.model,
).to("mps")
net_d = MultiPeriodDiscriminator(hps.model.use_spectral_norm).cuda(rank)
net_d = MultiPeriodDiscriminator(hps.model.use_spectral_norm).cuda(rank) if torch.cuda.is_available() else MultiPeriodDiscriminator(hps.model.use_spectral_norm).to("mps")
for name, param in net_g.named_parameters():
if not param.requires_grad:
print(name, "not requires_grad")
@ -174,8 +183,12 @@ def run(rank, n_gpus, hps):
betas=hps.train.betas,
eps=hps.train.eps,
)
net_g = DDP(net_g, device_ids=[rank], find_unused_parameters=True)
net_d = DDP(net_d, device_ids=[rank], find_unused_parameters=True)
if torch.cuda.is_available():
net_g = DDP(net_g, device_ids=[rank], find_unused_parameters=True)
net_d = DDP(net_d, device_ids=[rank], find_unused_parameters=True)
else:
net_g = net_g.to("mps")
net_d = net_d.to("mps")
try: # 如果能加载自动resume
_, _, _, epoch_str = utils.load_checkpoint(
@ -205,6 +218,9 @@ def run(rank, n_gpus, hps):
net_g.module.load_state_dict(
torch.load(hps.train.pretrained_s2G, map_location="cpu")["weight"],
strict=False,
) if torch.cuda.is_available() else net_g.load_state_dict(
torch.load(hps.train.pretrained_s2G, map_location="cpu")["weight"],
strict=False,
)
) ##测试不加载优化器
if hps.train.pretrained_s2D != "":
@ -213,6 +229,8 @@ def run(rank, n_gpus, hps):
print(
net_d.module.load_state_dict(
torch.load(hps.train.pretrained_s2D, map_location="cpu")["weight"]
) if torch.cuda.is_available() else net_d.load_state_dict(
torch.load(hps.train.pretrained_s2D, map_location="cpu")["weight"]
)
)
@ -288,18 +306,26 @@ def train_and_evaluate(
text,
text_lengths,
) in tqdm(enumerate(train_loader)):
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(
rank, non_blocking=True
)
y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(
rank, non_blocking=True
)
ssl = ssl.cuda(rank, non_blocking=True)
ssl.requires_grad = False
# ssl_lengths = ssl_lengths.cuda(rank, non_blocking=True)
text, text_lengths = text.cuda(rank, non_blocking=True), text_lengths.cuda(
rank, non_blocking=True
)
if torch.cuda.is_available():
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(
rank, non_blocking=True
)
y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(
rank, non_blocking=True
)
ssl = ssl.cuda(rank, non_blocking=True)
ssl.requires_grad = False
# ssl_lengths = ssl_lengths.cuda(rank, non_blocking=True)
text, text_lengths = text.cuda(rank, non_blocking=True), text_lengths.cuda(
rank, non_blocking=True
)
else:
spec, spec_lengths = spec.to("mps"), spec_lengths.to("mps")
y, y_lengths = y.to("mps"), y_lengths.to("mps")
ssl = ssl.to("mps")
ssl.requires_grad = False
# ssl_lengths = ssl_lengths.cuda(rank, non_blocking=True)
text, text_lengths = text.to("mps"), text_lengths.to("mps")
with autocast(enabled=hps.train.fp16_run):
(
@ -500,13 +526,21 @@ def evaluate(hps, generator, eval_loader, writer_eval):
text_lengths,
) in enumerate(eval_loader):
print(111)
spec, spec_lengths = spec.cuda(), spec_lengths.cuda()
y, y_lengths = y.cuda(), y_lengths.cuda()
ssl = ssl.cuda()
text, text_lengths = text.cuda(), text_lengths.cuda()
if torch.cuda.is_available():
spec, spec_lengths = spec.cuda(), spec_lengths.cuda()
y, y_lengths = y.cuda(), y_lengths.cuda()
ssl = ssl.cuda()
text, text_lengths = text.cuda(), text_lengths.cuda()
else:
spec, spec_lengths = spec.to("mps"), spec_lengths.to("mps")
y, y_lengths = y.to("mps"), y_lengths.to("mps")
ssl = ssl.to("mps")
text, text_lengths = text.to("mps"), text_lengths.to("mps")
for test in [0, 1]:
y_hat, mask, *_ = generator.module.infer(
ssl, spec, spec_lengths, text, text_lengths, test=test
) if torch.cuda.is_available() else generator.infer(
ssl, spec, spec_lengths, text, text_lengths, test=test
)
y_hat_lengths = mask.sum([1, 2]).long() * hps.data.hop_length

View File

@ -5,12 +5,11 @@ import re
import cn2an
from pypinyin import lazy_pinyin, Style
import sys
sys.path.append("/data/docker/liujing04/gpt-vits/gpt-vits-master")
from text.symbols import punctuation
from text.tone_sandhi import ToneSandhi
from text.zh_normalization.text_normlization import TextNormalizer
normalizer = lambda x: cn2an.transform(x, "an2cn")
current_file_path = os.path.dirname(__file__)
pinyin_to_symbol_map = {
@ -18,7 +17,7 @@ pinyin_to_symbol_map = {
for line in open(os.path.join(current_file_path, "opencpop-strict.txt")).readlines()
}
import jieba.posseg as psg
import jieba_fast.posseg as psg
rep_map = {
@ -151,12 +150,13 @@ def _g2p(segments):
def text_normalize(text):
numbers = re.findall(r"\d+(?:\.?\d+)?", text)
for number in numbers:
text = text.replace(number, cn2an.an2cn(number), 1)
text = replace_punctuation(text)
return text
# https://github.com/PaddlePaddle/PaddleSpeech/tree/develop/paddlespeech/t2s/frontend/zh_normalization
tx = TextNormalizer()
sentences = tx.normalize(text)
dest_text = ""
for sentence in sentences:
dest_text += replace_punctuation(sentence)
return dest_text
if __name__ == "__main__":

View File

@ -2,7 +2,7 @@ from text import chinese, japanese, cleaned_text_to_sequence, symbols, english
language_module_map = {"zh": chinese, "ja": japanese, "en": english}
special = [
("%", "zh", "SP"),
# ("%", "zh", "SP"),
("", "zh", "SP2"),
("^", "zh", "SP3"),
# ('@', 'zh', "SP4")#不搞鬼畜了,和第二版保持一致吧
@ -10,6 +10,9 @@ special = [
def clean_text(text, language):
if(language not in language_module_map):
language="en"
text=" "
for special_s, special_l, target_symbol in special:
if special_s in text and language == special_l:
return clean_special(text, language, special_s, target_symbol)
@ -37,13 +40,13 @@ def clean_special(text, language, special_s, target_symbol):
norm_text = language_module.text_normalize(text)
phones = language_module.g2p(norm_text)
new_ph = []
for ph in phones:
for ph in phones[0]:
assert ph in symbols
if ph == ",":
new_ph.append(target_symbol)
else:
new_ph.append(ph)
return new_ph
return new_ph, phones[1], norm_text
def text_to_sequence(text, language):

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
CHATGPT CH AE1 T JH IY1 P IY1 T IY1

View File

@ -9,7 +9,9 @@ from text import symbols
current_file_path = os.path.dirname(__file__)
CMU_DICT_PATH = os.path.join(current_file_path, "cmudict.rep")
CACHE_PATH = os.path.join(current_file_path, "cmudict_cache.pickle")
CMU_DICT_FAST_PATH = os.path.join(current_file_path, "cmudict-fast.rep")
CMU_DICT_HOT_PATH = os.path.join(current_file_path, "engdict-hot.rep")
CACHE_PATH = os.path.join(current_file_path, "engdict_cache.pickle")
_g2p = G2p()
arpa = {
@ -124,6 +126,59 @@ def read_dict():
return g2p_dict
def read_dict_new():
g2p_dict = {}
with open(CMU_DICT_PATH) as f:
line = f.readline()
line_index = 1
while line:
if line_index >= 49:
line = line.strip()
word_split = line.split(" ")
word = word_split[0]
syllable_split = word_split[1].split(" - ")
g2p_dict[word] = []
for syllable in syllable_split:
phone_split = syllable.split(" ")
g2p_dict[word].append(phone_split)
line_index = line_index + 1
line = f.readline()
with open(CMU_DICT_FAST_PATH) as f:
line = f.readline()
line_index = 1
while line:
if line_index >= 0:
line = line.strip()
word_split = line.split(" ")
word = word_split[0]
if word not in g2p_dict:
g2p_dict[word] = []
g2p_dict[word].append(word_split[1:])
line_index = line_index + 1
line = f.readline()
with open(CMU_DICT_HOT_PATH) as f:
line = f.readline()
line_index = 1
while line:
if line_index >= 0:
line = line.strip()
word_split = line.split(" ")
word = word_split[0]
#if word not in g2p_dict:
g2p_dict[word] = []
g2p_dict[word].append(word_split[1:])
line_index = line_index + 1
line = f.readline()
return g2p_dict
def cache_dict(g2p_dict, file_path):
with open(file_path, "wb") as pickle_file:
pickle.dump(g2p_dict, pickle_file)
@ -134,7 +189,7 @@ def get_dict():
with open(CACHE_PATH, "rb") as pickle_file:
g2p_dict = pickle.load(pickle_file)
else:
g2p_dict = read_dict()
g2p_dict = read_dict_new()
cache_dict(g2p_dict, CACHE_PATH)
return g2p_dict

View File

@ -4,8 +4,8 @@ import sys
import pyopenjtalk
from text import symbols
from text import symbols
# Regular expression matching Japanese without punctuation marks:
_japanese_characters = re.compile(
r"[A-Za-z\d\u3005\u3040-\u30ff\u4e00-\u9fff\uff11-\uff19\uff21-\uff3a\uff41-\uff5a\uff66-\uff9d]"
@ -71,7 +71,7 @@ def symbols_to_japanese(text):
return text
def preprocess_jap(text):
def preprocess_jap(text, with_prosody=False):
"""Reference https://r9y9.github.io/ttslearn/latest/notebooks/ch10_Recipe-Tacotron.html"""
text = symbols_to_japanese(text)
sentences = re.split(_japanese_marks, text)
@ -79,10 +79,15 @@ def preprocess_jap(text):
text = []
for i, sentence in enumerate(sentences):
if re.match(_japanese_characters, sentence):
p = pyopenjtalk.g2p(sentence)
text += p.split(" ")
if with_prosody:
text += pyopenjtalk_g2p_prosody(sentence)[1:-1]
else:
p = pyopenjtalk.g2p(sentence)
text += p.split(" ")
if i < len(marks):
if marks[i] == " ":# 防止意外的UNK
continue
text += [marks[i].replace(" ", "")]
return text
@ -91,16 +96,96 @@ def text_normalize(text):
# todo: jap text normalize
return text
# Copied from espnet https://github.com/espnet/espnet/blob/master/espnet2/text/phoneme_tokenizer.py
def pyopenjtalk_g2p_prosody(text, drop_unvoiced_vowels=True):
"""Extract phoneme + prosoody symbol sequence from input full-context labels.
def g2p(norm_text):
phones = preprocess_jap(norm_text)
The algorithm is based on `Prosodic features control by symbols as input of
sequence-to-sequence acoustic modeling for neural TTS`_ with some r9y9's tweaks.
Args:
text (str): Input text.
drop_unvoiced_vowels (bool): whether to drop unvoiced vowels.
Returns:
List[str]: List of phoneme + prosody symbols.
Examples:
>>> from espnet2.text.phoneme_tokenizer import pyopenjtalk_g2p_prosody
>>> pyopenjtalk_g2p_prosody("こんにちは。")
['^', 'k', 'o', '[', 'N', 'n', 'i', 'ch', 'i', 'w', 'a', '$']
.. _`Prosodic features control by symbols as input of sequence-to-sequence acoustic
modeling for neural TTS`: https://doi.org/10.1587/transinf.2020EDP7104
"""
labels = pyopenjtalk.make_label(pyopenjtalk.run_frontend(text))
N = len(labels)
phones = []
for n in range(N):
lab_curr = labels[n]
# current phoneme
p3 = re.search(r"\-(.*?)\+", lab_curr).group(1)
# deal unvoiced vowels as normal vowels
if drop_unvoiced_vowels and p3 in "AEIOU":
p3 = p3.lower()
# deal with sil at the beginning and the end of text
if p3 == "sil":
assert n == 0 or n == N - 1
if n == 0:
phones.append("^")
elif n == N - 1:
# check question form or not
e3 = _numeric_feature_by_regex(r"!(\d+)_", lab_curr)
if e3 == 0:
phones.append("$")
elif e3 == 1:
phones.append("?")
continue
elif p3 == "pau":
phones.append("_")
continue
else:
phones.append(p3)
# accent type and position info (forward or backward)
a1 = _numeric_feature_by_regex(r"/A:([0-9\-]+)\+", lab_curr)
a2 = _numeric_feature_by_regex(r"\+(\d+)\+", lab_curr)
a3 = _numeric_feature_by_regex(r"\+(\d+)/", lab_curr)
# number of mora in accent phrase
f1 = _numeric_feature_by_regex(r"/F:(\d+)_", lab_curr)
a2_next = _numeric_feature_by_regex(r"\+(\d+)\+", labels[n + 1])
# accent phrase border
if a3 == 1 and a2_next == 1 and p3 in "aeiouAEIOUNcl":
phones.append("#")
# pitch falling
elif a1 == 0 and a2_next == a2 + 1 and a2 != f1:
phones.append("]")
# pitch rising
elif a2 == 1 and a2_next == 2:
phones.append("[")
return phones
# Copied from espnet https://github.com/espnet/espnet/blob/master/espnet2/text/phoneme_tokenizer.py
def _numeric_feature_by_regex(regex, s):
match = re.search(regex, s)
if match is None:
return -50
return int(match.group(1))
def g2p(norm_text, with_prosody=False):
phones = preprocess_jap(norm_text, with_prosody)
phones = [post_replace_ph(i) for i in phones]
# todo: implement tones and word2ph
return phones
if __name__ == "__main__":
for line in open("../../../Downloads/transcript_utf8.txt").readlines():
text = line.split(":")[1]
phones = g2p(text)
print(phones)
phones = g2p("こんにちは, hello, AKITOです,よろしくお願いしますね!")
print(phones)

View File

@ -315,6 +315,10 @@ ja_symbols = [
"w",
"y",
"z",
# "[", #上升调型
# "]", #下降调型
# "$", #结束符
# "^", #开始符
]
arpa = {

View File

@ -14,7 +14,7 @@
from typing import List
from typing import Tuple
import jieba
import jieba_fast as jieba
from pypinyin import lazy_pinyin
from pypinyin import Style
@ -455,6 +455,35 @@ class ToneSandhi:
"电子",
"人人",
"虎虎",
"幺幺",
"干嘛",
"学子",
"哈哈",
"数数",
"袅袅",
"局地",
"以下",
"娃哈哈",
"花花草草",
"留得",
"耕地",
"想想",
"熙熙",
"攘攘",
"卵子",
"死死",
"冉冉",
"恳恳",
"佼佼",
"吵吵",
"打打",
"考考",
"整整",
"莘莘",
"落地",
"算子",
"家家户户",
"青青",
}
self.punc = ":,;。?!“”‘’':,;.?!"
@ -643,6 +672,7 @@ class ToneSandhi:
and i + 1 < len(seg)
and seg[i - 1][0] == seg[i + 1][0]
and seg[i - 1][1] == "v"
and seg[i + 1][1] == "v"
):
new_seg[i - 1][0] = new_seg[i - 1][0] + "" + new_seg[i - 1][0]
else:

View File

@ -0,0 +1,16 @@
## Supported NSW (Non-Standard-Word) Normalization
|NSW type|raw|normalized|
|:--|:-|:-|
|serial number|电影中梁朝伟扮演的陈永仁的编号27149|电影中梁朝伟扮演的陈永仁的编号二七一四九|
|cardinal|这块黄金重达324.75克<br>我们班的最高总分为583分|这块黄金重达三百二十四点七五克<br>我们班的最高总分为五百八十三分|
|numeric range |12\~23<br>-1.5\~2|十二到二十三<br>负一点五到二|
|date|她出生于86年8月18日她弟弟出生于1995年3月1日|她出生于八六年八月十八日, 她弟弟出生于一九九五年三月一日|
|time|等会请在12:05请通知我|等会请在十二点零五分请通知我
|temperature|今天的最低气温达到-10°C|今天的最低气温达到零下十度
|fraction|现场有7/12的观众投出了赞成票|现场有十二分之七的观众投出了赞成票|
|percentage|明天有62的概率降雨|明天有百分之六十二的概率降雨|
|money|随便来几个价格12块534.5元20.1万|随便来几个价格十二块五,三十四点五元,二十点一万|
|telephone|这是固话0421-33441122<br>这是手机+86 18544139121|这是固话零四二一三三四四一一二二<br>这是手机八六一八五四四一三九一二一|
## References
[Pull requests #658 of DeepSpeech](https://github.com/PaddlePaddle/DeepSpeech/pull/658/files)

View File

@ -0,0 +1,14 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from text.zh_normalization.text_normlization import *

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,134 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from .num import DIGITS
from .num import num2str
from .num import verbalize_cardinal
from .num import verbalize_digit
def _time_num2str(num_string: str) -> str:
"""A special case for verbalizing number in time."""
result = num2str(num_string.lstrip('0'))
if num_string.startswith('0'):
result = DIGITS['0'] + result
return result
# 时刻表达式
RE_TIME = re.compile(r'([0-1]?[0-9]|2[0-3])'
r':([0-5][0-9])'
r'(:([0-5][0-9]))?')
# 时间范围如8:30-12:30
RE_TIME_RANGE = re.compile(r'([0-1]?[0-9]|2[0-3])'
r':([0-5][0-9])'
r'(:([0-5][0-9]))?'
r'(~|-)'
r'([0-1]?[0-9]|2[0-3])'
r':([0-5][0-9])'
r'(:([0-5][0-9]))?')
def replace_time(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
is_range = len(match.groups()) > 5
hour = match.group(1)
minute = match.group(2)
second = match.group(4)
if is_range:
hour_2 = match.group(6)
minute_2 = match.group(7)
second_2 = match.group(9)
result = f"{num2str(hour)}"
if minute.lstrip('0'):
if int(minute) == 30:
result += ""
else:
result += f"{_time_num2str(minute)}"
if second and second.lstrip('0'):
result += f"{_time_num2str(second)}"
if is_range:
result += ""
result += f"{num2str(hour_2)}"
if minute_2.lstrip('0'):
if int(minute) == 30:
result += ""
else:
result += f"{_time_num2str(minute_2)}"
if second_2 and second_2.lstrip('0'):
result += f"{_time_num2str(second_2)}"
return result
RE_DATE = re.compile(r'(\d{4}|\d{2})年'
r'((0?[1-9]|1[0-2])月)?'
r'(((0?[1-9])|((1|2)[0-9])|30|31)([日号]))?')
def replace_date(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
year = match.group(1)
month = match.group(3)
day = match.group(5)
result = ""
if year:
result += f"{verbalize_digit(year)}"
if month:
result += f"{verbalize_cardinal(month)}"
if day:
result += f"{verbalize_cardinal(day)}{match.group(9)}"
return result
# 用 / 或者 - 分隔的 YY/MM/DD 或者 YY-MM-DD 日期
RE_DATE2 = re.compile(
r'(\d{4})([- /.])(0[1-9]|1[012])\2(0[1-9]|[12][0-9]|3[01])')
def replace_date2(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
year = match.group(1)
month = match.group(3)
day = match.group(4)
result = ""
if year:
result += f"{verbalize_digit(year)}"
if month:
result += f"{verbalize_cardinal(month)}"
if day:
result += f"{verbalize_cardinal(day)}"
return result

View File

@ -0,0 +1,62 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
import string
from pypinyin.constants import SUPPORT_UCS4
# 全角半角转换
# 英文字符全角 -> 半角映射表 (num: 52)
F2H_ASCII_LETTERS = {
ord(char) + 65248: ord(char)
for char in string.ascii_letters
}
# 英文字符半角 -> 全角映射表
H2F_ASCII_LETTERS = {value: key for key, value in F2H_ASCII_LETTERS.items()}
# 数字字符全角 -> 半角映射表 (num: 10)
F2H_DIGITS = {ord(char) + 65248: ord(char) for char in string.digits}
# 数字字符半角 -> 全角映射表
H2F_DIGITS = {value: key for key, value in F2H_DIGITS.items()}
# 标点符号全角 -> 半角映射表 (num: 32)
F2H_PUNCTUATIONS = {ord(char) + 65248: ord(char) for char in string.punctuation}
# 标点符号半角 -> 全角映射表
H2F_PUNCTUATIONS = {value: key for key, value in F2H_PUNCTUATIONS.items()}
# 空格 (num: 1)
F2H_SPACE = {'\u3000': ' '}
H2F_SPACE = {' ': '\u3000'}
# 非"有拼音的汉字"的字符串可用于NSW提取
if SUPPORT_UCS4:
RE_NSW = re.compile(r'(?:[^'
r'\u3007' #
r'\u3400-\u4dbf' # CJK扩展A:[3400-4DBF]
r'\u4e00-\u9fff' # CJK基本:[4E00-9FFF]
r'\uf900-\ufaff' # CJK兼容:[F900-FAFF]
r'\U00020000-\U0002A6DF' # CJK扩展B:[20000-2A6DF]
r'\U0002A703-\U0002B73F' # CJK扩展C:[2A700-2B73F]
r'\U0002B740-\U0002B81D' # CJK扩展D:[2B740-2B81D]
r'\U0002F80A-\U0002FA1F' # CJK兼容扩展:[2F800-2FA1F]
r'])+')
else:
RE_NSW = re.compile( # pragma: no cover
r'(?:[^'
r'\u3007' #
r'\u3400-\u4dbf' # CJK扩展A:[3400-4DBF]
r'\u4e00-\u9fff' # CJK基本:[4E00-9FFF]
r'\uf900-\ufaff' # CJK兼容:[F900-FAFF]
r'])+')

View File

@ -0,0 +1,238 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Rules to verbalize numbers into Chinese characters.
https://zh.wikipedia.org/wiki/中文数字#現代中文
"""
import re
from collections import OrderedDict
from typing import List
DIGITS = {str(i): tran for i, tran in enumerate('零一二三四五六七八九')}
UNITS = OrderedDict({
1: '',
2: '',
3: '',
4: '',
8: '亿',
})
COM_QUANTIFIERS = '(封|艘|把|目|套|段|人|所|朵|匹|张|座|回|场|尾|条|个|首|阙|阵|网|炮|顶|丘|棵|只|支|袭|辆|挑|担|颗|壳|窠|曲|墙|群|腔|砣|座|客|贯|扎|捆|刀|令|打|手|罗|坡|山|岭|江|溪|钟|队|单|双|对|出|口|头|脚|板|跳|枝|件|贴|针|线|管|名|位|身|堂|课|本|页|家|户|层|丝|毫|厘|分|钱|两|斤|担|铢|石|钧|锱|忽|(千|毫|微)克|毫|厘|(公)分|分|寸|尺|丈|里|寻|常|铺|程|(千|分|厘|毫|微)米|米|撮|勺|合|升|斗|石|盘|碗|碟|叠|桶|笼|盆|盒|杯|钟|斛|锅|簋|篮|盘|桶|罐|瓶|壶|卮|盏|箩|箱|煲|啖|袋|钵|年|月|日|季|刻|时|周|天|秒|分|小时|旬|纪|岁|世|更|夜|春|夏|秋|冬|代|伏|辈|丸|泡|粒|颗|幢|堆|条|根|支|道|面|片|张|颗|块|元|(亿|千万|百万|万|千|百)|(亿|千万|百万|万|千|百|美|)元|(亿|千万|百万|万|千|百|十|)吨|(亿|千万|百万|万|千|百|)块|角|毛|分)'
# 分数表达式
RE_FRAC = re.compile(r'(-?)(\d+)/(\d+)')
def replace_frac(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
sign = match.group(1)
nominator = match.group(2)
denominator = match.group(3)
sign: str = "" if sign else ""
nominator: str = num2str(nominator)
denominator: str = num2str(denominator)
result = f"{sign}{denominator}分之{nominator}"
return result
# 百分数表达式
RE_PERCENTAGE = re.compile(r'(-?)(\d+(\.\d+)?)%')
def replace_percentage(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
sign = match.group(1)
percent = match.group(2)
sign: str = "" if sign else ""
percent: str = num2str(percent)
result = f"{sign}百分之{percent}"
return result
# 整数表达式
# 带负号的整数 -10
RE_INTEGER = re.compile(r'(-)' r'(\d+)')
def replace_negative_num(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
sign = match.group(1)
number = match.group(2)
sign: str = "" if sign else ""
number: str = num2str(number)
result = f"{sign}{number}"
return result
# 编号-无符号整形
# 00078
RE_DEFAULT_NUM = re.compile(r'\d{3}\d*')
def replace_default_num(match):
"""
Args:
match (re.Match)
Returns:
str
"""
number = match.group(0)
return verbalize_digit(number, alt_one=True)
# 数字表达式
# 纯小数
RE_DECIMAL_NUM = re.compile(r'(-?)((\d+)(\.\d+))' r'|(\.(\d+))')
# 正整数 + 量词
RE_POSITIVE_QUANTIFIERS = re.compile(r"(\d+)([多余几\+])?" + COM_QUANTIFIERS)
RE_NUMBER = re.compile(r'(-?)((\d+)(\.\d+)?)' r'|(\.(\d+))')
def replace_positive_quantifier(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
number = match.group(1)
match_2 = match.group(2)
if match_2 == "+":
match_2 = ""
match_2: str = match_2 if match_2 else ""
quantifiers: str = match.group(3)
number: str = num2str(number)
result = f"{number}{match_2}{quantifiers}"
return result
def replace_number(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
sign = match.group(1)
number = match.group(2)
pure_decimal = match.group(5)
if pure_decimal:
result = num2str(pure_decimal)
else:
sign: str = "" if sign else ""
number: str = num2str(number)
result = f"{sign}{number}"
return result
# 范围表达式
# match.group(1) and match.group(8) are copy from RE_NUMBER
RE_RANGE = re.compile(
r'((-?)((\d+)(\.\d+)?)|(\.(\d+)))[-~]((-?)((\d+)(\.\d+)?)|(\.(\d+)))')
def replace_range(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
first, second = match.group(1), match.group(8)
first = RE_NUMBER.sub(replace_number, first)
second = RE_NUMBER.sub(replace_number, second)
result = f"{first}{second}"
return result
def _get_value(value_string: str, use_zero: bool=True) -> List[str]:
stripped = value_string.lstrip('0')
if len(stripped) == 0:
return []
elif len(stripped) == 1:
if use_zero and len(stripped) < len(value_string):
return [DIGITS['0'], DIGITS[stripped]]
else:
return [DIGITS[stripped]]
else:
largest_unit = next(
power for power in reversed(UNITS.keys()) if power < len(stripped))
first_part = value_string[:-largest_unit]
second_part = value_string[-largest_unit:]
return _get_value(first_part) + [UNITS[largest_unit]] + _get_value(
second_part)
def verbalize_cardinal(value_string: str) -> str:
if not value_string:
return ''
# 000 -> '零' , 0 -> '零'
value_string = value_string.lstrip('0')
if len(value_string) == 0:
return DIGITS['0']
result_symbols = _get_value(value_string)
# verbalized number starting with '一十*' is abbreviated as `十*`
if len(result_symbols) >= 2 and result_symbols[0] == DIGITS[
'1'] and result_symbols[1] == UNITS[1]:
result_symbols = result_symbols[1:]
return ''.join(result_symbols)
def verbalize_digit(value_string: str, alt_one=False) -> str:
result_symbols = [DIGITS[digit] for digit in value_string]
result = ''.join(result_symbols)
if alt_one:
result = result.replace("", "")
return result
def num2str(value_string: str) -> str:
integer_decimal = value_string.split('.')
if len(integer_decimal) == 1:
integer = integer_decimal[0]
decimal = ''
elif len(integer_decimal) == 2:
integer, decimal = integer_decimal
else:
raise ValueError(
f"The value string: '${value_string}' has more than one point in it."
)
result = verbalize_cardinal(integer)
decimal = decimal.rstrip('0')
if decimal:
# '.22' is verbalized as '零点二二'
# '3.20' is verbalized as '三点二
result = result if result else ""
result += '' + verbalize_digit(decimal)
return result

View File

@ -0,0 +1,63 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from .num import verbalize_digit
# 规范化固话/手机号码
# 手机
# http://www.jihaoba.com/news/show/13680
# 移动139、138、137、136、135、134、159、158、157、150、151、152、188、187、182、183、184、178、198
# 联通130、131、132、156、155、186、185、176
# 电信133、153、189、180、181、177
RE_MOBILE_PHONE = re.compile(
r"(?<!\d)((\+?86 ?)?1([38]\d|5[0-35-9]|7[678]|9[89])\d{8})(?!\d)")
RE_TELEPHONE = re.compile(
r"(?<!\d)((0(10|2[1-3]|[3-9]\d{2})-?)?[1-9]\d{6,7})(?!\d)")
# 全国统一的号码400开头
RE_NATIONAL_UNIFORM_NUMBER = re.compile(r"(400)(-)?\d{3}(-)?\d{4}")
def phone2str(phone_string: str, mobile=True) -> str:
if mobile:
sp_parts = phone_string.strip('+').split()
result = ''.join(
[verbalize_digit(part, alt_one=True) for part in sp_parts])
return result
else:
sil_parts = phone_string.split('-')
result = ''.join(
[verbalize_digit(part, alt_one=True) for part in sil_parts])
return result
def replace_phone(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
return phone2str(match.group(0), mobile=False)
def replace_mobile(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
return phone2str(match.group(0))

View File

@ -0,0 +1,63 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from .num import num2str
# 温度表达式,温度会影响负号的读法
# -3°C 零下三度
RE_TEMPERATURE = re.compile(r'(-?)(\d+(\.\d+)?)(°C|℃|度|摄氏度)')
measure_dict = {
"cm2": "平方厘米",
"cm²": "平方厘米",
"cm3": "立方厘米",
"cm³": "立方厘米",
"cm": "厘米",
"db": "分贝",
"ds": "毫秒",
"kg": "千克",
"km": "千米",
"m2": "平方米",
"": "平方米",
"": "立方米",
"m3": "立方米",
"ml": "毫升",
"m": "",
"mm": "毫米",
"s": ""
}
def replace_temperature(match) -> str:
"""
Args:
match (re.Match)
Returns:
str
"""
sign = match.group(1)
temperature = match.group(2)
unit = match.group(3)
sign: str = "零下" if sign else ""
temperature: str = num2str(temperature)
unit: str = "摄氏度" if unit == "摄氏度" else ""
result = f"{sign}{temperature}{unit}"
return result
def replace_measure(sentence) -> str:
for q_notation in measure_dict:
if q_notation in sentence:
sentence = sentence.replace(q_notation, measure_dict[q_notation])
return sentence

View File

@ -0,0 +1,154 @@
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from typing import List
from .char_convert import tranditional_to_simplified
from .chronology import RE_DATE
from .chronology import RE_DATE2
from .chronology import RE_TIME
from .chronology import RE_TIME_RANGE
from .chronology import replace_date
from .chronology import replace_date2
from .chronology import replace_time
from .constants import F2H_ASCII_LETTERS
from .constants import F2H_DIGITS
from .constants import F2H_SPACE
from .num import RE_DECIMAL_NUM
from .num import RE_DEFAULT_NUM
from .num import RE_FRAC
from .num import RE_INTEGER
from .num import RE_NUMBER
from .num import RE_PERCENTAGE
from .num import RE_POSITIVE_QUANTIFIERS
from .num import RE_RANGE
from .num import replace_default_num
from .num import replace_frac
from .num import replace_negative_num
from .num import replace_number
from .num import replace_percentage
from .num import replace_positive_quantifier
from .num import replace_range
from .phonecode import RE_MOBILE_PHONE
from .phonecode import RE_NATIONAL_UNIFORM_NUMBER
from .phonecode import RE_TELEPHONE
from .phonecode import replace_mobile
from .phonecode import replace_phone
from .quantifier import RE_TEMPERATURE
from .quantifier import replace_measure
from .quantifier import replace_temperature
class TextNormalizer():
def __init__(self):
self.SENTENCE_SPLITOR = re.compile(r'([:、,;。?!,;?!][”’]?)')
def _split(self, text: str, lang="zh") -> List[str]:
"""Split long text into sentences with sentence-splitting punctuations.
Args:
text (str): The input text.
Returns:
List[str]: Sentences.
"""
# Only for pure Chinese here
if lang == "zh":
text = text.replace(" ", "")
# 过滤掉特殊字符
text = re.sub(r'[——《》【】<=>{}()#&@“”^_|…\\]', '', text)
text = self.SENTENCE_SPLITOR.sub(r'\1\n', text)
text = text.strip()
sentences = [sentence.strip() for sentence in re.split(r'\n+', text)]
return sentences
def _post_replace(self, sentence: str) -> str:
sentence = sentence.replace('/', '')
sentence = sentence.replace('~', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('', '')
sentence = sentence.replace('α', '阿尔法')
sentence = sentence.replace('β', '贝塔')
sentence = sentence.replace('γ', '伽玛').replace('Γ', '伽玛')
sentence = sentence.replace('δ', '德尔塔').replace('Δ', '德尔塔')
sentence = sentence.replace('ε', '艾普西龙')
sentence = sentence.replace('ζ', '捷塔')
sentence = sentence.replace('η', '依塔')
sentence = sentence.replace('θ', '西塔').replace('Θ', '西塔')
sentence = sentence.replace('ι', '艾欧塔')
sentence = sentence.replace('κ', '喀帕')
sentence = sentence.replace('λ', '拉姆达').replace('Λ', '拉姆达')
sentence = sentence.replace('μ', '')
sentence = sentence.replace('ν', '')
sentence = sentence.replace('ξ', '克西').replace('Ξ', '克西')
sentence = sentence.replace('ο', '欧米克伦')
sentence = sentence.replace('π', '').replace('Π', '')
sentence = sentence.replace('ρ', '')
sentence = sentence.replace('ς', '西格玛').replace('Σ', '西格玛').replace(
'σ', '西格玛')
sentence = sentence.replace('τ', '')
sentence = sentence.replace('υ', '宇普西龙')
sentence = sentence.replace('φ', '服艾').replace('Φ', '服艾')
sentence = sentence.replace('χ', '')
sentence = sentence.replace('ψ', '普赛').replace('Ψ', '普赛')
sentence = sentence.replace('ω', '欧米伽').replace('Ω', '欧米伽')
# re filter special characters, have one more character "-" than line 68
sentence = re.sub(r'[-——《》【】<=>{}()#&@“”^_|…\\]', '', sentence)
return sentence
def normalize_sentence(self, sentence: str) -> str:
# basic character conversions
sentence = tranditional_to_simplified(sentence)
sentence = sentence.translate(F2H_ASCII_LETTERS).translate(
F2H_DIGITS).translate(F2H_SPACE)
# number related NSW verbalization
sentence = RE_DATE.sub(replace_date, sentence)
sentence = RE_DATE2.sub(replace_date2, sentence)
# range first
sentence = RE_TIME_RANGE.sub(replace_time, sentence)
sentence = RE_TIME.sub(replace_time, sentence)
sentence = RE_TEMPERATURE.sub(replace_temperature, sentence)
sentence = replace_measure(sentence)
sentence = RE_FRAC.sub(replace_frac, sentence)
sentence = RE_PERCENTAGE.sub(replace_percentage, sentence)
sentence = RE_MOBILE_PHONE.sub(replace_mobile, sentence)
sentence = RE_TELEPHONE.sub(replace_phone, sentence)
sentence = RE_NATIONAL_UNIFORM_NUMBER.sub(replace_phone, sentence)
sentence = RE_RANGE.sub(replace_range, sentence)
sentence = RE_INTEGER.sub(replace_negative_num, sentence)
sentence = RE_DECIMAL_NUM.sub(replace_number, sentence)
sentence = RE_POSITIVE_QUANTIFIERS.sub(replace_positive_quantifier,
sentence)
sentence = RE_DEFAULT_NUM.sub(replace_default_num, sentence)
sentence = RE_NUMBER.sub(replace_number, sentence)
sentence = self._post_replace(sentence)
return sentence
def normalize(self, text: str) -> List[str]:
sentences = self._split(text)
sentences = [self.normalize_sentence(sent) for sent in sentences]
return sentences

View File

@ -64,6 +64,14 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False
)
return model, optimizer, learning_rate, iteration
from time import time as ttime
import shutil
def my_save(fea,path):#####fix issue: torch.save doesn't support chinese path
dir=os.path.dirname(path)
name=os.path.basename(path)
tmp_path="%s.pth"%(ttime())
torch.save(fea,tmp_path)
shutil.move(tmp_path,"%s/%s"%(dir,name))
def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path):
logger.info(
@ -75,7 +83,8 @@ def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path)
state_dict = model.module.state_dict()
else:
state_dict = model.state_dict()
torch.save(
# torch.save(
my_save(
{
"model": state_dict,
"iteration": iteration,

164
README.md
View File

@ -3,27 +3,30 @@
<h1>GPT-SoVITS-WebUI</h1>
A Powerful Few-shot Voice Conversion and Text-to-Speech WebUI.<br><br>
[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange
)](https://github.com/RVC-Boss/GPT-SoVITS)
[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange)](https://github.com/RVC-Boss/GPT-SoVITS)
<img src="https://counter.seku.su/cmoe?name=gptsovits&theme=r34" /><br>
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/colab_webui.ipynb)
[![Licence](https://img.shields.io/badge/LICENSE-MIT-green.svg?style=for-the-badge)](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
[![Huggingface](https://img.shields.io/badge/🤗%20-Spaces-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)
[![Huggingface](https://img.shields.io/badge/🤗%20-Models%20Repo-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)
[**English**](./README.md) | [**中文简体**](./docs/cn/README.md)
[**English**](./README.md) | [**中文简体**](./docs/cn/README.md) | [**日本語**](./docs/ja/README.md) | [**한국어**](./docs/ko/README.md)
</div>
------
---
> Check out our [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw) here!
Unseen speakers few-shot fine-tuning demo:
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
For users in China region, you can use AutoDL Cloud Docker to experience the full functionality online: https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official
## Features:
1. **Zero-shot TTS:** Input a 5-second vocal sample and experience instant text-to-speech conversion.
2. **Few-shot TTS:** Fine-tune the model with just 1 minute of training data for improved voice similarity and realism.
@ -36,9 +39,13 @@ https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-
If you are a Windows user (tested with win>=10) you can install directly via the prezip. Just download the [prezip](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-beta.7z?download=true), unzip it and double-click go-webui.bat to start GPT-SoVITS-WebUI.
### Python and PyTorch Version
### Tested Environments
Tested with Python 3.9, PyTorch 2.0.1, and CUDA 11.
- Python 3.9, PyTorch 2.0.1, CUDA 11
- Python 3.10.13, PyTorch 2.1.2, CUDA 12.3
- Python 3.9, PyTorch 2.3.0.dev20240122, macOS 14.3 (Apple silicon, GPU)
_Note: numba==0.56.4 require py<3.11_
### Quick Install with Conda
@ -47,24 +54,19 @@ conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
bash install.sh
```
### Install Manually
#### Pip Packages
```bash
pip install torch numpy scipy tensorboard librosa==0.9.2 numba==0.56.4 pytorch-lightning gradio==3.14.0 ffmpeg-python onnxruntime tqdm cn2an pypinyin pyopenjtalk g2p_en chardet
```
#### Additional Requirements
If you need Chinese ASR (supported by FunASR), install:
```bash
pip install modelscope torchaudio sentencepiece funasr
pip install -r requirements.txt
```
#### FFmpeg
##### Conda Users
```bash
conda install ffmpeg
```
@ -89,13 +91,71 @@ Download and place [ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWeb
### Pretrained Models
Download pretrained models from [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) and place them in `GPT_SoVITS\pretrained_models`.
For Chinese ASR (additionally), download models from [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files), [Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files), and [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) and place them in `tools/damo_asr/models`.
Download pretrained models from [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) and place them in `GPT_SoVITS/pretrained_models`.
For UVR5 (Vocals/Accompaniment Separation & Reverberation Removal, additionally), download models from [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) and place them in `tools/uvr5/uvr5_weights`.
Users in China region can download these two models by entering the links below and clicking "Download a copy"
- [GPT-SoVITS Models](https://www.icloud.com.cn/iclouddrive/056y_Xog_HXpALuVUjscIwTtg#GPT-SoVITS_Models)
- [UVR5 Weights](https://www.icloud.com.cn/iclouddrive/0bekRKDiJXboFhbfm3lM2fVbA#UVR5_Weights)
For Chinese ASR (additionally), download models from [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files), [Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files), and [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) and place them in `tools/damo_asr/models`.
### For Mac Users
If you are a Mac user, make sure you meet the following conditions for training and inferencing with GPU:
- Mac computers with Apple silicon or AMD GPUs
- macOS 12.3 or later
- Xcode command-line tools installed by running `xcode-select --install`
_Other Macs can do inference with CPU only._
Then install by using the following commands:
#### Create Environment
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
```
#### Install Requirements
```bash
pip install -r requirements.txt
pip uninstall torch torchaudio
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```
### Using Docker
#### docker-compose.yaml configuration
0. Regarding image tags: Due to rapid updates in the codebase and the slow process of packaging and testing images, please check [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits) for the currently packaged latest images and select as per your situation, or alternatively, build locally using a Dockerfile according to your own needs.
1. Environment Variables
- is_half: Controls half-precision/double-precision. This is typically the cause if the content under the directories 4-cnhubert/5-wav32k is not generated correctly during the "SSL extracting" step. Adjust to True or False based on your actual situation.
2. Volumes ConfigurationThe application's root directory inside the container is set to /workspace. The default docker-compose.yaml lists some practical examples for uploading/downloading content.
3. shm_size The default available memory for Docker Desktop on Windows is too small, which can cause abnormal operations. Adjust according to your own situation.
4. Under the deploy section, GPU-related settings should be adjusted cautiously according to your system and actual circumstances.
#### Running with docker compose
```
docker compose -f "docker-compose.yaml" up -d
```
#### Running with docker command
As above, modify the corresponding parameters based on your actual situation, then run the following command:
```
docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-DockerTest\output:/workspace/output --volume=G:\GPT-SoVITS-DockerTest\logs:/workspace/logs --volume=G:\GPT-SoVITS-DockerTest\SoVITS_weights:/workspace/SoVITS_weights --workdir=/workspace -p 9880:9880 -p 9871:9871 -p 9872:9872 -p 9873:9873 -p 9874:9874 --shm-size="16G" -d breakstring/gpt-sovits:xxxxx
```
## Dataset Format
@ -116,24 +176,61 @@ Example:
```
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
```
## Todo List
- [ ] **High Priority:**
- [ ] Localization in Japanese and English.
- [ ] User guide.
- [x] Localization in Japanese and English.
- [ ] User guide.
- [x] Japanese and English dataset fine tune training.
- [ ] **Features:**
- [ ] Zero-shot voice conversion (5s) / few-shot voice conversion (1min).
- [ ] TTS speaking speed control.
- [ ] Enhanced TTS emotion control.
- [ ] Experiment with changing SoVITS token inputs to probability distribution of vocabs.
- [ ] Improve English and Japanese text frontend.
- [ ] Develop tiny and larger-sized TTS models.
- [ ] Colab scripts.
- [ ] Expand training dataset (2k -> 10k).
- [ ] Zero-shot voice conversion (5s) / few-shot voice conversion (1min).
- [ ] TTS speaking speed control.
- [ ] Enhanced TTS emotion control.
- [ ] Experiment with changing SoVITS token inputs to probability distribution of vocabs.
- [ ] Improve English and Japanese text frontend.
- [ ] Develop tiny and larger-sized TTS models.
- [x] Colab scripts.
- [ ] Try expand training dataset (2k hours -> 10k hours).
- [ ] better sovits base model (enhanced audio quality)
- [ ] model mix
## (Optional) If you need, here will provide the command line operation mode
Use the command line to open the WebUI for UVR5
```
python tools/uvr5/webui.py "<infer_device>" <is_half> <webui_port_uvr5>
```
If you can't open a browser, follow the format below for UVR processing,This is using mdxnet for audio processing
```
python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level --format --device --is_half_precision
```
This is how the audio segmentation of the dataset is done using the command line
```
python audio_slicer.py \
--input_path "<path_to_original_audio_file_or_directory>" \
--output_root "<directory_where_subdivided_audio_clips_will_be_saved>" \
--threshold <volume_threshold> \
--min_length <minimum_duration_of_each_subclip> \
--min_interval <shortest_time_gap_between_adjacent_subclips>
--hop_size <step_size_for_computing_volume_curve>
```
This is how dataset ASR processing is done using the command line(Only Chinese)
```
python tools/damo_asr/cmd-asr.py "<Path to the directory containing input audio files>"
```
ASR processing is performed through Faster_Whisper(ASR marking except Chinese)
(No progress bars, GPU performance may cause time delays)
```
python ./tools/damo_asr/WhisperASR.py -i <input> -o <output> -f <file_name.list> -l <language>
```
A custom list save path is enabled
## Credits
Special thanks to the following projects and contributors:
- [ar-vits](https://github.com/innnky/ar-vits)
@ -152,6 +249,7 @@ Special thanks to the following projects and contributors:
- [gradio](https://github.com/gradio-app/gradio)
## Thanks to all contributors for their efforts
<a href="https://github.com/RVC-Boss/GPT-SoVITS/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=RVC-Boss/GPT-SoVITS" />
</a>

510
api.py Normal file
View File

@ -0,0 +1,510 @@
"""
# api.py usage
` python api.py -dr "123.wav" -dt "一二三。" -dl "zh" `
## 执行参数:
`-s` - `SoVITS模型路径, 可在 config.py 中指定`
`-g` - `GPT模型路径, 可在 config.py 中指定`
调用请求缺少参考音频时使用
`-dr` - `默认参考音频路径`
`-dt` - `默认参考音频文本`
`-dl` - `默认参考音频语种, "中文","英文","日文","zh","en","ja"`
`-d` - `推理设备, "cuda","cpu","mps"`
`-a` - `绑定地址, 默认"127.0.0.1"`
`-p` - `绑定端口, 默认9880, 可在 config.py 中指定`
`-fp` - `覆盖 config.py 使用全精度`
`-hp` - `覆盖 config.py 使用半精度`
`-hb` - `cnhubert路径`
`-b` - `bert路径`
## 调用:
### 推理
endpoint: `/`
使用执行参数指定的参考音频:
GET:
`http://127.0.0.1:9880?text=先帝创业未半而中道崩殂今天下三分益州疲弊此诚危急存亡之秋也&text_language=zh`
POST:
```json
{
"text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。",
"text_language": "zh"
}
```
手动指定当次推理所使用的参考音频:
GET:
`http://127.0.0.1:9880?refer_wav_path=123.wav&prompt_text=一二三&prompt_language=zh&text=先帝创业未半而中道崩殂今天下三分益州疲弊此诚危急存亡之秋也&text_language=zh`
POST:
```json
{
"refer_wav_path": "123.wav",
"prompt_text": "一二三。",
"prompt_language": "zh",
"text": "先帝创业未半而中道崩殂,今天下三分,益州疲弊,此诚危急存亡之秋也。",
"text_language": "zh"
}
```
RESP:
成功: 直接返回 wav 音频流 http code 200
失败: 返回包含错误信息的 json, http code 400
### 更换默认参考音频
endpoint: `/change_refer`
key与推理端一样
GET:
`http://127.0.0.1:9880/change_refer?refer_wav_path=123.wav&prompt_text=一二三&prompt_language=zh`
POST:
```json
{
"refer_wav_path": "123.wav",
"prompt_text": "一二三。",
"prompt_language": "zh"
}
```
RESP:
成功: json, http code 200
失败: json, 400
### 命令控制
endpoint: `/control`
command:
"restart": 重新运行
"exit": 结束运行
GET:
`http://127.0.0.1:9880/control?command=restart`
POST:
```json
{
"command": "restart"
}
```
RESP:
"""
import argparse
import os
import sys
now_dir = os.getcwd()
sys.path.append(now_dir)
sys.path.append("%s/GPT_SoVITS" % (now_dir))
import signal
from time import time as ttime
import torch
import librosa
import soundfile as sf
from fastapi import FastAPI, Request, HTTPException
from fastapi.responses import StreamingResponse, JSONResponse
import uvicorn
from transformers import AutoModelForMaskedLM, AutoTokenizer
import numpy as np
from feature_extractor import cnhubert
from io import BytesIO
from module.models import SynthesizerTrn
from AR.models.t2s_lightning_module import Text2SemanticLightningModule
from text import cleaned_text_to_sequence
from text.cleaner import clean_text
from module.mel_processing import spectrogram_torch
from my_utils import load_audio
import config as global_config
g_config = global_config.Config()
# AVAILABLE_COMPUTE = "cuda" if torch.cuda.is_available() else "cpu"
parser = argparse.ArgumentParser(description="GPT-SoVITS api")
parser.add_argument("-s", "--sovits_path", type=str, default=g_config.sovits_path, help="SoVITS模型路径")
parser.add_argument("-g", "--gpt_path", type=str, default=g_config.gpt_path, help="GPT模型路径")
parser.add_argument("-dr", "--default_refer_path", type=str, default="", help="默认参考音频路径")
parser.add_argument("-dt", "--default_refer_text", type=str, default="", help="默认参考音频文本")
parser.add_argument("-dl", "--default_refer_language", type=str, default="", help="默认参考音频语种")
parser.add_argument("-d", "--device", type=str, default=g_config.infer_device, help="cuda / cpu / mps")
parser.add_argument("-a", "--bind_addr", type=str, default="127.0.0.1", help="default: 127.0.0.1")
parser.add_argument("-p", "--port", type=int, default=g_config.api_port, help="default: 9880")
parser.add_argument("-fp", "--full_precision", action="store_true", default=False, help="覆盖config.is_half为False, 使用全精度")
parser.add_argument("-hp", "--half_precision", action="store_true", default=False, help="覆盖config.is_half为True, 使用半精度")
# bool值的用法为 `python ./api.py -fp ...`
# 此时 full_precision==True, half_precision==False
parser.add_argument("-hb", "--hubert_path", type=str, default=g_config.cnhubert_path, help="覆盖config.cnhubert_path")
parser.add_argument("-b", "--bert_path", type=str, default=g_config.bert_path, help="覆盖config.bert_path")
args = parser.parse_args()
sovits_path = args.sovits_path
gpt_path = args.gpt_path
class DefaultRefer:
def __init__(self, path, text, language):
self.path = args.default_refer_path
self.text = args.default_refer_text
self.language = args.default_refer_language
def is_ready(self) -> bool:
return is_full(self.path, self.text, self.language)
default_refer = DefaultRefer(args.default_refer_path, args.default_refer_text, args.default_refer_language)
device = args.device
port = args.port
host = args.bind_addr
if sovits_path == "":
sovits_path = g_config.pretrained_sovits_path
print(f"[WARN] 未指定SoVITS模型路径, fallback后当前值: {sovits_path}")
if gpt_path == "":
gpt_path = g_config.pretrained_gpt_path
print(f"[WARN] 未指定GPT模型路径, fallback后当前值: {gpt_path}")
# 指定默认参考音频, 调用方 未提供/未给全 参考音频参数时使用
if default_refer.path == "" or default_refer.text == "" or default_refer.language == "":
default_refer.path, default_refer.text, default_refer.language = "", "", ""
print("[INFO] 未指定默认参考音频")
else:
print(f"[INFO] 默认参考音频路径: {default_refer.path}")
print(f"[INFO] 默认参考音频文本: {default_refer.text}")
print(f"[INFO] 默认参考音频语种: {default_refer.language}")
is_half = g_config.is_half
if args.full_precision:
is_half = False
if args.half_precision:
is_half = True
if args.full_precision and args.half_precision:
is_half = g_config.is_half # 炒饭fallback
print(f"[INFO] 半精: {is_half}")
cnhubert_base_path = args.hubert_path
bert_path = args.bert_path
cnhubert.cnhubert_base_path = cnhubert_base_path
tokenizer = AutoTokenizer.from_pretrained(bert_path)
bert_model = AutoModelForMaskedLM.from_pretrained(bert_path)
if is_half:
bert_model = bert_model.half().to(device)
else:
bert_model = bert_model.to(device)
def is_empty(*items): # 任意一项不为空返回False
for item in items:
if item is not None and item != "":
return False
return True
def is_full(*items): # 任意一项为空返回False
for item in items:
if item is None or item == "":
return False
return True
def get_bert_feature(text, word2ph):
with torch.no_grad():
inputs = tokenizer(text, return_tensors="pt")
for i in inputs:
inputs[i] = inputs[i].to(device) #####输入是long不用管精度问题精度随bert_model
res = bert_model(**inputs, output_hidden_states=True)
res = torch.cat(res["hidden_states"][-3:-2], -1)[0].cpu()[1:-1]
assert len(word2ph) == len(text)
phone_level_feature = []
for i in range(len(word2ph)):
repeat_feature = res[i].repeat(word2ph[i], 1)
phone_level_feature.append(repeat_feature)
phone_level_feature = torch.cat(phone_level_feature, dim=0)
# if(is_half==True):phone_level_feature=phone_level_feature.half()
return phone_level_feature.T
n_semantic = 1024
dict_s2 = torch.load(sovits_path, map_location="cpu")
hps = dict_s2["config"]
class DictToAttrRecursive:
def __init__(self, input_dict):
for key, value in input_dict.items():
if isinstance(value, dict):
# 如果值是字典,递归调用构造函数
setattr(self, key, DictToAttrRecursive(value))
else:
setattr(self, key, value)
hps = DictToAttrRecursive(hps)
hps.model.semantic_frame_rate = "25hz"
dict_s1 = torch.load(gpt_path, map_location="cpu")
config = dict_s1["config"]
ssl_model = cnhubert.get_model()
if is_half:
ssl_model = ssl_model.half().to(device)
else:
ssl_model = ssl_model.to(device)
vq_model = SynthesizerTrn(
hps.data.filter_length // 2 + 1,
hps.train.segment_size // hps.data.hop_length,
n_speakers=hps.data.n_speakers,
**hps.model)
if is_half:
vq_model = vq_model.half().to(device)
else:
vq_model = vq_model.to(device)
vq_model.eval()
print(vq_model.load_state_dict(dict_s2["weight"], strict=False))
hz = 50
max_sec = config['data']['max_sec']
t2s_model = Text2SemanticLightningModule(config, "****", is_train=False)
t2s_model.load_state_dict(dict_s1["weight"])
if is_half:
t2s_model = t2s_model.half()
t2s_model = t2s_model.to(device)
t2s_model.eval()
total = sum([param.nelement() for param in t2s_model.parameters()])
print("Number of parameter: %.2fM" % (total / 1e6))
def get_spepc(hps, filename):
audio = load_audio(filename, int(hps.data.sampling_rate))
audio = torch.FloatTensor(audio)
audio_norm = audio
audio_norm = audio_norm.unsqueeze(0)
spec = spectrogram_torch(audio_norm, hps.data.filter_length, hps.data.sampling_rate, hps.data.hop_length,
hps.data.win_length, center=False)
return spec
dict_language = {
"中文": "zh",
"英文": "en",
"日文": "ja",
"ZH": "zh",
"EN": "en",
"JA": "ja",
"zh": "zh",
"en": "en",
"ja": "ja"
}
def get_tts_wav(ref_wav_path, prompt_text, prompt_language, text, text_language):
t0 = ttime()
prompt_text = prompt_text.strip("\n")
prompt_language, text = prompt_language, text.strip("\n")
zero_wav = np.zeros(int(hps.data.sampling_rate * 0.3), dtype=np.float16 if is_half == True else np.float32)
with torch.no_grad():
wav16k, sr = librosa.load(ref_wav_path, sr=16000)
wav16k = torch.from_numpy(wav16k)
zero_wav_torch = torch.from_numpy(zero_wav)
if (is_half == True):
wav16k = wav16k.half().to(device)
zero_wav_torch = zero_wav_torch.half().to(device)
else:
wav16k = wav16k.to(device)
zero_wav_torch = zero_wav_torch.to(device)
wav16k = torch.cat([wav16k, zero_wav_torch])
ssl_content = ssl_model.model(wav16k.unsqueeze(0))["last_hidden_state"].transpose(1, 2) # .float()
codes = vq_model.extract_latent(ssl_content)
prompt_semantic = codes[0, 0]
t1 = ttime()
prompt_language = dict_language[prompt_language]
text_language = dict_language[text_language]
phones1, word2ph1, norm_text1 = clean_text(prompt_text, prompt_language)
phones1 = cleaned_text_to_sequence(phones1)
texts = text.split("\n")
audio_opt = []
for text in texts:
phones2, word2ph2, norm_text2 = clean_text(text, text_language)
phones2 = cleaned_text_to_sequence(phones2)
if (prompt_language == "zh"):
bert1 = get_bert_feature(norm_text1, word2ph1).to(device)
else:
bert1 = torch.zeros((1024, len(phones1)), dtype=torch.float16 if is_half == True else torch.float32).to(
device)
if (text_language == "zh"):
bert2 = get_bert_feature(norm_text2, word2ph2).to(device)
else:
bert2 = torch.zeros((1024, len(phones2))).to(bert1)
bert = torch.cat([bert1, bert2], 1)
all_phoneme_ids = torch.LongTensor(phones1 + phones2).to(device).unsqueeze(0)
bert = bert.to(device).unsqueeze(0)
all_phoneme_len = torch.tensor([all_phoneme_ids.shape[-1]]).to(device)
prompt = prompt_semantic.unsqueeze(0).to(device)
t2 = ttime()
with torch.no_grad():
# pred_semantic = t2s_model.model.infer(
pred_semantic, idx = t2s_model.model.infer_panel(
all_phoneme_ids,
all_phoneme_len,
prompt,
bert,
# prompt_phone_len=ph_offset,
top_k=config['inference']['top_k'],
early_stop_num=hz * max_sec)
t3 = ttime()
# print(pred_semantic.shape,idx)
pred_semantic = pred_semantic[:, -idx:].unsqueeze(0) # .unsqueeze(0)#mq要多unsqueeze一次
refer = get_spepc(hps, ref_wav_path) # .to(device)
if (is_half == True):
refer = refer.half().to(device)
else:
refer = refer.to(device)
# audio = vq_model.decode(pred_semantic, all_phoneme_ids, refer).detach().cpu().numpy()[0, 0]
audio = \
vq_model.decode(pred_semantic, torch.LongTensor(phones2).to(device).unsqueeze(0),
refer).detach().cpu().numpy()[
0, 0] ###试试重建不带上prompt部分
audio_opt.append(audio)
audio_opt.append(zero_wav)
t4 = ttime()
print("%.3f\t%.3f\t%.3f\t%.3f" % (t1 - t0, t2 - t1, t3 - t2, t4 - t3))
yield hps.data.sampling_rate, (np.concatenate(audio_opt, 0) * 32768).astype(np.int16)
def handle_control(command):
if command == "restart":
os.execl(g_config.python_exec, g_config.python_exec, *sys.argv)
elif command == "exit":
os.kill(os.getpid(), signal.SIGTERM)
exit(0)
def handle_change(path, text, language):
if is_empty(path, text, language):
return JSONResponse({"code": 400, "message": '缺少任意一项以下参数: "path", "text", "language"'}, status_code=400)
if path != "" or path is not None:
default_refer.path = path
if text != "" or text is not None:
default_refer.text = text
if language != "" or language is not None:
default_refer.language = language
print(f"[INFO] 当前默认参考音频路径: {default_refer.path}")
print(f"[INFO] 当前默认参考音频文本: {default_refer.text}")
print(f"[INFO] 当前默认参考音频语种: {default_refer.language}")
print(f"[INFO] is_ready: {default_refer.is_ready()}")
return JSONResponse({"code": 0, "message": "Success"}, status_code=200)
def handle(refer_wav_path, prompt_text, prompt_language, text, text_language):
if (
refer_wav_path == "" or refer_wav_path is None
or prompt_text == "" or prompt_text is None
or prompt_language == "" or prompt_language is None
):
refer_wav_path, prompt_text, prompt_language = (
default_refer.path,
default_refer.text,
default_refer.language,
)
if not default_refer.is_ready():
return JSONResponse({"code": 400, "message": "未指定参考音频且接口无预设"}, status_code=400)
with torch.no_grad():
gen = get_tts_wav(
refer_wav_path, prompt_text, prompt_language, text, text_language
)
sampling_rate, audio_data = next(gen)
wav = BytesIO()
sf.write(wav, audio_data, sampling_rate, format="wav")
wav.seek(0)
torch.cuda.empty_cache()
if device == "mps":
print('executed torch.mps.empty_cache()')
torch.mps.empty_cache()
return StreamingResponse(wav, media_type="audio/wav")
app = FastAPI()
@app.post("/control")
async def control(request: Request):
json_post_raw = await request.json()
return handle_control(json_post_raw.get("command"))
@app.get("/control")
async def control(command: str = None):
return handle_control(command)
@app.post("/change_refer")
async def change_refer(request: Request):
json_post_raw = await request.json()
return handle_change(
json_post_raw.get("refer_wav_path"),
json_post_raw.get("prompt_text"),
json_post_raw.get("prompt_language")
)
@app.get("/change_refer")
async def change_refer(
refer_wav_path: str = None,
prompt_text: str = None,
prompt_language: str = None
):
return handle_change(refer_wav_path, prompt_text, prompt_language)
@app.post("/")
async def tts_endpoint(request: Request):
json_post_raw = await request.json()
return handle(
json_post_raw.get("refer_wav_path"),
json_post_raw.get("prompt_text"),
json_post_raw.get("prompt_language"),
json_post_raw.get("text"),
json_post_raw.get("text_language"),
)
@app.get("/")
async def tts_endpoint(
refer_wav_path: str = None,
prompt_text: str = None,
prompt_language: str = None,
text: str = None,
text_language: str = None,
):
return handle(refer_wav_path, prompt_text, prompt_language, text, text_language)
if __name__ == "__main__":
uvicorn.run(app, host=host, port=port, workers=1)

96
colab_webui.ipynb Normal file
View File

@ -0,0 +1,96 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/colab_webui.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"source": [
"环境配置 environment"
],
"metadata": {
"id": "_o6a8GS2lWQM"
}
},
{
"cell_type": "code",
"metadata": {
"id": "e9b7iFV3dm1f"
},
"source": [
"!pip install -q condacolab\n",
"# Setting up condacolab and installing packages\n",
"import condacolab\n",
"condacolab.install_from_url(\"https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-2-Linux-x86_64.sh\")\n",
"%cd -q /content\n",
"!git clone https://github.com/RVC-Boss/GPT-SoVITS\n",
"!conda install -y -q -c pytorch -c nvidia cudatoolkit\n",
"%cd -q /content/GPT-SoVITS\n",
"!conda install -y -q -c conda-forge gcc gxx ffmpeg cmake -c pytorch -c nvidia\n",
"!/usr/local/bin/pip install -r requirements.txt"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# @title Download pretrained models 下载预训练模型\n",
"!mkdir -p /content/GPT-SoVITS/GPT_SoVITS/pretrained_models\n",
"!mkdir -p /content/GPT-SoVITS/tools/damo_asr/models\n",
"!mkdir -p /content/GPT-SoVITS/tools/uvr5\n",
"%cd /content/GPT-SoVITS/GPT_SoVITS/pretrained_models\n",
"!git clone https://huggingface.co/lj1995/GPT-SoVITS\n",
"%cd /content/GPT-SoVITS/tools/damo_asr/models\n",
"!git clone https://www.modelscope.cn/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git\n",
"!git clone https://www.modelscope.cn/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch.git\n",
"!git clone https://www.modelscope.cn/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch.git\n",
"# @title UVR5 pretrains 安装uvr5模型\n",
"%cd /content/GPT-SoVITS/tools/uvr5\n",
"!git clone https://huggingface.co/Delik/uvr5_weights\n",
"!git config core.sparseCheckout true\n",
"!mv /content/GPT-SoVITS/GPT_SoVITS/pretrained_models/GPT-SoVITS/* /content/GPT-SoVITS/GPT_SoVITS/pretrained_models/"
],
"metadata": {
"id": "0NgxXg5sjv7z"
},
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"source": [
"# @title launch WebUI 启动WebUI\n",
"!/usr/local/bin/pip install ipykernel\n",
"!sed -i '10s/False/True/' /content/GPT-SoVITS/config.py\n",
"%cd /content/GPT-SoVITS/\n",
"!/usr/local/bin/python webui.py"
],
"metadata": {
"id": "4oRGUzkrk8C7"
},
"execution_count": null,
"outputs": []
}
]
}

View File

@ -1,10 +1,68 @@
import sys
is_half=True
exp_root="logs"
python_exec=sys.executable or "python"
infer_device="cuda"
import sys,os
webui_port_main=9874
webui_port_uvr5=9873
webui_port_infer_tts=9872
webui_port_subfix=9871
import torch
# 推理用的指定模型
sovits_path = ""
gpt_path = ""
is_half_str = os.environ.get("is_half", "True")
is_half = True if is_half_str.lower() == 'true' else False
is_share_str = os.environ.get("is_share","False")
is_share= True if is_share_str.lower() == 'true' else False
cnhubert_path = "GPT_SoVITS/pretrained_models/chinese-hubert-base"
bert_path = "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"
pretrained_sovits_path = "GPT_SoVITS/pretrained_models/s2G488k.pth"
pretrained_gpt_path = "GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt"
exp_root = "logs"
python_exec = sys.executable or "python"
if torch.cuda.is_available():
infer_device = "cuda"
elif torch.backends.mps.is_available():
infer_device = "mps"
else:
infer_device = "cpu"
webui_port_main = 9874
webui_port_uvr5 = 9873
webui_port_infer_tts = 9872
webui_port_subfix = 9871
api_port = 9880
if infer_device == "cuda":
gpu_name = torch.cuda.get_device_name(0)
if (
("16" in gpu_name and "V100" not in gpu_name.upper())
or "P40" in gpu_name.upper()
or "P10" in gpu_name.upper()
or "1060" in gpu_name
or "1070" in gpu_name
or "1080" in gpu_name
):
is_half=False
if(infer_device=="cpu"):is_half=False
class Config:
def __init__(self):
self.sovits_path = sovits_path
self.gpt_path = gpt_path
self.is_half = is_half
self.cnhubert_path = cnhubert_path
self.bert_path = bert_path
self.pretrained_sovits_path = pretrained_sovits_path
self.pretrained_gpt_path = pretrained_gpt_path
self.exp_root = exp_root
self.python_exec = python_exec
self.infer_device = infer_device
self.webui_port_main = webui_port_main
self.webui_port_uvr5 = webui_port_uvr5
self.webui_port_infer_tts = webui_port_infer_tts
self.webui_port_subfix = webui_port_subfix
self.api_port = api_port

32
docker-compose.yaml Normal file
View File

@ -0,0 +1,32 @@
version: '3.8'
services:
gpt-sovits:
image: breakstring/gpt-sovits:latest # please change the image name and tag base your environment. If the tag contains the word 'elite', such as "latest-elite", it indicates that the image does not include the necessary models such as GPT-SoVITS, UVR5, Damo ASR, etc. You will need to download them yourself and map them into the container.
container_name: gpt-sovits-container
environment:
- is_half=False
- is_share=False
volumes:
- ./output:/workspace/output
- ./logs:/workspace/logs
- ./SoVITS_weights:/workspace/SoVITS_weights
- ./reference:/workspace/reference
working_dir: /workspace
ports:
- "9880:9880"
- "9871:9871"
- "9872:9872"
- "9873:9873"
- "9874:9874"
shm_size: 16G
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: "all"
capabilities: [gpu]
stdin_open: true
tty: true
restart: unless-stopped

14
dockerbuild.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# 获取当前日期,格式为 YYYYMMDD
DATE=$(date +%Y%m%d)
# 构建 full 版本的镜像
docker build --build-arg IMAGE_TYPE=full -t breakstring/gpt-sovits:latest .
# 为同一个镜像添加带日期的标签
docker tag breakstring/gpt-sovits:latest breakstring/gpt-sovits:dev-$DATE
# 构建 elite 版本的镜像
docker build --build-arg IMAGE_TYPE=elite -t breakstring/gpt-sovits:latest-elite .
# 为同一个镜像添加带日期的标签
docker tag breakstring/gpt-sovits:latest-elite breakstring/gpt-sovits:dev-$DATE-elite

133
docs/cn/Changelog_CN.md Normal file
View File

@ -0,0 +1,133 @@
### 20240121更新
1-config添加is_share诸如colab等场景可以将此改为True来使得webui映射到公网
2-WebUI添加英文系统英文翻译适配
3-cmd-asr自动判断是否已自带damo模型如不在默认目录上将从modelscope自带下载
4-[SoVITS训练报错ZeroDivisionError](https://github.com/RVC-Boss/GPT-SoVITS/issues/79) 尝试修复过滤长度0的样本等
5-清理TEMP文件夹缓存音频等文件
6-大幅削弱合成音频包含参考音频结尾的问题
### 20240122更新
1-修复过短输出文件返回重复参考音频的问题。
2-经测试,英文日文训练原生支持(日文训练需要根目录不含非英文等特殊字符)。
3-音频路径检查。如果尝试读取输入错的路径报错路径不存在而非ffmpeg错误。
### 20240123更新
1-解决hubert提取nan导致SoVITS/GPT训练报错ZeroDivisionError的问题
2-支持推理界面快速切换模型
3-优化模型文件排序逻辑
4-中文分词使用jieba_fast代替jieba
### 20240126更新
1-支持输出文本中英混合、日英混合
2-输出可选切分模式
3-修复uvr5读取到目录自动跳出的问题
4-修复多个换行导致推理报错
5-去除推理界面大量冗余log
6-支持mac训练推理
7-自动识别不支持半精度的卡强制单精度。cpu推理下强制单精度。
### 20240128更新
1-修复数字转汉字念法问题
2-修复句首少量字容易吞字的问题
3-通过限制排除不合理的参考音频长度
4-修复GPT训练不保存ckpt的问题
5-完善Dockerfile的下载模型流程
### 20240129更新
1-16系等半精度训练有问题的显卡把训练配置改为单精度训练
2-测试更新可用的colab版本
3-修复git clone modelscope funasr仓库+老版本funasr导致接口不对齐报错的问题
### 20240130更新
1-所有涉及路径的地方双引号自动去除,小白复制路径带双引号不会报错
2-修复中英文标点切割问题和句首句尾补标点的问题
3-增加按标点符号切分
### 20240201更新
1-修复uvr5读取格式错误导致分离失败的问题
2-支持中日英混合多种文本自动切分识别语种
### 20240202更新
1-修复asr路径尾缀带/保存文件名报错
2-引入paddlespeech的Normalizer https://github.com/RVC-Boss/GPT-SoVITS/pull/377 修复一些问题例如xx.xx%(带百分号类),元/吨 会读成 元吨 而不是元每吨,下划线不再会报错
### 20240207更新
1-修正语种传参混乱导致中文推理效果下降 https://github.com/RVC-Boss/GPT-SoVITS/issues/391
2-uvr5适配高版本librosa https://github.com/RVC-Boss/GPT-SoVITS/pull/403
3-修复uvr5 inf everywhere报错的问题(is_half传参未转换bool导致恒定半精度推理16系显卡会inf) https://github.com/RVC-Boss/GPT-SoVITS/commit/14a285109a521679f8846589c22da8f656a46ad8
4-优化英文文本前端
5-修复gradio依赖
6-支持三连根目录留空自动读取.list全路径
7-集成faster whisper ASR日文英文
### 20240208更新
1-GPT训练卡死win10 1909和https://github.com/RVC-Boss/GPT-SoVITS/issues/232 系统语言繁体GPT训练报错[尝试修复](https://github.com/RVC-Boss/GPT-SoVITS/commit/59f35adad85815df27e9c6b33d420f5ebfd8376b)。
### 20240212更新
1-faster whisper和funasr逻辑优化。faster whisper转镜像站下载规避huggingface连不上的问题。
2-DPO Loss实验性训练选项开启通过构造负样本训练缓解GPT重复漏字问题。推理界面公开几个推理参数。 https://github.com/RVC-Boss/GPT-SoVITS/pull/457
### 20240214更新
1-训练支持中文实验名(原来会报错)
2-DPO训练改为可勾选选项而非必须。如勾选batch size自动减半。修复推理界面新参数不传参的问题。
### 20240216更新
1-支持无参考文本输入
2-修复中文文本前端bug https://github.com/RVC-Boss/GPT-SoVITS/issues/475
todolist
1-中文多音字推理优化

251
docs/cn/README.md Normal file
View File

@ -0,0 +1,251 @@
<div align="center">
<h1>GPT-SoVITS-WebUI</h1>
强大的少样本语音转换与语音合成Web用户界面。<br><br>
[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange)](https://github.com/RVC-Boss/GPT-SoVITS)
<img src="https://counter.seku.su/cmoe?name=gptsovits&theme=r34" /><br>
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/colab_webui.ipynb)
[![Licence](https://img.shields.io/badge/LICENSE-MIT-green.svg?style=for-the-badge)](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
[![Huggingface](https://img.shields.io/badge/🤗%20-Models%20Repo-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)
[**English**](../../README.md) | [**中文简体**](./README.md) | [**日本語**](../ja/README.md) | [**한국어**](../ko/README.md)
</div>
---
> 查看我们的介绍视频 [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw)
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
中国地区用户可使用 AutoDL 云端镜像进行体验https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official
## 功能:
1. **零样本文本到语音TTS** 输入 5 秒的声音样本,即刻体验文本到语音转换。
2. **少样本 TTS** 仅需 1 分钟的训练数据即可微调模型,提升声音相似度和真实感。
3. **跨语言支持:** 支持与训练数据集不同语言的推理,目前支持英语、日语和中文。
4. **WebUI 工具:** 集成工具包括声音伴奏分离、自动训练集分割、中文自动语音识别(ASR)和文本标注,协助初学者创建训练数据集和 GPT/SoVITS 模型。
## 环境准备
如果你是 Windows 用户(已在 win>=10 上测试),可以直接通过预打包文件安装。只需下载[预打包文件](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-beta.7z?download=true),解压后双击 go-webui.bat 即可启动 GPT-SoVITS-WebUI。
### 测试通过的 Python 和 PyTorch 版本
- Python 3.9、PyTorch 2.0.1 和 CUDA 11
- Python 3.10.13, PyTorch 2.1.2 和 CUDA 12.3
- Python 3.9、Pytorch 2.3.0.dev20240122 和 macOS 14.3Apple 芯片GPU
_注意: numba==0.56.4 需要 python<3.11_
### Mac 用户
如果你是 Mac 用户,请先确保满足以下条件以使用 GPU 进行训练和推理:
- 搭载 Apple 芯片或 AMD GPU 的 Mac
- macOS 12.3 或更高版本
- 已通过运行`xcode-select --install`安装 Xcode command-line tools
_其他 Mac 仅支持使用 CPU 进行推理_
然后使用以下命令安装:
#### 创建环境
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
```
#### 安装依赖
```bash
pip install -r requirements.txt
pip uninstall torch torchaudio
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```
### 使用 Conda 快速安装
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
bash install.sh
```
### 手动安装包
#### Pip 包
```bash
pip install -r requirements.txt
```
#### FFmpeg
##### Conda 使用者
```bash
conda install ffmpeg
```
##### Ubuntu/Debian 使用者
```bash
sudo apt install ffmpeg
sudo apt install libsox-dev
conda install -c conda-forge 'ffmpeg<7'
```
##### MacOS 使用者
```bash
brew install ffmpeg
```
##### Windows 使用者
下载并将 [ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe) 和 [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe) 放置在 GPT-SoVITS 根目录下。
### 在 Docker 中使用
#### docker-compose.yaml 设置
0. image 的标签:由于代码库更新很快,镜像的打包和测试又很慢,所以请自行在 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits) 查看当前打包好的最新的镜像并根据自己的情况选用,或者在本地根据您自己的需求通过 Dockerfile 进行构建。
1. 环境变量:
- is_half: 半精度/双精度控制。在进行 "SSL extracting" 步骤时如果无法正确生成 4-cnhubert/5-wav32k 目录下的内容时,一般都是它引起的,可以根据实际情况来调整为 True 或者 False。
2. Volume 设置,容器内的应用根目录设置为 /workspace。 默认的 docker-compose.yaml 中列出了一些实际的例子,便于上传/下载内容。
3. shm_sizeWindows 下的 Docker Desktop 默认可用内存过小,会导致运行异常,根据自己情况酌情设置。
4. deploy 小节下的 gpu 相关内容,请根据您的系统和实际情况酌情设置。
#### 通过 docker compose 运行
```
docker compose -f "docker-compose.yaml" up -d
```
#### 通过 docker 命令运行
同上,根据您自己的实际情况修改对应的参数,然后运行如下命令:
```
docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-DockerTest\output:/workspace/output --volume=G:\GPT-SoVITS-DockerTest\logs:/workspace/logs --volume=G:\GPT-SoVITS-DockerTest\SoVITS_weights:/workspace/SoVITS_weights --workdir=/workspace -p 9880:9880 -p 9871:9871 -p 9872:9872 -p 9873:9873 -p 9874:9874 --shm-size="16G" -d breakstring/gpt-sovits:xxxxx
```
### 预训练模型
从 [GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) 下载预训练模型,并将它们放置在 `GPT_SoVITS\pretrained_models` 中。
对于 UVR5人声/伴奏分离和混响移除,另外),从 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) 下载模型,并将它们放置在 `tools/uvr5/uvr5_weights` 中。
中国地区用户可以进入以下链接并点击“下载副本”下载以上两个模型:
- [GPT-SoVITS Models](https://www.icloud.com.cn/iclouddrive/056y_Xog_HXpALuVUjscIwTtg#GPT-SoVITS_Models)
- [UVR5 Weights](https://www.icloud.com.cn/iclouddrive/0bekRKDiJXboFhbfm3lM2fVbA#UVR5_Weights)
对于中文自动语音识别(另外),从 [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files), [Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files), 和 [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) 下载模型,并将它们放置在 `tools/damo_asr/models` 中。
## 数据集格式
文本到语音TTS注释 .list 文件格式:
```
vocal_path|speaker_name|language|text
```
语言字典:
- 'zh': Chinese
- 'ja': Japanese
- 'en': English
示例:
```
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
```
## 待办事项清单
- [ ] **高优先级:**
- [x] 日语和英语的本地化。
- [ ] 用户指南。
- [x] 日语和英语数据集微调训练。
- [ ] **Features:**
- [ ] 零样本声音转换5 秒)/ 少样本声音转换1 分钟)。
- [ ] TTS 语速控制。
- [ ] 增强的 TTS 情感控制。
- [ ] 尝试将 SoVITS 令牌输入更改为词汇的概率分布。
- [ ] 改进英语和日语文本前端。
- [ ] 开发体积小和更大的 TTS 模型。
- [x] Colab 脚本。
- [ ] 扩展训练数据集(从 2k 小时到 10k 小时)。
- [ ] 更好的 sovits 基础模型(增强的音频质量)。
- [ ] 模型混合。
## (可选)命令行的操作方式
使用命令行打开UVR5的WebUI
````
python tools/uvr5/webui.py "<infer_device>" <is_half> <webui_port_uvr5>
````
如果打不开浏览器请按照下面的格式进行UVR处理这是使用mdxnet进行音频处理的方式
````
python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level --format --device --is_half_precision
````
这是使用命令行完成数据集的音频切分的方式
````
python audio_slicer.py \
--input_path "<path_to_original_audio_file_or_directory>" \
--output_root "<directory_where_subdivided_audio_clips_will_be_saved>" \
--threshold <volume_threshold> \
--min_length <minimum_duration_of_each_subclip> \
--min_interval <shortest_time_gap_between_adjacent_subclips>
--hop_size <step_size_for_computing_volume_curve>
````
这是使用命令行完成数据集ASR处理的方式仅限中文
````
python tools/damo_asr/cmd-asr.py "<Path to the directory containing input audio files>"
````
通过Faster_Whisper进行ASR处理除中文之外的ASR标记
没有进度条GPU性能可能会导致时间延迟
````
python ./tools/damo_asr/WhisperASR.py -i <input> -o <output> -f <file_name.list> -l <language>
````
启用自定义列表保存路径
## 致谢
特别感谢以下项目和贡献者:
- [ar-vits](https://github.com/innnky/ar-vits)
- [SoundStorm](https://github.com/yangdongchao/SoundStorm/tree/master/soundstorm/s1/AR)
- [vits](https://github.com/jaywalnut310/vits)
- [TransferTTS](https://github.com/hcy71o/TransferTTS/blob/master/models.py#L556)
- [Chinese Speech Pretrain](https://github.com/TencentGameMate/chinese_speech_pretrain)
- [contentvec](https://github.com/auspicious3000/contentvec/)
- [hifi-gan](https://github.com/jik876/hifi-gan)
- [Chinese-Roberta-WWM-Ext-Large](https://huggingface.co/hfl/chinese-roberta-wwm-ext-large)
- [fish-speech](https://github.com/fishaudio/fish-speech/blob/main/tools/llama/generate.py#L41)
- [ultimatevocalremovergui](https://github.com/Anjok07/ultimatevocalremovergui)
- [audio-slicer](https://github.com/openvpi/audio-slicer)
- [SubFix](https://github.com/cronrpc/SubFix)
- [FFmpeg](https://github.com/FFmpeg/FFmpeg)
- [gradio](https://github.com/gradio-app/gradio)
## 感谢所有贡献者的努力
<a href="https://github.com/RVC-Boss/GPT-SoVITS/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=RVC-Boss/GPT-SoVITS" />
</a>

85
docs/ja/Changelog_JA.md Normal file
View File

@ -0,0 +1,85 @@
### 20240121 更新
1. `config``is_share`を追加し、Colab などの環境でこれを`True`に設定すると、webui を公共ネットワークにマッピングできます。
2. WebUI に英語システムの英語翻訳を追加しました。
3. `cmd-asr`は damo モデルが既に含まれているかどうかを自動的に確認し、デフォルトのパスにない場合は modelscope から自動的にダウンロードします。
4. [SoVITS 训练报错 ZeroDivisionError](https://github.com/RVC-Boss/GPT-SoVITS/issues/79) 修復を試みます(長さ 0 のサンプルをフィルタリングなど)
5. TEMP ファイルフォルダからオーディオやその他のファイルをクリーンアップして最適化します。
6. 合成オーディオがリファレンスオーディオの終わりを含む問題を大幅に改善しました。
### 20240122 更新
1. 短すぎる出力ファイルが重複したリファレンスオーディオを返す問題を修正しました。
2. 英語-日本語学習がスムーズに進む QA を完了しました。(ただし、日本語学習はルートディレクトリに英語以外の文字が含まれていない必要があります)
3. オーディオパスをチェックします。間違ったパスを読み取ろうとすると、「パスが存在しません」というエラーメッセージが返されます。これは ffmpeg モジュールのエラーではありません。
### 20240123 更新
1. hubert から nan 抽出による SoVITS/GPT 学習中の ZeroDivisionError 関連エラーを修正しました。
2. 推論インターフェースでモデルを素早く切り替えることができるようにサポートしました。
3. モデルファイルのソートロジックを最適化しました。
4. 中国語の分析に`jieba_fast``jieba`に置き換えました。
### 20240126 更新
1. 中国語と英語、日本語と英語が混在した出力テキストをサポートします。
2. 出力で選択的な分割モードをサポートします。
3. uvr5 がディレクトリを読み取り、自動的に終了する問題を修正しました。
4. 複数の改行による推論エラーを修正しました。
5. 推論インターフェースから不要なログを削除しました。
6. MacOS での学習と推論をサポートします。
7. 半精度をサポートしていないカードを自動的に識別して単精度を強制し、CPU 推論では単精度を強制します。
### 20240128 更新
1. 数字を漢字で読む問題を修正しました。
2. 文章の先頭の一部の単語が欠落する問題を修正しました。
3. 不適切な長さのリファレンスオーディオを制限しました。
4. GPT 学習時の ckpt が保存されない問題を修正しました。
5. Dockerfile のモデルダウンロードプロセスを改善しました。
### 20240129 更新
1. 16 系などの半精度学習に問題があるカードは、学習構成を単精度学習に変更しました。
2. Colab でも使用可能なバージョンをテストして更新しました。
3. `git clone modelscope funasr`リポジトリと古いバージョンの funasr を使用してインターフェースが一致しないエラーを修正しました。
### 20240130 更新
1. パスと関連する文字列を解析して、二重引用符を自動的に削除します。また、パスをコピーする場合、二重引用符が含まれていてもエラーが発生しません。
2. 中国語と英語、日本語と英語の混合出力をサポートします。
3. 出力で選択的な分割モードをサポートします。
todolist
1. 同音異義語(中国語)の推論の最適化
2. 英語大文字認識と英語ハイフン [問題](https://github.com/RVC-Boss/GPT-SoVITS/issues/271)
3. テキストに%記号が含まれているとエラーが発生し、推論が不可能です。また、「元/吨」が「元吨」ではなく「元每吨」と読まれるなどの問題があります。このような問題を解決するには、どのライブラリを使用する必要があり、それに対する改善を検討しています。
4. 中-日-英、中-英、日-英を含む 5 つの言語をサポートすることを目標にしています。

245
docs/ja/README.md Normal file
View File

@ -0,0 +1,245 @@
<div align="center">
<h1>GPT-SoVITS-WebUI</h1>
パワフルな数発音声変換・音声合成 WebUI。<br><br>
[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange)](https://github.com/RVC-Boss/GPT-SoVITS)
<img src="https://counter.seku.su/cmoe?name=gptsovits&theme=r34" /><br>
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/colab_webui.ipynb)
[![Licence](https://img.shields.io/badge/LICENSE-MIT-green.svg?style=for-the-badge)](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
[![Huggingface](https://img.shields.io/badge/🤗%20-Models%20Repo-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)
[**English**](../../README.md) | [**中文简体**](../cn/README.md) | [**日本語**](./README.md) | [**한국어**](../ko/README.md)
</div>
---
> [デモ動画](https://www.bilibili.com/video/BV12g4y1m7Uw)をチェック!
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
## 機能:
1. **ゼロショット TTS:** 5 秒間のボーカルサンプルを入力すると、即座にテキストから音声に変換されます。
2. **数ショット TTS:** わずか 1 分間のトレーニングデータでモデルを微調整し、音声の類似性とリアリズムを向上。
3. **多言語サポート:** 現在、英語、日本語、中国語をサポートしています。
4. **WebUI ツール:** 統合されたツールには、音声伴奏の分離、トレーニングセットの自動セグメンテーション、中国語 ASR、テキストラベリングが含まれ、初心者がトレーニングデータセットと GPT/SoVITS モデルを作成するのを支援します。
## 環境の準備
Windows ユーザーであればwin>=10 にてテスト済み、prezip 経由で直接インストールできます。[prezip](https://huggingface.co/lj1995/GPT-SoVITS-windows-package/resolve/main/GPT-SoVITS-beta.7z?download=true) をダウンロードして解凍し、go-webui.bat をダブルクリックするだけで GPT-SoVITS-WebUI が起動します。
### Python と PyTorch のバージョン
- Python 3.9, PyTorch 2.0.1, CUDA 11
- Python 3.10.13, PyTorch 2.1.2, CUDA 12.3
- Python 3.9, PyTorch 2.3.0.dev20240122, macOS 14.3 (Apple silicon, GPU)
_注記: numba==0.56.4 は py<3.11 が必要です_
### Mac ユーザーへ
如果あなたが Mac ユーザーである場合、GPU を使用してトレーニングおよび推論を行うために以下の条件を満たしていることを確認してください:
- Apple シリコンまたは AMD GPU を搭載した Mac コンピューター
- macOS 12.3 以降
- `xcode-select --install`を実行してインストールされた Xcode コマンドラインツール
_その他の Mac は CPU のみで推論を行うことができます。_
次に、以下のコマンドを使用してインストールします:
#### 環境作成
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
```
#### Pip パッケージ
```bash
pip install -r requirements.txt
pip uninstall torch torchaudio
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```
_注記: UVR5 を使用して前処理を行う場合は、[オリジナルプロジェクトの GUI をダウンロード](https://github.com/Anjok07/ultimatevocalremovergui)して、「GPU Conversion」を選択することをお勧めします。さらに、特に推論時にメモリリークの問題が発生する可能性があります。推論 webUI を再起動することでメモリを解放することができます。_
### Conda によるクイックインストール
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
bash install.sh
```
### 手動インストール
#### Pip パッケージ
```bash
pip install -r requirementx.txt
```
#### FFmpeg
##### Conda ユーザー
```bash
conda install ffmpeg
```
##### Ubuntu/Debian ユーザー
```bash
sudo apt install ffmpeg
sudo apt install libsox-dev
conda install -c conda-forge 'ffmpeg<7'
```
##### MacOS ユーザー
```bash
brew install ffmpeg
```
##### Windows ユーザー
[ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe) と [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe) をダウンロードし、GPT-SoVITS のルートディレクトリに置きます。
### Docker の使用
#### docker-compose.yaml の設定
0. イメージのタグについて:コードベースの更新が速く、イメージのパッケージングとテストが遅いため、[Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits) で現在パッケージされている最新のイメージをご覧になり、ご自身の状況に応じて選択するか、またはご自身のニーズに応じて Dockerfile を使用してローカルで構築してください。
1. 環境変数:
- `is_half`:半精度/倍精度の制御。"SSL 抽出"ステップ中に`4-cnhubert/5-wav32k`ディレクトリ内の内容が正しく生成されない場合、通常これが原因です。実際の状況に応じて True または False に調整してください。
2. ボリューム設定:コンテナ内のアプリケーションのルートディレクトリは`/workspace`に設定されます。デフォルトの`docker-compose.yaml`には、アップロード/ダウンロードの内容の実例がいくつか記載されています。
3. `shm_size`Windows の Docker Desktop のデフォルトの利用可能メモリが小さすぎるため、異常な動作を引き起こす可能性があります。状況に応じて適宜設定してください。
4. `deploy`セクションの GPU に関連する内容は、システムと実際の状況に応じて慎重に設定してください。
#### docker compose で実行する
```markdown
docker compose -f "docker-compose.yaml" up -d
```
#### docker コマンドで実行する
上記と同様に、実際の状況に基づいて対応するパラメータを変更し、次のコマンドを実行します:
```markdown
docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-DockerTest\output:/workspace/output --volume=G:\GPT-SoVITS-DockerTest\logs:/workspace/logs --volume=G:\GPT-SoVITS-DockerTest\SoVITS_weights:/workspace/SoVITS_weights --workdir=/workspace -p 9880:9880 -p 9871:9871 -p 9872:9872 -p 9873:9873 -p 9874:9874 --shm-size="16G" -d breakstring/gpt-sovits:xxxxx
```
### 事前訓練済みモデル
[GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS) から事前訓練済みモデルをダウンロードし、`GPT_SoVITSpretrained_models` に置きます。
中国語 ASR追加については、[Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files)、[Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files)、[Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files) からモデルをダウンロードし、`tools/damo_asr/models` に置いてください。
UVR5 (Vocals/Accompaniment Separation & Reverberation Removal, additionally) の場合は、[UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights) からモデルをダウンロードして `tools/uvr5/uvr5_weights` に置きます。
## データセット形式
TTS アノテーション .list ファイル形式:
```
vocal_path|speaker_name|language|text
```
言語辞書:
- 'zh': 中国語
- 'ja': 日本語
- 'en': 英語
例:
```
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
```
## Todo リスト
- [ ] **優先度 高:**
- [x] 日本語と英語でのローカライズ。
- [ ] ユーザーガイド。
- [x] 日本語データセットと英語データセットのファインチューニングトレーニング。
- [ ] **機能:**
- [ ] ゼロショット音声変換5 秒数ショット音声変換1 分)。
- [ ] TTS スピーキングスピードコントロール。
- [ ] TTS の感情コントロールの強化。
- [ ] SoVITS トークン入力を語彙の確率分布に変更する実験。
- [ ] 英語と日本語のテキストフロントエンドを改善。
- [ ] 小型と大型の TTS モデルを開発する。
- [x] Colab のスクリプト。
- [ ] トレーニングデータセットを拡張する2k→10k
- [ ] より良い sovits ベースモデル(音質向上)
- [ ] モデルミックス
## (オプション) 必要に応じて、コマンドライン操作モードが提供されます。
コマンド ラインを使用して UVR5 の WebUI を開きます
```
python tools/uvr5/webui.py "<infer_device>" <is_half> <webui_port_uvr5>
```
ブラウザを開けない場合は、以下の形式に従って UVR 処理を行ってください。これはオーディオ処理に mdxnet を使用しています。
```
python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level --format --device --is_half_precision
```
コマンド ラインを使用してデータセットのオーディオ セグメンテーションを行う方法は次のとおりです。
```
python audio_slicer.py \
--input_path "<path_to_original_audio_file_or_directory>" \
--output_root "<directory_where_subdivided_audio_clips_will_be_saved>" \
--threshold <volume_threshold> \
--min_length <minimum_duration_of_each_subclip> \
--min_interval <shortest_time_gap_between_adjacent_subclips>
--hop_size <step_size_for_computing_volume_curve>
```
コマンドラインを使用してデータセット ASR 処理を行う方法です (中国語のみ)
```
python tools/damo_asr/cmd-asr.py "<Path to the directory containing input audio files>"
```
ASR処理はFaster_Whisperを通じて実行されます(中国語を除くASRマーキング)
(進行状況バーは表示されません。GPU のパフォーマンスにより時間遅延が発生する可能性があります)
```
python ./tools/damo_asr/WhisperASR.py -i <input> -o <output> -f <file_name.list> -l <language>
```
カスタムリストの保存パスが有効になっています
## クレジット
以下のプロジェクトとコントリビューターに感謝します:
- [ar-vits](https://github.com/innnky/ar-vits)
- [SoundStorm](https://github.com/yangdongchao/SoundStorm/tree/master/soundstorm/s1/AR)
- [vits](https://github.com/jaywalnut310/vits)
- [TransferTTS](https://github.com/hcy71o/TransferTTS/blob/master/models.py#L556)
- [Chinese Speech Pretrain](https://github.com/TencentGameMate/chinese_speech_pretrain)
- [contentvec](https://github.com/auspicious3000/contentvec/)
- [hifi-gan](https://github.com/jik876/hifi-gan)
- [Chinese-Roberta-WWM-Ext-Large](https://huggingface.co/hfl/chinese-roberta-wwm-ext-large)
- [fish-speech](https://github.com/fishaudio/fish-speech/blob/main/tools/llama/generate.py#L41)
- [ultimatevocalremovergui](https://github.com/Anjok07/ultimatevocalremovergui)
- [audio-slicer](https://github.com/openvpi/audio-slicer)
- [SubFix](https://github.com/cronrpc/SubFix)
- [FFmpeg](https://github.com/FFmpeg/FFmpeg)
- [gradio](https://github.com/gradio-app/gradio)
## すべてのコントリビューターに感謝します
<a href="https://github.com/RVC-Boss/GPT-SoVITS/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=RVC-Boss/GPT-SoVITS" />
</a>

58
docs/ko/Changelog_KO.md Normal file
View File

@ -0,0 +1,58 @@
### 20240121 업데이트
1. `config``is_share` 추가, Colab 등의 환경에서 이를 `True`로 설정하여 webui를 공용 네트워크에 매핑되도록 할 수 있습니다.
2. WebUI에 영어 번역이 추가되었습니다.
3. `cmd-asr`은 damo 모델이 이미 포함되어 있는지 자동으로 확인하고, 기본 경로에 없는 경우 modelscope에서 자동 다운로드 되도록 수정하였습니다.
4. [SoVITS 학습 중 ZeroDivisionError가 발생](https://github.com/RVC-Boss/GPT-SoVITS/issues/79)하는 경우 복구를 시도합니다. (길이가 0인 샘플 필터링 등)
5. TEMP 파일 폴더에서 오디오 및 기타 파일을 정리하여 최적화합니다.
6. 합성 오디오가 레퍼런스 오디오의 끝부분을 포함하는 문제를 개선하였습니다.
### 20240122 업데이트
1. 너무 짧은 출력 파일이 중복된 레퍼런스 오디오를 반환하는 문제 수정하였습니다.
2. 영어-일본어 학습이 원활하게 진행되는 QA를 완료하였습니다. (다만, 일본어 학습은 루트 디렉토리에 영어 이외의 문자가 없어야 합니다)
3. 오디오 경로를 검사합니다. 잘못된 경로를 읽으려고 할 때 '경로가 존재하지 않습니다'라는 에러 메시지를 반환하도록 수정하였습니다. 이는 ffmpeg 모듈의 에러가 아닙니다.
### 20240123 업데이트
1. hubert에서 nan 추출로 인한 SoVITS/GPT 학습 중 ZeroDivisionError 관련 에러를 해결하였습니다.
2. 추론 인터페이스에서 모델을 빠르게 전환할 수 있도록 지원하도록 수정되었습니다.
3. 모델 파일 정렬 로직 최적화하였습니다.
4. 중문 분석에 `jieba_fast``jieba`로 대체하였습니다.
### 20240126 업데이트
1. 중국어와 영어, 일본어와 영어가 혼합된 출력 텍스트를 지원합니다.
2. 출력에서 선택적 분할 모드를 지원합니다.
3. uvr5가 디렉토리를 읽고 자동으로 종료되는 문제를 수정하였습니다.
4. 여러 줄바꿈으로 인한 추론 오류를 수정하였습니다.
5. 추론 인터페이스에서 불필요한 로그 제거하였습니다.
6. MacOS에서의 학습 및 추론을 지원합니다.
7. 반정밀을 지원하지 않는 카드를 자동으로 식별하여 단일 정밀도를 강제 적용하고, CPU 추론에서 단일 정밀도를 강제 적용합니다.
### 20240128 업데이트
1. 숫자를 한자로 읽는 문제를 수정했습니다.
2. 문장 시작 부분의 일부 단어가 누락되는 문제 수정하였습니다.
3. 부적절한 길이의 레퍼런스 오디오를 제한하였습니다.
4. GPT 학습 시 ckpt가 저장되지 않는 문제 수정하였습니다.
5. Dockerfile에서 모델 다운로드 프로세스 개선하였습니다.
### 20240129 업데이트
1. 반정밀도 훈련에 문제가 있는 16 시리즈 및 기타 그래픽 카드의 훈련 구성을 단정밀도 훈련으로 변경했습니다.
2. Colab에서도 사용이 가능한 버전을 테스트 및 업데이트 하였습니다.
3. `git clone modelscope funasr` 저장소와 오래된 버전의 funasr 사용으로 인해 인터페이스가 일치하지 않는 오류를 수정하였습니다.
### 20240130 업데이트
1. 경로와 관련된 문자열을 파싱하여 큰따옴표를 자동으로 제거합니다. 또한, 경로를 복사하는 경우 큰따옴표가 포함되어도 오류가 발생하지 않습니다.
2. 중국어 및 영어 문자열의 문장 부호가 잘리는 문제 및 문장의 시작과 끝에 문장 부호가 추가되는 문제를 수정했습니다.
3. 문장 부호의 수를 확장하였습니다.
todolist:
1. 동음이의어(중문) 추론 최적화
2. 영문 대문자 인식 및 영문 하이픈 [문제](https://github.com/RVC-Boss/GPT-SoVITS/issues/271)
3. 텍스트에 % 기호가 포함되어 있으면 오류가 발생하며 추론이 불가능합니다. 또한 '元/吨'이 '元吨'으로 읽히지 않고 '元每吨'으로 읽히도록 하는 등의 문제가 존재합니다. 이러한 문제를 해결하기 위해 어떤 라이브러리를 사용해야 하며, 이에 대한 개선을 고민하고 있습니다.
4. 중-일-영, 중-영, 일-영을 포함한 다섯 가지 언어를 지원하는 것을 목표로 잡고있습니다.

249
docs/ko/README.md Normal file
View File

@ -0,0 +1,249 @@
<div align="center">
<h1>GPT-SoVITS-WebUI</h1>
소량의 데이터로 음성 변환 및 음성 합성을 지원하는 강력한 WebUI.<br><br>
[![madewithlove](https://img.shields.io/badge/made_with-%E2%9D%A4-red?style=for-the-badge&labelColor=orange)](https://github.com/RVC-Boss/GPT-SoVITS)
<img src="https://counter.seku.su/cmoe?name=gptsovits&theme=r34" /><br>
[![Open In Colab](https://img.shields.io/badge/Colab-F9AB00?style=for-the-badge&logo=googlecolab&color=525252)](https://colab.research.google.com/github/RVC-Boss/GPT-SoVITS/blob/main/colab_webui.ipynb)
[![Licence](https://img.shields.io/badge/LICENSE-MIT-green.svg?style=for-the-badge)](https://github.com/RVC-Boss/GPT-SoVITS/blob/main/LICENSE)
[![Huggingface](https://img.shields.io/badge/🤗%20-Models%20Repo-yellow.svg?style=for-the-badge)](https://huggingface.co/lj1995/GPT-SoVITS/tree/main)
[**English**](../../README.md) | [**中文简体**](../cn/README.md) | [**日本語**](../ja/README.md) | [**한국어**](./README.md)
</div>
---
> 데모 비디오를 확인하세요! [demo video](https://www.bilibili.com/video/BV12g4y1m7Uw)
https://github.com/RVC-Boss/GPT-SoVITS/assets/129054828/05bee1fa-bdd8-4d85-9350-80c060ab47fb
중국 지역의 사용자는 AutoDL 클라우드 이미지를 사용하여 체험할 수 있습니다: https://www.codewithgpu.com/i/RVC-Boss/GPT-SoVITS/GPT-SoVITS-Official
## 기능:
1. **제로샷 텍스트 음성 변환 (TTS):** 5초의 음성 샘플을 입력하면 즉시 텍스트를 음성으로 변환할 수 있습니다.
2. **소량의 데이터 TTS:** 1분의 훈련 데이터만으로 모델을 미세 조정하여 음성 유사도와 실제감을 향상시킬 수 있습니다.
3. **다국어 지원:** 훈련 데이터셋과 다른 언어의 추론을 지원하며, 현재 영어, 일본어, 중국어를 지원합니다.
4. **WebUI 도구:** 음성 반주 분리, 자동 훈련 데이터셋 분할, 중국어 자동 음성 인식(ASR) 및 텍스트 주석 등의 도구를 통합하여 초보자가 훈련 데이터셋과 GPT/SoVITS 모델을 생성하는 데 도움을 줍니다.
## 환경 준비
Windows 사용자는 (win>=10 에서 테스트되었습니다) 미리 빌드된 파일을 다운로드하여 설치할 수 있습니다. 다운로드 후 GPT-SoVITS-WebUI를 시작하려면 압축을 풀고 go-webui.bat을 두 번 클릭하면 됩니다.
### 테스트된 Python 및 PyTorch 버전
- Python 3.9, PyTorch 2.0.1 및 CUDA 11
- Python 3.10.13, PyTorch 2.1.2 및 CUDA 12.3
- Python 3.9, Pytorch 2.3.0.dev20240122 및 macOS 14.3 (Apple 칩, GPU)
_참고: numba==0.56.4 는 python<3.11 필요로 합니다._
### MacOS 사용자
MacOS 사용자는 GPU를 사용하여 훈련 및 추론을 하려면 다음 조건을 충족해야 합니다:
- Apple 칩 또는 AMD GPU가 장착된 Mac
- macOS 12.3 이상
- `xcode-select --install`을 실행하여 Xcode command-line tools를 설치했습니다.
_다른 Mac은 CPU를 사용하여 추론만 지원합니다._
그런 다음 다음 명령을 사용하여 설치합니다:
#### 환경 설정
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
```
#### 의존성 모듈 설치
```bash
pip install -r requirements.txt
pip uninstall torch torchaudio
pip3 install --pre torch torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```
### Conda를 사용한 간편 설치
```bash
conda create -n GPTSoVits python=3.9
conda activate GPTSoVits
bash install.sh
```
### 수동 설치
#### Pip 패키지
```bash
pip install -r requirements.txt
```
#### FFmpeg
##### Conda 사용자
```bash
conda install ffmpeg
```
##### Ubuntu/Debian 사용자
```bash
sudo apt install ffmpeg
sudo apt install libsox-dev
conda install -c conda-forge 'ffmpeg<7'
```
##### MacOS 사용자
```bash
brew install ffmpeg
```
##### Windows 사용자
[ffmpeg.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffmpeg.exe)와 [ffprobe.exe](https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/ffprobe.exe)를 GPT-SoVITS root 디렉토리에 넣습니다.
### Docker에서 사용
#### docker-compose.yaml 설정
0. 이미지 태그: 코드 저장소가 빠르게 업데이트되고 패키지가 느리게 빌드되고 테스트되므로, 현재 빌드된 최신 도커 이미지를 [Docker Hub](https://hub.docker.com/r/breakstring/gpt-sovits)에서 확인하고 필요에 따라 Dockerfile을 사용하여 로컬에서 빌드할 수 있습니다.
1. 환경 변수:
- is_half: 반정밀/배정밀 제어. "SSL 추출" 단계에서 4-cnhubert/5-wav32k 디렉토리의 내용을 올바르게 생성할 수 없는 경우, 일반적으로 이것 때문입니다. 실제 상황에 따라 True 또는 False로 조정할 수 있습니다.
2. 볼륨 설정, 컨테이너 내의 애플리케이션 루트 디렉토리를 /workspace로 설정합니다. 기본 docker-compose.yaml에는 실제 예제가 나열되어 있으므로 업로드/다운로드를 쉽게 할 수 있습니다.
3. shm_size: Windows의 Docker Desktop의 기본 사용 가능한 메모리가 너무 작아 오류가 발생할 수 있으므로 실제 상황에 따라 조정합니다.
4. deploy 섹션의 gpu 관련 내용은 시스템 및 실제 상황에 따라 조정합니다.
#### docker compose로 실행
```
docker compose -f "docker-compose.yaml" up -d
```
#### docker 명령으로 실행
위와 동일하게 실제 상황에 맞게 매개변수를 수정한 다음 다음 명령을 실행합니다:
```
docker run --rm -it --gpus=all --env=is_half=False --volume=G:\GPT-SoVITS-DockerTest\output:/workspace/output --volume=G:\GPT-SoVITS-DockerTest\logs:/workspace/logs --volume=G:\GPT-SoVITS-DockerTest\SoVITS_weights:/workspace/SoVITS_weights --workdir=/workspace -p 9880:9880 -p 9871:9871 -p 9872:9872 -p 9873:9873 -p 9874:9874 --shm-size="16G" -d breakstring/gpt-sovits:xxxxx
```
### 사전 훈련된 모델
[GPT-SoVITS Models](https://huggingface.co/lj1995/GPT-SoVITS)에서 사전 훈련된 모델을 다운로드하고 `GPT_SoVITS\pretrained_models`에 넣습니다.
중국어 자동 음성 인식(ASR), 음성 반주 분리 및 음성 제거를 위해 [Damo ASR Model](https://modelscope.cn/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/files), [Damo VAD Model](https://modelscope.cn/models/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/files) 및 [Damo Punc Model](https://modelscope.cn/models/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files)을 다운로드하고 `tools/damo_asr/models`에 넣습니다.
UVR5(음성/반주 분리 및 잔향 제거)를 위해 [UVR5 Weights](https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main/uvr5_weights)에서 모델을 다운로드하고 `tools/uvr5/uvr5_weights`에 넣습니다.
## 데이터셋 형식
텍스트 음성 합성(TTS) 주석 .list 파일 형식:
```
vocal_path|speaker_name|language|text
```
언어 사전:
- 'zh': 중국어
- 'ja': 일본어
- 'en': 영어
예시:
```
D:\GPT-SoVITS\xxx/xxx.wav|xxx|en|I like playing Genshin.
```
## 할 일 목록
- [ ] **최우선순위:**
- [x] 일본어 및 영어 지역화.
- [ ] 사용자 가이드.
- [x] 일본어 및 영어 데이터셋 미세 조정 훈련.
- [ ] **기능:**
- [ ] 제로샷 음성 변환 (5초) / 소량의 음성 변환 (1분).
- [ ] TTS 속도 제어.
- [ ] 향상된 TTS 감정 제어.
- [ ] SoVITS 토큰 입력을 단어 확률 분포로 변경해 보세요.
- [ ] 영어 및 일본어 텍스트 프론트 엔드 개선.
- [ ] 작은 크기와 큰 크기의 TTS 모델 개발.
- [x] Colab 스크립트.
- [ ] 훈련 데이터셋 확장 (2k 시간에서 10k 시간).
- [ ] 더 나은 sovits 기본 모델 (향상된 오디오 품질).
- [ ] 모델 블렌딩.
## (선택 사항) 필요한 경우 여기에서 명령줄 작업 모드를 제공합니다.
명령줄을 사용하여 UVR5용 WebUI 열기
```
python tools/uvr5/webui.py "<infer_device>" <is_half> <webui_port_uvr5>
```
브라우저를 열 수 없는 경우 UVR 처리를 위해 아래 형식을 따르십시오. 이는 오디오 처리를 위해 mdxnet을 사용하는 것입니다.
```
python mdxnet.py --model --input_root --output_vocal --output_ins --agg_level --format --device --is_half_precision
```
명령줄을 사용하여 데이터세트의 오디오 분할을 수행하는 방법은 다음과 같습니다.
```
python audio_slicer.py \
--input_path "<path_to_original_audio_file_or_directory>" \
--output_root "<directory_where_subdivided_audio_clips_will_be_saved>" \
--threshold <volume_threshold> \
--min_length <minimum_duration_of_each_subclip> \
--min_interval <shortest_time_gap_between_adjacent_subclips>
--hop_size <step_size_for_computing_volume_curve>
```
명령줄을 사용하여 데이터 세트 ASR 처리를 수행하는 방법입니다(중국어만 해당).
```
python tools/damo_asr/cmd-asr.py "<Path to the directory containing input audio files>"
```
ASR 처리는 Faster_Whisper(중국어를 제외한 ASR 마킹)를 통해 수행됩니다.
(진행률 표시줄 없음, GPU 성능으로 인해 시간 지연이 발생할 수 있음)
```
python ./tools/damo_asr/WhisperASR.py -i <input> -o <output> -f <file_name.list> -l <language>
```
사용자 정의 목록 저장 경로가 활성화되었습니다.
## 감사의 말
특별히 다음 프로젝트와 기여자에게 감사드립니다:
- [ar-vits](https://github.com/innnky/ar-vits)
- [SoundStorm](https://github.com/yangdongchao/SoundStorm/tree/master/soundstorm/s1/AR)
- [vits](https://github.com/jaywalnut310/vits)
- [TransferTTS](https://github.com/hcy71o/TransferTTS/blob/master/models.py#L556)
- [Chinese Speech Pretrain](https://github.com/TencentGameMate/chinese_speech_pretrain)
- [contentvec](https://github.com/auspicious3000/contentvec/)
- [hifi-gan](https://github.com/jik876/hifi-gan)
- [Chinese-Roberta-WWM-Ext-Large](https://huggingface.co/hfl/chinese-roberta-wwm-ext-large)
- [fish-speech](https://github.com/fishaudio/fish-speech/blob/main/tools/llama/generate.py#L41)
- [ultimatevocalremovergui](https://github.com/Anjok07/ultimatevocalremovergui)
- [audio-slicer](https://github.com/openvpi/audio-slicer)
- [SubFix](https://github.com/cronrpc/SubFix)
- [FFmpeg](https://github.com/FFmpeg/FFmpeg)
- [gradio](https://github.com/gradio-app/gradio)
## 모든 기여자들에게 감사드립니다 ;)
<a href="https://github.com/RVC-Boss/GPT-SoVITS/graphs/contributors" target="_blank">
<img src="https://contrib.rocks/image?repo=RVC-Boss/GPT-SoVITS" />
</a>

View File

@ -1,2 +1,2 @@
runtime\python.exe webui.py
pause
pause

4
go-webui.ps1 Normal file
View File

@ -0,0 +1,4 @@
$ErrorActionPreference = "SilentlyContinue"
chcp 65001
& "$PSScriptRoot\runtime\python.exe" "$PSScriptRoot\webui.py"
pause

View File

@ -1,135 +1,287 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "If >=3: apply median filtering to the harvested pitch results. The value represents the filter radius and can reduce breathiness.",
"A模型权重": "Weight (w) for Model A:",
"A模型路径": "Path to Model A:",
"B模型路径": "Path to Model B:",
"E:\\语音音频+标注\\米津玄师\\src": "C:\\Users\\Desktop\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0 curve file (optional). One pitch per line. Replaces the default F0 and pitch modulation:",
"Index Rate": "Index Rate",
"Onnx导出": "Export Onnx",
"Onnx输出路径": "Onnx Export Path:",
"RVC模型路径": "RVC Model Path:",
"ckpt处理": "ckpt Processing",
"harvest进程数": "Number of CPU processes used for harvest pitch algorithm",
"index文件路径不可包含中文": "index文件路径不可包含中文",
"pth文件路径不可包含中文": "pth文件路径不可包含中文",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Enter the GPU index(es) separated by '-', e.g., 0-0-1 to use 2 processes in GPU0 and 1 process in GPU1",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Step 1: Fill in the experimental configuration. Experimental data is stored in the 'logs' folder, with each experiment having a separate folder. Manually enter the experiment name path, which contains the experimental configuration, logs, and trained model files.",
"step1:正在处理数据": "Step 1: Processing data",
"step2:正在提取音高&正在提取特征": "step2:Pitch extraction & feature extraction",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Step 2a: Automatically traverse all files in the training folder that can be decoded into audio and perform slice normalization. Generates 2 wav folders in the experiment directory. Currently, only single-singer/speaker training is supported.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Step 2b: Use CPU to extract pitch (if the model has pitch), use GPU to extract features (select GPU index):",
"step3: 填写训练设置, 开始训练模型和索引": "Step 3: Fill in the training settings and start training the model and index",
"step3a:正在训练模型": "Step 3a: Model training started",
"一键训练": "One-click training",
"也可批量输入音频文件, 二选一, 优先读文件夹": "Multiple audio files can also be imported. If a folder path exists, this input is ignored.",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "Batch processing for vocal accompaniment separation using the UVR5 model.<br>Example of a valid folder path format: D:\\path\\to\\input\\folder (copy it from the file manager address bar).<br>The model is divided into three categories:<br>1. Preserve vocals: Choose this option for audio without harmonies. It preserves vocals better than HP5. It includes two built-in models: HP2 and HP3. HP3 may slightly leak accompaniment but preserves vocals slightly better than HP2.<br>2. Preserve main vocals only: Choose this option for audio with harmonies. It may weaken the main vocals. It includes one built-in model: HP5.<br>3. De-reverb and de-delay models (by FoxJoy):<br>(1) MDX-Net: The best choice for stereo reverb removal but cannot remove mono reverb;<br>&emsp;(234) DeEcho: Removes delay effects. Aggressive mode removes more thoroughly than Normal mode. DeReverb additionally removes reverb and can remove mono reverb, but not very effectively for heavily reverberated high-frequency content.<br>De-reverb/de-delay notes:<br>1. The processing time for the DeEcho-DeReverb model is approximately twice as long as the other two DeEcho models.<br>2. The MDX-Net-Dereverb model is quite slow.<br>3. The recommended cleanest configuration is to apply MDX-Net first and then DeEcho-Aggressive.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Enter the GPU index(es) separated by '-', e.g., 0-1-2 to use GPU 0, 1, and 2:",
"伴奏人声分离&去混响&去回声": "Vocals/Accompaniment Separation & Reverberation Removal",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "Save name:",
"保存的文件名, 默认空为和源文件同名": "Save file name (default: same as the source file):",
"保存的模型名不带后缀": "Saved model name (without extension):",
"保存频率save_every_epoch": "Save frequency (save_every_epoch):",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy:",
"修改": "Modify",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modify model information (only supported for small model files extracted from the 'weights' folder)",
"停止音频转换": "Stop audio conversion",
"全流程结束!": "All processes have been completed!",
"刷新音色列表和索引路径": "Refresh voice list and index path",
"加载模型": "Load model",
"加载预训练底模D路径": "Load pre-trained base model D path:",
"加载预训练底模G路径": "Load pre-trained base model G path:",
"单次推理": "Single Inference",
"卸载音色省显存": "Unload voice to save GPU memory:",
"变调(整数, 半音数量, 升八度12降八度-12)": "Transpose (integer, number of semitones, raise by an octave: 12, lower by an octave: -12):",
"后处理重采样至最终采样率0为不进行重采样": "Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling:",
"否": "No",
"启用相位声码器": "启用相位声码器",
"响应阈值": "Response threshold",
"响度因子": "loudness factor",
"处理数据": "Process data",
"导出Onnx模型": "Export Onnx Model",
"导出文件格式": "Export file format",
"常见问题解答": "FAQ (Frequently Asked Questions)",
"常规设置": "General settings",
"开始音频转换": "Start audio conversion",
"很遗憾您这没有能用的显卡来支持您训练": "Unfortunately, there is no compatible GPU available to support your training.",
"性能设置": "Performance settings",
"总训练轮数total_epoch": "Total training epochs (total_epoch):",
"批量推理": "Batch Inference",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Batch conversion. Enter the folder containing the audio files to be converted or upload multiple audio files. The converted audio will be output in the specified folder (default: 'opt').",
"指定输出主人声文件夹": "Specify the output folder for vocals:",
"指定输出文件夹": "Specify output folder:",
"指定输出非主人声文件夹": "Specify the output folder for accompaniment:",
"推理时间(ms):": "Inference time (ms):",
"推理音色": "Inferencing voice:",
"提取": "Extract",
"提取音高和处理数据使用的CPU进程数": "Number of CPU processes used for pitch extraction and data processing:",
"是": "Yes",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Save only the latest '.ckpt' file to save disk space:",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Save a small final model to the 'weights' folder at each save point:",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Cache all training sets to GPU memory. Caching small datasets (less than 10 minutes) can speed up training, but caching large datasets will consume a lot of GPU memory and may not provide much speed improvement:",
"显卡信息": "GPU Information",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible. <br>If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory <b>Agreement-LICENSE.txt</b> for details.",
"查看": "View",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "View model information (only supported for small model files extracted from the 'weights' folder)",
"检索特征占比": "Search feature ratio (controls accent strength, too high has artifacting):",
"模型": "Model",
"模型推理": "Model Inference",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Model extraction (enter the path of the large file model under the 'logs' folder). This is useful if you want to stop training halfway and manually extract and save a small model file, or if you want to test an intermediate model:",
"模型是否带音高指导": "Whether the model has pitch guidance:",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Whether the model has pitch guidance (required for singing, optional for speech):",
"模型是否带音高指导,1是0否": "Whether the model has pitch guidance (1: yes, 0: no):",
"模型版本型号": "Model architecture version:",
"模型融合, 可用于测试音色融合": "Model fusion, can be used to test timbre fusion",
"模型路径": "Path to Model:",
"每张显卡的batch_size": "Batch size per GPU:",
"淡入淡出长度": "Fade length",
"版本": "Version",
"特征提取": "Feature extraction",
"特征检索库文件路径,为空则使用下拉的选择结果": "Path to the feature index file. Leave blank to use the selected result from the dropdown:",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Recommended +12 key for male to female conversion, and -12 key for female to male conversion. If the sound range goes too far and the voice is distorted, you can also adjust it to the appropriate range by yourself.",
"目标采样率": "Target sample rate:",
"算法延迟(ms):": "Algorithmic delays(ms):",
"自动检测index路径,下拉式选择(dropdown)": "Auto-detect index path and select from the dropdown:",
"融合": "Fusion",
"要改的模型信息": "Model information to be modified:",
"要置入的模型信息": "Model information to be placed:",
"训练": "Train",
"训练模型": "Train model",
"训练特征索引": "Train feature index",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Training complete. You can check the training logs in the console or the 'train.log' file under the experiment folder.",
"请指定说话人id": "Please specify the speaker/singer ID:",
"请选择index文件": "Please choose the .index file",
"请选择pth文件": "Please choose the .pth file",
"请选择说话人id": "Select Speaker/Singer ID:",
"转换": "Convert",
"输入实验名": "Enter the experiment name:",
"输入待处理音频文件夹路径": "Enter the path of the audio folder to be processed:",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Enter the path of the audio folder to be processed (copy it from the address bar of the file manager):",
"输入待处理音频文件路径(默认是正确格式示例)": "Enter the path of the audio file to be processed (default is the correct format example):",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Adjust the volume envelope scaling. Closer to 0, the more it mimicks the volume of the original vocals. Can help mask noise and make volume sound more natural when set relatively low. Closer to 1 will be more of a consistently loud volume:",
"输入监听": "Input voice monitor",
"输入训练文件夹路径": "Enter the path of the training folder:",
"输入设备": "Input device",
"输入降噪": "Input noise reduction",
"输出信息": "Output information",
"输出变声": "Output converted voice",
"输出设备": "Output device",
"输出降噪": "Output noise reduction",
"输出音频(右下角三个点,点了可以下载)": "Export audio (click on the three dots in the lower right corner to download)",
"选择.index文件": "Select the .index file",
"选择.pth文件": "Select the .pth file",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Select the pitch extraction algorithm ('pm': faster extraction but lower-quality speech; 'harvest': better bass but extremely slow; 'crepe': better quality but GPU intensive), 'rmvpe': best quality, and little GPU requirement",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Select the pitch extraction algorithm: when extracting singing, you can use 'pm' to speed up. For high-quality speech with fast performance, but worse CPU usage, you can use 'dio'. 'harvest' results in better quality but is slower. 'rmvpe' has the best results and consumes less CPU/GPU",
"采样率:": "采样率:",
"采样长度": "Sample length",
"重载设备列表": "Reload device list",
"音调设置": "Pitch settings",
"音频设备(请使用同种类驱动)": "Audio device (please use the same type of driver)",
"音高算法": "pitch detection algorithm",
"额外推理时长": "Extra inference time"
"很遗憾您这没有能用的显卡来支持您训练": "Unfortunately, there is no compatible GPU available to support your training.",
"UVR5已开启": "UVR5 opened ",
"UVR5已关闭": "UVR5 closed",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "This software is open source under the MIT license. The author does not have any control over the software. Users who use the software and distribute the sounds exported by the software are solely responsible. <br>If you do not agree with this clause, you cannot use or reference any codes and files within the software package. See the root directory <b>Agreement-LICENSE</b> for details.",
"0-前置数据集获取工具": "0-Fetch dataset",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5 webui (for vocal separation, deecho, dereverb and denoise)",
"是否开启UVR5-WebUI": "Open UVR5-WebUI",
"UVR5进程输出信息": "UVR5 process output log",
"0b-语音切分工具": "0b-Audio slicer",
".list标注文件的路径": ".list annotation file path",
"GPT模型列表": "GPT weight list",
"SoVITS模型列表": "SoVITS weight list",
"填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。": "Fill in the directory of segmented audio. The complete path of the read audio file is equal to the directory concatenated with the waveform's corresponding filename from the list file (not the full path).",
"音频自动切分输入路径,可文件可文件夹": "Audio slicer input (file or folder)",
"切分后的子音频的输出根目录": "Audio slicer output folder",
"怎么切": "How to slice the sentence",
"不切": "No slice",
"凑四句一切": "Slice once every 4 sentences",
"按英文句号.切": "Slice by English punct",
"threshold:音量小于这个值视作静音的备选切割点": "Noise gate threshold (loudness below this value will be treated as noise",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "Minimum length",
"min_interval:最短切割间隔": "Minumum interval for audio cutting",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size: FO hop size, the smaller the value, the higher the accuracy",
"max_sil_kept:切完后静音最多留多长": "Maximum length for silence to be kept",
"开启语音切割": "Start audio slicer",
"终止语音切割": "Stop audio cutting",
"max:归一化后最大值多少": "Loudness multiplier after normalized",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix: proportion of normalized audio merged into dataset",
"切割使用的进程数": "CPU threads used for audio slicing",
"语音切割进程输出信息": "Audio slicer output log",
"0c-中文批量离线ASR工具": "0c-Chinese ASR tool",
"开启离线批量ASR": "Start batch ASR",
"终止ASR进程": "Stop ASR task",
"批量ASR(中文only)输入文件夹路径": "Batch ASR (Chinese only) input folder",
"ASR进程输出信息": "ASR output log",
"0d-语音文本校对标注工具": "0d-Speech to text proofreading tool",
"是否开启打标WebUI": "Open labelling WebUI",
"打标数据标注文件路径": "path to proofreading text file",
"打标工具进程输出信息": "Proofreading tool output log",
"1-GPT-SoVITS-TTS": "1-GPT-SOVITS-TTS",
"*实验/模型名": "*Experiment/model name",
"显卡信息": "GPU Information",
"预训练的SoVITS-G模型路径": "Pretrained SoVITS-G model path",
"预训练的SoVITS-D模型路径": "Pretrained SoVITS-D model path",
"预训练的GPT模型路径": "Pretrained GPT model path",
"1A-训练集格式化工具": "1A-Dataset formatting",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "output folder (logs/{experiment name}) should have files and folders starts with 23456.",
"*文本标注文件": "*Text labelling file",
"*训练集音频文件目录": "*Audio dataset folder",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "Training the file name corresponding to the waveform of the waveform in the List file of the audio file",
"1Aa-文本内容": "1Aa-Text",
"GPU卡号以-分割,每个卡号一个进程": "GPU number is separated by -, each GPU will run one process ",
"预训练的中文BERT模型路径": " Pretrained BERT model path",
"开启文本获取": "Start speech-to-text",
"终止文本获取进程": "Stop speech-to-text",
"文本进程输出信息": "Text processing output",
"1Ab-SSL自监督特征提取": "1Ab-SSL self-supervised feature extraction",
"预训练的SSL模型路径": "Pretrained SSL model path",
"开启SSL提取": "Start SSL extracting",
"终止SSL提取进程": "Stop SSL extraction",
"SSL进程输出信息": "SSL output log",
"1Ac-语义token提取": "1Ac-semantics token extraction",
"开启语义token提取": "Start semantics token extraction",
"终止语义token提取进程": "Stop semantics token extraction",
"语义token提取进程输出信息": "Sematics token extraction output log",
"1Aabc-训练集格式化一键三连": "1Aabc-One-click formatting",
"开启一键三连": "Start one-click formatting",
"终止一键三连": "Stop one-click formatting",
"一键三连进程输出信息": "One-click formatting output",
"1B-微调训练": "1B-Fine-tuned training",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-SoVITS training. The model is located in SoVITS_weights.",
"每张显卡的batch_size": "Batch size per GPU:",
"总训练轮数total_epoch不建议太高": "Total epochs, do not increase to a value that is too high",
"文本模块学习率权重": "Text model learning rate weighting",
"保存频率save_every_epoch": "Save frequency (save_every_epoch):",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Save only the latest '.ckpt' file to save disk space:",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Save a small final model to the 'weights' folder at each save point:",
"开启SoVITS训练": "Start SoVITS training",
"终止SoVITS训练": "Stop SoVITS training",
"SoVITS训练进程输出信息": "SoVITS training output log",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-GPT training. The model is located in GPT_weights.",
"总训练轮数total_epoch": "Total training epochs (total_epoch):",
"开启GPT训练": "Start GPT training",
"终止GPT训练": "Stop GPT training",
"GPT训练进程输出信息": "GPT training output log",
"1C-推理": "1C-inference",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "Choose the models from SoVITS_weights and GPT_weights. The default one is a pretrain, so you can experience zero shot TTS.",
"*GPT模型列表": "*GPT models list",
"*SoVITS模型列表": "*SoVITS models list",
"GPU卡号,只能填1个整数": "GPU number, can only input ONE integer",
"刷新模型路径": "refreshing model paths",
"是否开启TTS推理WebUI": "Open TTS inference WEBUI",
"TTS推理WebUI进程输出信息": "TTS inference webui output log",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-Voice Changer",
"施工中,请静候佳音": "In construction, please wait",
"参考音频在3~10秒范围外请更换": "Reference audio is outside the 3-10 second range, please choose another one!",
"请上传3~10秒内参考音频超过会报错": "Please upload a reference audio within the 3-10 second range; if it exceeds this duration, it will raise errors.",
"TTS推理进程已开启": "TTS inference process is opened",
"TTS推理进程已关闭": "TTS inference process closed",
"打标工具WebUI已开启": "proofreading tool webui is opened",
"打标工具WebUI已关闭": "proofreading tool webui is closed",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "This software is under MIT licence. The author does not have any control for this software. Users are solely reponsible for all voices thats being converted and/or distributed. If you disagree with this Terms and Conditions, you cannot use or cite any files or code in this file. Please check LICENSE. for more info.",
"*请上传并填写参考信息": "*Please upload and fill reference information",
"*请填写需要合成的目标文本。中英混合选中文,日英混合选日文,中日混合暂不支持,非目标语言文本自动遗弃。": "*Please fill the text that needs inference. Select Chinese for mixed Chinese and English text, choose Japanese for mixed Japanese and English text. Mixed Chinese and Japanese is currently not supported; non-target language text will be automatically discarded.",
"ASR任务开启%s": "ASR training started: %s",
"GPT训练完成": "Finished GPT training",
"GPT训练开始%s": "GPT training started: %s",
"SSL提取进程执行中": "SSL extracting",
"SSL提取进程结束": "SSL extraction finished",
"SoVITS训练完成": "SoVITS training finished",
"SoVITS训练开始%s": "SoVITS training started%s",
"一键三连中途报错": "An error has occured during One-click formatting",
"一键三连进程结束": "Finished one-click formatting",
"中文": "Chinese",
"凑50字一切": "Cut per 50 characters",
"凑五句一切": "Cut per 5 sentences",
"切分后文本": "Text after sliced",
"切割执行中": "Slicing audio",
"切割结束": "finished audio slicing",
"参考音频的文本": "Text for reference audio",
"参考音频的语种": "Language for reference audio",
"合成语音": "Start inference",
"后续将支持混合语种编码文本输入。": "Mixed languages input will be supported soon.",
"已有正在进行的ASR任务需先终止才能开启下一次任务": " An ASR task is already in progress, please stop before starting the next task",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "A GPT training task is already in progress, please stop before starting the next task",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "A SSL extraction task is already in progress, please stop before starting the next task",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "A SoVITS training task is already in progress, please stop before starting the next task",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "An ASR task is already in progress, please stop before starting the next task",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "An audio slicing task is already in progress, please stop before starting the next task",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "A TTS proofreading task is already in progress, please stop before starting the next task",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "A semantics token extraction task is already in progress, please stop before starting the next task",
"已终止ASR进程": "ASR task has been stopped",
"已终止GPT训练": "GPT training has been stopped",
"已终止SoVITS训练": "SoVITS training has been stopped",
"已终止所有1a进程": "All 1a tasks has been stopped",
"已终止所有1b进程": "All 1b tasks has been stopped",
"已终止所有一键三连进程": "All one-clicking formatting tasks has been stopped",
"已终止所有切割进程": "All audio slicing tasks has been stopped",
"已终止所有语义token进程": "All semantics token tasks has been stopped",
"按中文句号。切": "Slice by Chinese punct",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "Text slicer tool, since there will be issues when infering long texts, so it is advised to cut first. When infering, it will infer respectively then combined together.",
"文本进程执行中": "Text processing",
"文本进程结束": "Finished text processing",
"日文": "Japanese",
"英文": "English",
"语义token提取进程执行中": "Semantics token extracting",
"语义token提取进程结束": "Finished semantics token extraction",
"请上传参考音频": "Please upload reference audio",
"输入路径不存在": "No input file or directory",
"输入路径存在但既不是文件也不是文件夹": "Input directory exists, but it is not a file or a folder",
"输出的语音": "Inference Result",
"进度1a-done": "Progress1a-done",
"进度1a-done, 1b-ing": "Progress1a-done, 1b-ing",
"进度1a-ing": "Progress1a-ing",
"进度1a1b-done": "Progress1a1b-done",
"进度1a1b-done, 1cing": "Progress1a1b-done, 1cing",
"进度all-done": "Progressall-done",
"需要合成的切分前文本": "Inference text that needs to be sliced",
"需要合成的文本": "Inference text",
"需要合成的语种": "Inference text language",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "If >=3: apply median filtering to the harvested pitch results. The value represents the filter radius and can reduce breathiness.",
"A模型权重": "Weight (w) for Model A:",
"A模型路径": "Path to Model A:",
"B模型路径": "Path to Model B:",
"E:\\语音音频+标注\\米津玄师\\src": "C:\\Users\\Desktop\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0 curve file (optional). One pitch per line. Replaces the default F0 and pitch modulation:",
"Index Rate": "Index Rate",
"Onnx导出": "Export Onnx",
"Onnx输出路径": "Onnx Export Path:",
"RVC模型路径": "RVC Model Path:",
"ckpt处理": "ckpt Processing",
"harvest进程数": "Number of CPU processes used for harvest pitch algorithm",
"index文件路径不可包含中文": "index文件路径不可包含中文",
"pth文件路径不可包含中文": "pth文件路径不可包含中文",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Enter the GPU index(es) separated by '-', e.g., 0-0-1 to use 2 processes in GPU0 and 1 process in GPU1",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Step 1: Fill in the experimental configuration. Experimental data is stored in the 'logs' folder, with each experiment having a separate folder. Manually enter the experiment name path, which contains the experimental configuration, logs, and trained model files.",
"step1:正在处理数据": "Step 1: Processing data",
"step2:正在提取音高&正在提取特征": "step2:Pitch extraction & feature extraction",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Step 2a: Automatically traverse all files in the training folder that can be decoded into audio and perform slice normalization. Generates 2 wav folders in the experiment directory. Currently, only single-singer/speaker training is supported.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Step 2b: Use CPU to extract pitch (if the model has pitch), use GPU to extract features (select GPU index):",
"step3: 填写训练设置, 开始训练模型和索引": "Step 3: Fill in the training settings and start training the model and index",
"step3a:正在训练模型": "Step 3a: Model training started",
"一键训练": "One-click training",
"也可批量输入音频文件, 二选一, 优先读文件夹": "Multiple audio files can also be imported. If a folder path exists, this input is ignored.",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>\u2003\u2003(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "Batch processing for vocal accompaniment separation using the UVR5 model.<br>Example of a valid folder path format: D:\\path\\to\\input\\folder (copy it from the file manager address bar).<br>The model is divided into three categories:<br>1. Preserve vocals: Choose this option for audio without harmonies. It preserves vocals better than HP5. It includes two built-in models: HP2 and HP3. HP3 may slightly leak accompaniment but preserves vocals slightly better than HP2.<br>2. Preserve main vocals only: Choose this option for audio with harmonies. It may weaken the main vocals. It includes one built-in model: HP5.<br>3. De-reverb and de-delay models (by FoxJoy):<br>\u2003\u2003(1) MDX-Net: The best choice for stereo reverb removal but cannot remove mono reverb;<br>&emsp;(234) DeEcho: Removes delay effects. Aggressive mode removes more thoroughly than Normal mode. DeReverb additionally removes reverb and can remove mono reverb, but not very effectively for heavily reverberated high-frequency content.<br>De-reverb/de-delay notes:<br>1. The processing time for the DeEcho-DeReverb model is approximately twice as long as the other two DeEcho models.<br>2. The MDX-Net-Dereverb model is quite slow.<br>3. The recommended cleanest configuration is to apply MDX-Net first and then DeEcho-Aggressive.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Enter the GPU index(es) separated by '-', e.g., 0-1-2 to use GPU 0, 1, and 2:",
"伴奏人声分离&去混响&去回声": "Vocals/Accompaniment Separation & Reverberation Removal",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "Save name:",
"保存的文件名, 默认空为和源文件同名": "Save file name (default: same as the source file):",
"保存的模型名不带后缀": "Saved model name (without extension):",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy:",
"修改": "Modify",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modify model information (only supported for small model files extracted from the 'weights' folder)",
"停止音频转换": "Stop audio conversion",
"全流程结束!": "All processes have been completed!",
"刷新音色列表和索引路径": "Refresh voice list and index path",
"加载模型": "Load model",
"加载预训练底模D路径": "Load pre-trained base model D path:",
"加载预训练底模G路径": "Load pre-trained base model G path:",
"单次推理": "Single Inference",
"卸载音色省显存": "Unload voice to save GPU memory:",
"变调(整数, 半音数量, 升八度12降八度-12)": "Transpose (integer, number of semitones, raise by an octave: 12, lower by an octave: -12):",
"后处理重采样至最终采样率0为不进行重采样": "Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling:",
"否": "No",
"启用相位声码器": "启用相位声码器",
"响应阈值": "Response threshold",
"响度因子": "loudness factor",
"处理数据": "Process data",
"导出Onnx模型": "Export Onnx Model",
"导出文件格式": "Export file format",
"常见问题解答": "FAQ (Frequently Asked Questions)",
"常规设置": "General settings",
"开始音频转换": "Start audio conversion",
"性能设置": "Performance settings",
"批量推理": "Batch Inference",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Batch conversion. Enter the folder containing the audio files to be converted or upload multiple audio files. The converted audio will be output in the specified folder (default: 'opt').",
"指定输出主人声文件夹": "Specify the output folder for vocals:",
"指定输出文件夹": "Specify output folder:",
"指定输出非主人声文件夹": "Specify the output folder for accompaniment:",
"推理时间(ms):": "Inference time (ms):",
"推理音色": "Inferencing voice:",
"提取": "Extract",
"提取音高和处理数据使用的CPU进程数": "Number of CPU processes used for pitch extraction and data processing:",
"是": "Yes",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Cache all training sets to GPU memory. Caching small datasets (less than 10 minutes) can speed up training, but caching large datasets will consume a lot of GPU memory and may not provide much speed improvement:",
"查看": "View",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "View model information (only supported for small model files extracted from the 'weights' folder)",
"检索特征占比": "Search feature ratio (controls accent strength, too high has artifacting):",
"模型": "Model",
"模型推理": "Model Inference",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Model extraction (enter the path of the large file model under the 'logs' folder). This is useful if you want to stop training halfway and manually extract and save a small model file, or if you want to test an intermediate model:",
"模型是否带音高指导": "Whether the model has pitch guidance:",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Whether the model has pitch guidance (required for singing, optional for speech):",
"模型是否带音高指导,1是0否": "Whether the model has pitch guidance (1: yes, 0: no):",
"模型版本型号": "Model architecture version:",
"模型融合, 可用于测试音色融合": "Model fusion, can be used to test timbre fusion",
"模型路径": "Path to Model:",
"淡入淡出长度": "Fade length",
"版本": "Version",
"特征提取": "Feature extraction",
"特征检索库文件路径,为空则使用下拉的选择结果": "Path to the feature index file. Leave blank to use the selected result from the dropdown:",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Recommended +12 key for male to female conversion, and -12 key for female to male conversion. If the sound range goes too far and the voice is distorted, you can also adjust it to the appropriate range by yourself.",
"目标采样率": "Target sample rate:",
"算法延迟(ms):": "Algorithmic delays(ms):",
"自动检测index路径,下拉式选择(dropdown)": "Auto-detect index path and select from the dropdown:",
"融合": "Fusion",
"要改的模型信息": "Model information to be modified:",
"要置入的模型信息": "Model information to be placed:",
"训练": "Train",
"训练模型": "Train model",
"训练特征索引": "Train feature index",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Training complete. You can check the training logs in the console or the 'train.log' file under the experiment folder.",
"请指定说话人id": "Please specify the speaker/singer ID:",
"请选择index文件": "Please choose the .index file",
"请选择pth文件": "Please choose the .pth file",
"请选择说话人id": "Select Speaker/Singer ID:",
"转换": "Convert",
"输入实验名": "Enter the experiment name:",
"输入待处理音频文件夹路径": "Enter the path of the audio folder to be processed:",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Enter the path of the audio folder to be processed (copy it from the address bar of the file manager):",
"输入待处理音频文件路径(默认是正确格式示例)": "Enter the path of the audio file to be processed (default is the correct format example):",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Adjust the volume envelope scaling. Closer to 0, the more it mimicks the volume of the original vocals. Can help mask noise and make volume sound more natural when set relatively low. Closer to 1 will be more of a consistently loud volume:",
"输入监听": "Input voice monitor",
"输入训练文件夹路径": "Enter the path of the training folder:",
"输入设备": "Input device",
"输入降噪": "Input noise reduction",
"输出信息": "Output information",
"输出变声": "Output converted voice",
"输出设备": "Output device",
"输出降噪": "Output noise reduction",
"输出音频(右下角三个点,点了可以下载)": "Export audio (click on the three dots in the lower right corner to download)",
"选择.index文件": "Select the .index file",
"选择.pth文件": "Select the .pth file",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Select the pitch extraction algorithm ('pm': faster extraction but lower-quality speech; 'harvest': better bass but extremely slow; 'crepe': better quality but GPU intensive), 'rmvpe': best quality, and little GPU requirement",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Select the pitch extraction algorithm: when extracting singing, you can use 'pm' to speed up. For high-quality speech with fast performance, but worse CPU usage, you can use 'dio'. 'harvest' results in better quality but is slower. 'rmvpe' has the best results and consumes less CPU/GPU",
"采样率:": "采样率:",
"采样长度": "Sample length",
"重载设备列表": "Reload device list",
"音调设置": "Pitch settings",
"音频设备(请使用同种类驱动)": "Audio device (please use the same type of driver)",
"音高算法": "pitch detection algorithm",
"额外推理时长": "Extra inference time"
}

View File

@ -1,135 +1,276 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Si es >=3, entonces use el resultado del reconocimiento de tono de 'harvest' con filtro de mediana, el valor es el radio del filtro, su uso puede debilitar el sonido sordo",
"A模型权重": "Un peso modelo para el modelo A.",
"A模型路径": "Modelo A ruta.",
"B模型路径": "Modelo B ruta.",
"很遗憾您这没有能用的显卡来支持您训练": "Lamentablemente, no tiene una tarjeta gráfica compatible para admitir su entrenamiento.",
"UVR5已开启": "UVR5 está habilitado",
"UVR5已关闭": "UVR5 está deshabilitado",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Este software es de código abierto bajo la licencia MIT. El autor no tiene control sobre el software. El usuario que lo utilice o distribuya, y el que genere sonidos a partir del software, asume toda la responsabilidad. <br>Si no acepta estos términos, no puede utilizar ni hacer referencia a ningún código o archivo dentro del paquete de software. Consulte el archivo <b>LICENSE</b> en el directorio raíz para obtener más detalles.",
"0-前置数据集获取工具": "0-Herramienta de obtención de conjunto de datos previo",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-Herramienta de separación de voz y acompañamiento UVR5 y eliminación de reverberación y retardo",
"是否开启UVR5-WebUI": "¿Habilitar UVR5-WebUI?",
"UVR5进程输出信息": "Información de salida del proceso UVR5",
"0b-语音切分工具": "0b-Herramienta de división de voz",
"音频自动切分输入路径,可文件可文件夹": "Ruta de entrada para la división automática de audio, puede ser un archivo o una carpeta",
"切分后的子音频的输出根目录": "Directorio raíz de salida de los sub-audios después de la división",
"threshold:音量小于这个值视作静音的备选切割点": "umbral: puntos de corte alternativos considerados como silencio si el volumen es menor que este valor",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length: duración mínima de cada segmento, si el primer segmento es demasiado corto, se conecta continuamente con los siguientes hasta que supera este valor",
"min_interval:最短切割间隔": "min_interval: intervalo mínimo de corte",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size: cómo calcular la curva de volumen, cuanto más pequeño, mayor precisión pero mayor carga computacional (mayor precisión no significa mejor rendimiento)",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept: duración máxima del silencio después del corte",
"开启语音切割": "Habilitar la división de voz",
"终止语音切割": "Terminar la división de voz",
"max:归一化后最大值多少": "max: valor máximo después de la normalización",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix: proporción de mezcla de audio normalizado que entra",
"切割使用的进程数": "Número de procesos utilizados para la división",
"语音切割进程输出信息": "Información de salida del proceso de división de voz",
"0c-中文批量离线ASR工具": "0c-Herramienta de ASR en lote fuera de línea en chino",
"开启离线批量ASR": "¿Habilitar ASR en lote fuera de línea?",
"终止ASR进程": "Terminar el proceso ASR",
"批量ASR(中文only)输入文件夹路径": "Ruta de la carpeta de entrada para ASR en lote (solo en chino)",
"ASR进程输出信息": "Información de salida del proceso ASR",
"0d-语音文本校对标注工具": "0d-Herramienta de corrección y etiquetado de texto de voz",
"是否开启打标WebUI": "¿Habilitar la interfaz web de etiquetado?",
"打标数据标注文件路径": "Ruta del archivo de etiquetado de datos",
"打标工具进程输出信息": "Información de salida del proceso de la herramienta de etiquetado",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*Nombre del experimento/modelo",
"显卡信息": "Información de la tarjeta gráfica",
"预训练的SoVITS-G模型路径": "Ruta del modelo SoVITS-G preentrenado",
"预训练的SoVITS-D模型路径": "Ruta del modelo SoVITS-D preentrenado",
"预训练的GPT模型路径": "Ruta del modelo GPT preentrenado",
"1A-训练集格式化工具": "1A-Herramienta de formateo del conjunto de datos de entrenamiento",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "Debe haber archivos y carpetas que comiencen con 23456 en el directorio logs/nombre del experimento",
"*文本标注文件": "*Archivo de etiquetado de texto",
"*训练集音频文件目录": "*Directorio de archivos de audio de entrenamiento",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "Directorio de archivos de audio de entrenamiento, concatenar con los nombres de archivo correspondientes en el archivo list.",
"1Aa-文本内容": "1Aa-Contenido del texto",
"GPU卡号以-分割,每个卡号一个进程": "Número de tarjeta GPU separado por '-', cada número de tarjeta es un proceso",
"预训练的中文BERT模型路径": "Ruta del modelo BERT en chino preentrenado",
"开启文本获取": "¿Habilitar la obtención de texto?",
"终止文本获取进程": "Terminar el proceso de obtención de texto",
"文本进程输出信息": "Información de salida del proceso de obtención de texto",
"1Ab-SSL自监督特征提取": "1Ab-Extracción de características auto-supervisada SSL",
"预训练的SSL模型路径": "Ruta del modelo SSL preentrenado",
"开启SSL提取": "¿Habilitar la extracción SSL?",
"终止SSL提取进程": "Terminar el proceso de extracción SSL",
"SSL进程输出信息": "Información de salida del proceso SSL",
"1Ac-语义token提取": "1Ac-Extracción de tokens semánticos",
"开启语义token提取": "¿Habilitar la extracción de tokens semánticos?",
"终止语义token提取进程": "Terminar el proceso de extracción de tokens semánticos",
"语义token提取进程输出信息": "Información de salida del proceso de extracción de tokens semánticos",
"1Aabc-训练集格式化一键三连": "1Aabc-Formateo del conjunto de datos de entrenamiento en un solo paso",
"开启一键三连": "¿Habilitar un solo paso de formateo?",
"终止一键三连": "Terminar el proceso de un solo paso de formateo",
"一键三连进程输出信息": "Información de salida del proceso de triple acción",
"1B-微调训练": "1B-Entrenamiento de ajuste fino",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-Entrenamiento de SoVITS. Los archivos de modelo para compartir se encuentran en SoVITS_weights.",
"每张显卡的batch_size": "Tamaño de lote por tarjeta gráfica",
"总训练轮数total_epoch不建议太高": "Número total de épocas de entrenamiento, no se recomienda demasiado alto",
"文本模块学习率权重": "Peso de la tasa de aprendizaje del módulo de texto",
"保存频率save_every_epoch": "Frecuencia de guardado (cada epoch)",
"是否仅保存最新的ckpt文件以节省硬盘空间": "¿Guardar solo el último archivo ckpt para ahorrar espacio en disco?",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "¿Guardar el modelo final pequeño en la carpeta de pesos en cada punto de guardado?",
"开启SoVITS训练": "Iniciar entrenamiento de SoVITS",
"终止SoVITS训练": "Detener entrenamiento de SoVITS",
"SoVITS训练进程输出信息": "Información de salida del proceso de entrenamiento de SoVITS",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-Entrenamiento de GPT. Los archivos de modelo para compartir se encuentran en GPT_weights.",
"总训练轮数total_epoch": "Número total de épocas de entrenamiento",
"开启GPT训练": "Iniciar entrenamiento de GPT",
"终止GPT训练": "Detener entrenamiento de GPT",
"GPT训练进程输出信息": "Información de salida del proceso de entrenamiento de GPT",
"1C-推理": "1C-Inferencia",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "Seleccione el modelo almacenado en SoVITS_weights y GPT_weights después del entrenamiento. Uno de ellos es el modelo base, útil para experimentar con TTS de 5 segundos sin entrenamiento.",
"*GPT模型列表": "*Lista de modelos GPT",
"*SoVITS模型列表": "*Lista de modelos SoVITS",
"GPU卡号,只能填1个整数": "Número de tarjeta GPU, solo se puede ingresar un número entero",
"刷新模型路径": "Actualizar la ruta del modelo",
"是否开启TTS推理WebUI": "¿Habilitar la interfaz web de inferencia TTS?",
"TTS推理WebUI进程输出信息": "Información de salida del proceso de interfaz web de inferencia TTS",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-Cambio de voz",
"施工中,请静候佳音": "En construcción, por favor espere pacientemente",
"TTS推理进程已开启": "Proceso de inferencia TTS iniciado",
"TTS推理进程已关闭": "Proceso de inferencia TTS cerrado",
"打标工具WebUI已开启": "Interfaz web de la herramienta de etiquetado iniciada",
"打标工具WebUI已关闭": "Interfaz web de la herramienta de etiquetado cerrada",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "Este software es de código abierto bajo la licencia MIT. El autor no tiene control sobre el software. El usuario que lo utilice o distribuya, y el que genere sonidos a partir del software, asume toda la responsabilidad. Si no acepta estos términos, no puede utilizar ni hacer referencia a ningún código o archivo dentro del paquete de software. Consulte el archivo LICENSE en el directorio raíz para obtener más detalles.",
"*请上传并填写参考信息": "*Por favor, suba y complete la información de referencia",
"*请填写需要合成的目标文本": "*Por favor, complete el texto objetivo que necesita ser sintetizado",
"ASR任务开启%s": "Tarea ASR iniciada: %s",
"GPT训练完成": "Entrenamiento de GPT completado",
"GPT训练开始%s": "Entrenamiento de GPT iniciado: %s",
"SSL提取进程执行中": "Proceso de extracción SSL en ejecución",
"SSL提取进程结束": "Proceso de extracción SSL finalizado",
"SoVITS训练完成": "Entrenamiento de SoVITS completado",
"SoVITS训练开始%s": "Entrenamiento de SoVITS iniciado: %s",
"一键三连中途报错": "Error intermedio en triple acción",
"一键三连进程结束": "Proceso de triple acción finalizado",
"中文": "Chino",
"凑50字一切": "Todo para alcanzar las 50 palabras",
"凑五句一切": "Todo para alcanzar las cinco frases",
"切分后文本": "Texto después de la división",
"切割执行中": "División en proceso",
"切割结束": "División finalizada",
"参考音频的文本": "Texto de referencia del audio",
"参考音频的语种": "Idioma del audio de referencia",
"合成语音": "Síntesis de voz",
"后续将支持混合语种编码文本输入。": "En el futuro, se admitirá la entrada de texto con codificación de idiomas mixtos.",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "Ya hay una tarea ASR en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "Ya hay una tarea de entrenamiento de GPT en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "Ya hay una tarea de extracción SSL en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "Ya hay una tarea de entrenamiento de SoVITS en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "Ya hay una tarea de triple acción en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "Ya hay una tarea de división en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "Ya hay una tarea de texto en curso, debe detenerla antes de comenzar la siguiente tarea",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "Ya hay una tarea de extracción de tokens semánticos en curso, debe detenerla antes de comenzar la siguiente tarea",
"已终止ASR进程": "Proceso ASR terminado",
"已终止GPT训练": "Entrenamiento de GPT terminado",
"已终止SoVITS训练": "Entrenamiento de SoVITS terminado",
"已终止所有1a进程": "Se han terminado todos los procesos 1a",
"已终止所有1b进程": "Se han terminado todos los procesos 1b",
"已终止所有一键三连进程": "Se han terminado todos los procesos de triple acción",
"已终止所有切割进程": "Proceso de corte terminado",
"已终止所有语义token进程": "Proceso de extracción de tokens semánticos terminado",
"按中文句号。切": "Cortar según puntos en chino",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "Herramienta de división de texto. El resultado de la síntesis puede no ser bueno para textos demasiado largos, por lo que se recomienda dividirlos primero. La síntesis se realiza separando el texto según los saltos de línea y luego uniendo los fragmentos.",
"文本进程执行中": "Proceso de texto en ejecución",
"文本进程结束": "Proceso de texto finalizado",
"日文": "Japonés",
"英文": "Inglés",
"语义token提取进程执行中": "Proceso de extracción de tokens semánticos en ejecución",
"语义token提取进程结束": "Proceso de extracción de tokens semánticos finalizado",
"请上传参考音频": "Por favor, suba el audio de referencia",
"输入路径不存在": "La ruta de entrada no existe",
"输入路径存在但既不是文件也不是文件夹": "La ruta de entrada existe pero no es ni un archivo ni una carpeta",
"输出的语音": "Audio de salida",
"进度1a-done": "Progreso: 1a-hecho",
"进度1a-done, 1b-ing": "Progreso: 1a-hecho, 1b-en proceso",
"进度1a-ing": "Progreso: 1a-en proceso",
"进度1a1b-done": "Progreso: 1a1b-hecho",
"进度1a1b-done, 1cing": "Progreso: 1a1b-hecho, 1c-en proceso",
"进度all-done": "Progreso: todo hecho",
"需要合成的切分前文本": "Texto a sintetizar antes de la división",
"需要合成的文本": "Texto a sintetizar",
"需要合成的语种": "Idioma para la síntesis",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Si es >=3, se utiliza la mediana para filtrar los resultados del reconocimiento de altura tonal de harvest, el valor es el radio del filtro. Su uso puede debilitar los sonidos sordos.",
"A模型权重": "Peso del modelo A",
"A模型路径": "Ruta del modelo A",
"B模型路径": "Ruta del modelo B",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "Archivo de curva F0, opcional, un tono por línea, en lugar de F0 predeterminado y cambio de tono",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "Archivo de curva F0, opcional, una línea por altura tonal, en lugar de F0 y cambio de tono predeterminados",
"Index Rate": "Tasa de índice",
"Onnx导出": "Exportar Onnx",
"Onnx输出路径": "Ruta de salida Onnx",
"Onnx导出": "Exportar a Onnx",
"Onnx输出路径": "Ruta de salida de Onnx",
"RVC模型路径": "Ruta del modelo RVC",
"ckpt处理": "Procesamiento de recibos",
"harvest进程数": "Número de procesos",
"index文件路径不可包含中文": "La ruta del archivo .index no debe contener caracteres chinos.",
"pth文件路径不可包含中文": "La ruta del archivo .pth no debe contener caracteres chinos.",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Separe los números de identificación de la GPU con '-' al ingresarlos. Por ejemplo, '0-1-2' significa usar GPU 0, GPU 1 y GPU 2.",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Paso 1: Complete la configuración del experimento. Los datos del experimento se almacenan en el directorio 'logs', con cada experimento en una carpeta separada. La ruta del nombre del experimento debe ingresarse manualmente y debe contener la configuración del experimento, los registros y los archivos del modelo entrenado.",
"ckpt处理": "Procesamiento de ckpt",
"harvest进程数": "Número de procesos de harvest",
"index文件路径不可包含中文": "La ruta del archivo de índice no puede contener caracteres chinos",
"pth文件路径不可包含中文": "La ruta del archivo pth no puede contener caracteres chinos",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Configuración de números de tarjeta rmvpe: usando - para separar los números de tarjeta de diferentes procesos de entrada, por ejemplo, 0-0-1 para ejecutar 2 procesos en la tarjeta 0 y 1 proceso en la tarjeta 1",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Paso 1: Completa la configuración del experimento. Los datos del experimento se encuentran en logs, cada experimento en una carpeta, debe ingresar manualmente la ruta del nombre del experimento, que incluye la configuración del experimento, el registro y los archivos del modelo entrenado.",
"step1:正在处理数据": "Paso 1: Procesando datos",
"step2:正在提取音高&正在提取特征": "Paso 2: Extracción del tono y extracción de características",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Paso 2a: Recorra automáticamente la carpeta de capacitación y corte y normalice todos los archivos de audio que se pueden decodificar en audio. Se generarán dos carpetas 'wav' en el directorio del experimento. Actualmente, solo se admite la capacitación de una sola persona.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Paso 2b: Use la CPU para extraer el tono (si el modelo tiene guía de tono) y la GPU para extraer características (seleccione el número de tarjeta).",
"step3: 填写训练设置, 开始训练模型和索引": "Paso 3: Complete la configuración de entrenamiento y comience a entrenar el modelo y el índice.",
"step2:正在提取音高&正在提取特征": "Paso 2: Extrayendo tono y características",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Paso 2a: Recorre automáticamente todos los archivos en la carpeta de entrenamiento que se pueden decodificar en archivos de audio y realiza la normalización de segmentos. Genera 2 carpetas de audio en el directorio del experimento; por ahora, solo es compatible con el entrenamiento de una sola persona.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Paso 2b: Extraer tono con CPU (si el modelo incluye tono) y extraer características con GPU (seleccionar número de tarjeta)",
"step3: 填写训练设置, 开始训练模型和索引": "Paso 3: Completa la configuración de entrenamiento y comienza a entrenar el modelo e indexar",
"step3a:正在训练模型": "Paso 3a: Entrenando el modelo",
"一键训练": "Entrenamiento con un clic",
"也可批量输入音频文件, 二选一, 优先读文件夹": "También se pueden importar varios archivos de audio. Si existe una ruta de carpeta, esta entrada se ignora.",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "Procesamiento por lotes para la separación de acompañamiento vocal utilizando el modelo UVR5.<br>Ejemplo de formato de ruta de carpeta válido: D:\\ruta\\a\\la\\carpeta\\de\\entrada (copiar desde la barra de direcciones del administrador de archivos).<br>El modelo se divide en tres categorías:<br>1. Preservar voces: Elija esta opción para audio sin armonías. Preserva las voces mejor que HP5. Incluye dos modelos incorporados: HP2 y HP3. HP3 puede filtrar ligeramente el acompañamiento pero conserva las voces un poco mejor que HP2.<br>2. Preservar solo voces principales: Elija esta opción para audio con armonías. Puede debilitar las voces principales. Incluye un modelo incorporado: HP5.<br>3. Modelos de des-reverberación y des-retardo (por FoxJoy):<br>(1) MDX-Net: La mejor opción para la eliminación de reverberación estéreo pero no puede eliminar la reverberación mono;<br>&emsp;(234) DeEcho: Elimina efectos de retardo. El modo Agresivo elimina más a fondo que el modo Normal. DeReverb adicionalmente elimina la reverberación y puede eliminar la reverberación mono, pero no muy efectivamente para contenido de alta frecuencia fuertemente reverberado.<br>Notas de des-reverberación/des-retardo:<br>1. El tiempo de procesamiento para el modelo DeEcho-DeReverb es aproximadamente el doble que los otros dos modelos DeEcho.<br>2. El modelo MDX-Net-Dereverb es bastante lento.<br>3. La configuración más limpia recomendada es aplicar primero MDX-Net y luego DeEcho-Agresivo.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Separe los números de identificación de la GPU con '-' al ingresarlos. Por ejemplo, '0-1-2' significa usar GPU 0, GPU 1 y GPU 2.",
"伴奏人声分离&去混响&去回声": "Separación de voz acompañante & eliminación de reverberación & eco",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "Guardar nombre",
"保存的文件名, 默认空为和源文件同名": "Nombre del archivo que se guardará, el valor predeterminado es el mismo que el nombre del archivo de origen",
"保存的模型名不带后缀": "Nombre del modelo guardado sin extensión.",
"保存频率save_every_epoch": "Frecuencia de guardado (save_every_epoch)",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Proteger las consonantes claras y la respiración, prevenir artefactos como la distorsión de sonido electrónico, 0.5 no está activado, reducir aumentará la protección pero puede reducir el efecto del índice",
"也可批量输入音频文件, 二选一, 优先读文件夹": "También se pueden ingresar archivos de audio por lotes, seleccionar uno, prioridad para leer carpetas",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Usar - para separar los números de tarjeta utilizados como entrada, por ejemplo, 0-1-2 para usar las tarjetas 0, 1 y 2",
"伴奏人声分离&去混响&去回声": "Separación de acompañamiento y voz principal y eliminación de reverberación y eco",
"使用模型采样率": "Usar tasa de muestreo del modelo",
"使用设备采样率": "Usar tasa de muestreo del dispositivo",
"保存名": "Nombre de guardado",
"保存的文件名, 默认空为和源文件同名": "Nombre de archivo guardado, vacío por defecto para tener el mismo nombre que el archivo fuente",
"保存的模型名不带后缀": "Nombre del modelo guardado sin extensión",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Proteger las consonantes claras y los sonidos de respiración, evitando artefactos como el desgarro eléctrico. No activar al tirar hasta 0.5, reducir para aumentar la protección, pero puede disminuir la efectividad del índice",
"修改": "Modificar",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modificar la información del modelo (solo admite archivos de modelos pequeños extraídos en la carpeta weights)",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modificar información del modelo (solo compatible con archivos de modelo pequeños extraídos en la carpeta weights)",
"停止音频转换": "Detener la conversión de audio",
"全流程结束!": "¡Todo el proceso ha terminado!",
"刷新音色列表和索引路径": "Actualizar la lista de modelos e índice de rutas",
"全流程结束!": Proceso completo!",
"刷新音色列表和索引路径": "Actualizar lista de tonos e índice de ruta",
"加载模型": "Cargar modelo",
"加载预训练底模D路径": "Cargue la ruta del modelo D base pre-entrenada.",
"加载预训练底模G路径": "Cargue la ruta del modelo G base pre-entrenada.",
"单次推理": "单次推理",
"卸载音色省显存": "Descargue la voz para ahorrar memoria GPU",
"变调(整数, 半音数量, 升八度12降八度-12)": "Cambio de tono (entero, número de semitonos, subir una octava +12 o bajar una octava -12)",
"后处理重采样至最终采样率0为不进行重采样": "Remuestreo posterior al proceso a la tasa de muestreo final, 0 significa no remuestrear",
"加载预训练底模D路径": "Cargar ruta del modelo D preentrenado",
"加载预训练底模G路径": "Cargar ruta del modelo G preentrenado",
"单次推理": "Inferencia única",
"卸载音色省显存": "Descargar tono para ahorrar memoria de video",
"变调(整数, 半音数量, 升八度12降八度-12)": "Cambiar tono (número entero, cantidad de semitonos, subir octava 12 bajar octava -12)",
"后处理重采样至最终采样率0为不进行重采样": "Reprocesar y remuestrear a la tasa de muestreo final, 0 para no remuestrear",
"否": "No",
"启用相位声码器": "启用相位声码器",
"启用相位声码器": "Activar codificador de fase",
"响应阈值": "Umbral de respuesta",
"响度因子": "factor de sonoridad",
"响度因子": "Factor de sonoridad",
"处理数据": "Procesar datos",
"导出Onnx模型": "Exportar modelo Onnx",
"导出文件格式": "Formato de archivo de exportación",
"常见问题解答": "Preguntas frecuentes",
"常规设置": "Configuración general",
"开始音频转换": "Iniciar conversión de audio",
"很遗憾您这没有能用的显卡来支持您训练": "Lamentablemente, no tiene una tarjeta gráfica adecuada para soportar su entrenamiento",
"性能设置": "Configuración de rendimiento",
"总训练轮数total_epoch": "Total de épocas de entrenamiento (total_epoch)",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversión por lotes, ingrese la carpeta que contiene los archivos de audio para convertir o cargue varios archivos de audio. El audio convertido se emitirá en la carpeta especificada (opción predeterminada).",
"指定输出主人声文件夹": "Especifique la carpeta de salida para la voz principal",
"批量推理": "Inferencia por lotes",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversión por lotes, ingrese la carpeta de audio a convertir o cargue varios archivos de audio, la salida se realiza en la carpeta especificada (opt por defecto). ",
"指定输出主人声文件夹": "Especificar carpeta de salida de voz principal",
"指定输出文件夹": "Especificar carpeta de salida",
"指定输出非主人声文件夹": "Especifique la carpeta de salida para las voces no principales",
"推理时间(ms):": "Inferir tiempo (ms):",
"推理音色": "inferencia de voz",
"指定输出非主人声文件夹": "Especificar carpeta de salida de no voz principal",
"推理时间(ms):": "Tiempo de inferencia (ms):",
"推理音色": "Tono de inferencia",
"提取": "Extraer",
"提取音高和处理数据使用的CPU进程数": "Número de procesos de CPU utilizados para extraer el tono y procesar los datos",
"提取音高和处理数据使用的CPU进程数": "Número de procesadores de CPU utilizados para extraer tono y procesar datos",
"是": "Sí",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Guardar solo el archivo ckpt más reciente para ahorrar espacio en disco",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Guardar pequeño modelo final en la carpeta 'weights' en cada punto de guardado",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Si almacenar en caché todos los conjuntos de entrenamiento en la memoria de la GPU. Los conjuntos de datos pequeños (menos de 10 minutos) se pueden almacenar en caché para acelerar el entrenamiento, pero el almacenamiento en caché de conjuntos de datos grandes puede causar errores de memoria en la GPU y no aumenta la velocidad de manera significativa.",
"显卡信息": "información de la GPU",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Este software es de código abierto bajo la licencia MIT, el autor no tiene ningún control sobre el software, y aquellos que usan el software y difunden los sonidos exportados por el software son los únicos responsables.<br>Si no está de acuerdo con esta cláusula , no puede utilizar ni citar ningún código ni archivo del paquete de software Consulte el directorio raíz <b>Agreement-LICENSE.txt</b> para obtener más información.",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Almacenar en caché todos los conjuntos de entrenamiento en la memoria de video. Pequeños conjuntos de datos menores a 10 minutos pueden almacenarse en caché para acelerar el entrenamiento; almacenar en caché grandes conjuntos de datos puede saturar la memoria de video y no acelerará mucho.",
"查看": "Ver",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Ver información del modelo (solo aplicable a archivos de modelos pequeños extraídos de la carpeta 'pesos')",
"检索特征占比": "Proporción de función de búsqueda",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Ver información del modelo (solo compatible con archivos pequeños extraídos en la carpeta weights)",
"检索特征占比": "Proporción de características de búsqueda",
"模型": "Modelo",
"模型推理": "inferencia del modelo",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Extracción de modelo (ingrese la ruta de un archivo de modelo grande en la carpeta 'logs'), aplicable cuando desea extraer un archivo de modelo pequeño después de entrenar a mitad de camino y no se guardó automáticamente, o cuando desea probar un modelo intermedio",
"模型是否带音高指导": "Si el modelo tiene guía de tono.",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Si el modelo tiene guía de tono (necesaria para cantar, pero no para hablar)",
"模型是否带音高指导,1是0否": "Si el modelo tiene guía de tono, 1 para sí, 0 para no",
"模型推理": "Inferencia de modelo",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Extracción de modelo (ingresar la ruta del modelo grande en la carpeta logs), útil cuando se quiere dejar de entrenar a la mitad y el modelo no ha extraído automáticamente un modelo pequeño guardado, o para probar la situación del modelo intermedio",
"模型是否带音高指导": "¿El modelo incluye guía de altura tonal?",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "¿El modelo incluye guía de altura tonal? (Necesario para cantar, opcional para voz)",
"模型是否带音高指导,1是0否": "¿El modelo incluye guía de altura tonal? 1 para sí, 0 para no",
"模型版本型号": "Versión y modelo del modelo",
"模型融合, 可用于测试音色融合": "Fusión de modelos, se puede utilizar para fusionar diferentes voces",
"模型融合, 可用于测试音色融合": "Fusión de modelos, útil para probar la mezcla de tonos",
"模型路径": "Ruta del modelo",
"每张显卡的batch_size": "Tamaño del lote (batch_size) por tarjeta gráfica",
"淡入淡出长度": "Duración del fundido de entrada/salida",
"淡入淡出长度": "Longitud de desvanecimiento",
"版本": "Versión",
"特征提取": "Extracción de características",
"特征检索库文件路径,为空则使用下拉的选择结果": "Ruta del archivo de la biblioteca de características, si está vacío, se utilizará el resultado de la selección desplegable",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Tecla +12 recomendada para conversión de voz de hombre a mujer, tecla -12 para conversión de voz de mujer a hombre. Si el rango de tono es demasiado amplio y causa distorsión, ajústelo usted mismo a un rango adecuado.",
"特征检索库文件路径,为空则使用下拉的选择结果": "Ruta del archivo de la biblioteca de búsqueda de características, si está vacío, se utiliza el resultado seleccionado en el menú desplegable",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Recomendación para cambiar de hombre a mujer +12 teclas, cambiar de mujer a hombre -12 teclas. Si la amplitud del rango tonal causa distorsión del tono, también puede ajustarse manualmente al rango tonal adecuado. ",
"目标采样率": "Tasa de muestreo objetivo",
"算法延迟(ms):": "算法延迟(ms):",
"自动检测index路径,下拉式选择(dropdown)": "Detección automática de la ruta del índice, selección desplegable (dropdown)",
"算法延迟(ms):": "Retardo del algoritmo (ms):",
"自动检测index路径,下拉式选择(dropdown)": "Detectar automáticamente la ruta del índice, seleccionar en menú desplegable",
"融合": "Fusión",
"要改的模型信息": "Información del modelo a modificar",
"要置入的模型信息": "Información del modelo a colocar.",
"训练": "Entrenamiento",
"训练模型": "Entrenar Modelo",
"训练特征索引": "Índice de características",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entrenamiento finalizado, puede ver el registro de entrenamiento en la consola o en el archivo train.log en la carpeta del experimento",
"请指定说话人id": "ID del modelo",
"请选择index文件": "Seleccione el archivo .index",
"请选择pth文件": "Seleccione el archivo .pth",
"请选择说话人id": "Seleccione una identificación de altavoz",
"转换": "Conversión",
"输入实验名": "Ingrese el nombre del modelo",
"输入待处理音频文件夹路径": "Ingrese la ruta a la carpeta de audio que se procesará",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Ingrese la ruta a la carpeta de audio que se procesará (simplemente cópiela desde la barra de direcciones del administrador de archivos)",
"输入待处理音频文件路径(默认是正确格式示例)": "Ingrese la ruta del archivo del audio que se procesará (el formato predeterminado es el ejemplo correcto)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Proporción de fusión para reemplazar el sobre de volumen de entrada con el sobre de volumen de salida, cuanto más cerca de 1, más se utiliza el sobre de salida",
"输入监听": "输入监听",
"输入训练文件夹路径": "Introduzca la ruta de la carpeta de entrenamiento",
"要改的模型信息": "Información del modelo a cambiar",
"要置入的模型信息": "Información del modelo a insertar",
"训练": "Entrenar",
"训练模型": "Entrenar modelo",
"训练特征索引": "Entrenar índice de características",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entrenamiento terminado, puede ver registros de entrenamiento en la consola o en el archivo train.log en la carpeta del experimento",
"请指定说话人id": "Por favor, especifique el ID del hablante",
"请选择index文件": "Seleccione el archivo index, por favor",
"请选择pth文件": "Seleccione el archivo pth, por favor",
"请选择说话人id": "Seleccione el ID del hablante, por favor",
"转换": "Convertir",
"输入实验名": "Ingrese el nombre del experimento",
"输入待处理音频文件夹路径": "Ingrese la ruta de la carpeta de audio a procesar",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Ingrese la ruta de la carpeta de audio a procesar (puede copiarla desde la barra de direcciones del administrador de archivos)",
"输入待处理音频文件路径(默认是正确格式示例)": "Ingrese la ruta del archivo de audio a procesar (el formato predeterminado es un ejemplo correcto)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Ingrese la proporción de fusión para reemplazar el sobre de volumen de origen con el sobre de volumen de salida; cuanto más cercano a 1, más se utiliza el sobre de salida",
"输入监听": "Entrada de monitoreo",
"输入训练文件夹路径": "Ingrese la ruta de la carpeta de entrenamiento",
"输入设备": "Dispositivo de entrada",
"输入降噪": "Reducción de ruido de entrada",
"输入降噪": "Entrada de reducción de ruido",
"输出信息": "Información de salida",
"输出变声": "输出变声",
"输出变声": "Salida de cambio de voz",
"输出设备": "Dispositivo de salida",
"输出降噪": "Reducción de ruido de salida",
"输出音频(右下角三个点,点了可以下载)": "Salida de audio (haga clic en los tres puntos en la esquina inferior derecha para descargar)",
"选择.index文件": "Seleccione el archivo .index",
"选择.pth文件": "Seleccione el archivo .pth",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "Seleccione el algoritmo de extracción de tono, las voces de entrada se pueden acelerar con pm, harvest tiene buenos graves pero es muy lento, crepe es bueno pero se come las GPUs",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Seleccione el algoritmo de extracción de tono, use 'pm' para acelerar la entrada de canto, 'harvest' es bueno para los graves pero extremadamente lento, 'crepe' tiene buenos resultados pero consume GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Seleccione el algoritmo de extracción de tono: la canción de entrada se puede acelerar con pm, la voz de alta calidad pero CPU pobre se puede acelerar con dio, harvest es mejor pero más lento, rmvpe es el mejor y se come ligeramente la CPU/GPU",
"采样率:": "采样率:",
"输出降噪": "Salida de reducción de ruido",
"输出音频(右下角三个点,点了可以下载)": "Salida de audio (los tres puntos en la esquina inferior derecha, haga clic para descargar)",
"选择.index文件": "Seleccione el archivo .index, por favor",
"选择.pth文件": "Seleccione el archivo .pth, por favor",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "Seleccione el algoritmo de extracción de tono; para voz, pm acelera, harvest es lento pero tiene buenos bajos, crepe tiene buen efecto pero consume GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Seleccione el algoritmo de extracción de tono; para voz, pm acelera, harvest es lento pero tiene buenos bajos, crepe tiene buen efecto pero consume GPU, rmvpe tiene el mejor efecto y consume poco GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Seleccione el algoritmo de extracción de tono: para voz, pm acelera con buena calidad de audio pero CPU deficiente, dio acelera pero harvest tiene mejor calidad aunque es más lento, rmvpe tiene el mejor efecto y consume poco CPU/GPU",
"采样率:": "Tasa de muestreo:",
"采样长度": "Longitud de muestreo",
"重载设备列表": "Actualizar lista de dispositivos",
"音调设置": "Ajuste de tono",
"音频设备(请使用同种类驱动)": "Dispositivo de audio (utilice el mismo tipo de controlador)",
"重载设备列表": "Recargar lista de dispositivos",
"音调设置": "Configuración de tono",
"音频设备(请使用同种类驱动)": "Dispositivo de audio (utilice controladores del mismo tipo)",
"音高算法": "Algoritmo de tono",
"额外推理时长": "Tiempo de inferencia adicional"
"额外推理时长": "Tiempo adicional de inferencia"
}

View File

@ -1,135 +1,284 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Si >=3 : appliquer un filtrage médian aux résultats de la reconnaissance de la hauteur de récolte. La valeur représente le rayon du filtre et peut réduire la respiration.",
"A模型权重": "Poids (w) pour le modèle A :",
"A模型路径": "Chemin d'accès au modèle A :",
"B模型路径": "Chemin d'accès au modèle B :",
"很遗憾您这没有能用的显卡来支持您训练": "Malheureusement, votre carte graphique n'est pas compatible avec l'entraînement.",
"UVR5已开启": "UVR5 est activé",
"UVR5已关闭": "UVR5 est désactivé",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Ce logiciel est open source sous la licence MIT. L'auteur n'a aucun contrôle sur le logiciel. Les utilisateurs et les diffuseurs du son exporté par le logiciel en assument l'entière responsabilité. <br>Si vous n'acceptez pas ces termes, vous ne pouvez ni utiliser ni citer aucun code ou fichier à l'intérieur du package. Voir <b>LICENSE</b> dans le répertoire racine pour plus de détails.",
"0-前置数据集获取工具": "0-Outil de récupération de jeu de données préalable",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-Outil de séparation de la voix humaine et de l'accompagnement UVR5 & suppression de la réverbération et du retard",
"是否开启UVR5-WebUI": "Activer UVR5-WebUI",
"UVR5进程输出信息": "Informations de processus UVR5",
"0b-语音切分工具": "0b-Outil de découpage vocal",
".list标注文件的路径": "Chemin du fichier d'annotation .list",
"GPT模型列表": "Liste des modèles GPT",
"SoVITS模型列表": "Liste des modèles SoVITS",
"填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。": "Répertoire où sont enregistrés les fichiers audio après la découpe ! Chemin complet du fichier audio à lire = ce répertoire - nom du fichier correspondant à la forme d'onde dans le fichier liste (pas le chemin complet).",
"音频自动切分输入路径,可文件可文件夹": "Chemin d'entrée automatique de découpage audio, peut être un fichier ou un dossier",
"切分后的子音频的输出根目录": "Répertoire racine de sortie des sous-audios après découpage",
"怎么切": "Comment découper",
"不切": "Pas de découpe",
"凑四句一切": "Composez quatre phrases pour tout remplir",
"按英文句号.切": "Découpez par des points en anglais",
"threshold:音量小于这个值视作静音的备选切割点": "seuil: le volume inférieur à cette valeur est considéré comme un point de coupe silencieux alternatif",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length: longueur minimale de chaque segment, si le premier segment est trop court, il est continué avec le segment suivant jusqu'à dépasser cette valeur",
"min_interval:最短切割间隔": "min_interval: intervalle de coupe minimum",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size: comment calculer la courbe de volume, plus petit pour une précision plus élevée mais une charge de calcul plus élevée (ce n'est pas une meilleure précision)",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept: durée maximale de silence après la coupe",
"开启语音切割": "Activer le découpage vocal",
"终止语音切割": "Arrêter le découpage vocal",
"max:归一化后最大值多少": "max: valeur maximale après normalisation",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix: proportion d'audio normalisé mélangé",
"切割使用的进程数": "Nombre de processus utilisés pour le découpage",
"语音切割进程输出信息": "Informations de processus de découpage vocal",
"0c-中文批量离线ASR工具": "0c-Outil chinois de transcription automatique hors ligne en masse",
"开启离线批量ASR": "Activer la transcription automatique hors ligne en masse",
"终止ASR进程": "Arrêter le processus ASR",
"批量ASR(中文only)输入文件夹路径": "Chemin du dossier d'entrée pour la transcription automatique hors ligne en masse (chinois uniquement)",
"ASR进程输出信息": "Informations de processus ASR",
"0d-语音文本校对标注工具": "0d-Outil de correction et d'annotation de texte vocal",
"是否开启打标WebUI": "Activer l'interface Web d'annotation",
"打标数据标注文件路径": "Chemin du fichier d'annotation des données annotées",
"打标工具进程输出信息": "Informations de processus de l'outil d'annotation",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*Nom de l'expérience/modèle",
"显卡信息": "Informations sur la carte graphique",
"预训练的SoVITS-G模型路径": "Chemin du modèle SoVITS-G pré-entraîné",
"预训练的SoVITS-D模型路径": "Chemin du modèle SoVITS-D pré-entraîné",
"预训练的GPT模型路径": "Chemin du modèle GPT pré-entraîné",
"1A-训练集格式化工具": "1A-Outil de formatage du jeu de données d'entraînement",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "Les fichiers et dossiers commençant par 23456 devraient être présents dans le répertoire logs/nom de l'expérience",
"*文本标注文件": "*Fichier d'annotation de texte",
"*训练集音频文件目录": "*Répertoire des fichiers audio d'entraînement",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "Répertoire des fichiers audio d'entraînement - concaténer avec les noms de fichiers correspondants dans le fichier de liste",
"1Aa-文本内容": "1Aa-Contenu du texte",
"GPU卡号以-分割,每个卡号一个进程": "Numéro de carte GPU séparé par des tirets, un processus par numéro de carte",
"预训练的中文BERT模型路径": "Chemin du modèle BERT chinois pré-entraîné",
"开启文本获取": "Activer l'extraction de texte",
"终止文本获取进程": "Arrêter le processus d'extraction de texte",
"文本进程输出信息": "Informations de processus de texte",
"1Ab-SSL自监督特征提取": "1Ab-Extraction de caractéristiques auto-supervisée SSL",
"预训练的SSL模型路径": "Chemin du modèle SSL pré-entraîné",
"开启SSL提取": "Activer l'extraction SSL",
"终止SSL提取进程": "Arrêter le processus d'extraction SSL",
"SSL进程输出信息": "Informations de processus SSL",
"1Ac-语义token提取": "1Ac-Extraction de jetons sémantiques",
"开启语义token提取": "Activer l'extraction de jetons sémantiques",
"终止语义token提取进程": "Arrêter le processus d'extraction de jetons sémantiques",
"语义token提取进程输出信息": "Informations de processus d'extraction de jetons sémantiques",
"1Aabc-训练集格式化一键三连": "1Aabc-Formatage en un clic du jeu de données d'entraînement",
"开启一键三连": "Activer l'un clic trois connexions",
"终止一键三连": "Arrêter l'un clic trois connexions",
"一键三连进程输出信息": "Informations de processus de l'un clic trois connexions",
"1B-微调训练": "1B-Entraînement fin",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-Entraînement SoVITS. Les fichiers de modèle destinés au partage sont enregistrés sous SoVITS_weights.",
"每张显卡的batch_size": "Taille de lot par carte graphique",
"总训练轮数total_epoch不建议太高": "Nombre total d'époques d'entraînement, pas recommandé d'être trop élevé",
"文本模块学习率权重": "Poids du taux d'apprentissage du module de texte",
"保存频率save_every_epoch": "Fréquence de sauvegarde (sauvegarder à chaque époque)",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Sauvegarder uniquement le dernier fichier ckpt pour économiser de l'espace disque",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Sauvegarder le petit modèle final dans le dossier weights à chaque point de sauvegarde",
"开启SoVITS训练": "Activer l'entraînement SoVITS",
"终止SoVITS训练": "Arrêter l'entraînement SoVITS",
"SoVITS训练进程输出信息": "Informations de processus d'entraînement SoVITS",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-Entraînement GPT. Les fichiers de modèle destinés au partage sont enregistrés sous GPT_weights.",
"总训练轮数total_epoch": "Nombre total d'époques d'entraînement",
"开启GPT训练": "Activer l'entraînement GPT",
"终止GPT训练": "Arrêter l'entraînement GPT",
"GPT训练进程输出信息": "Informations de processus d'entraînement GPT",
"1C-推理": "1C-Inférence",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "Choisissez le modèle entraîné stocké sous SoVITS_weights et GPT_weights. Par défaut, l'un d'eux est un modèle de base pour l'expérience de TTS Zero Shot de 5 secondes.",
"*GPT模型列表": "*Liste des modèles GPT",
"*SoVITS模型列表": "*Liste des modèles SoVITS",
"GPU卡号,只能填1个整数": "Numéro de carte GPU, ne peut contenir qu'un seul entier",
"刷新模型路径": "Actualiser le chemin du modèle",
"是否开启TTS推理WebUI": "Activer l'interface Web d'inférence TTS",
"TTS推理WebUI进程输出信息": "Informations de processus de l'interface Web d'inférence TTS",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-Modification de la voix",
"施工中,请静候佳音": "En construction, veuillez attendre patiemment",
"TTS推理进程已开启": "Le processus d'inférence TTS est en cours",
"TTS推理进程已关闭": "Le processus d'inférence TTS est terminé",
"打标工具WebUI已开启": "L'interface Web de l'outil d'annotation est en cours",
"打标工具WebUI已关闭": "L'interface Web de l'outil d'annotation est terminée",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "Ce logiciel est open source sous la licence MIT. L'auteur n'a aucun contrôle sur le logiciel. Les utilisateurs et les diffuseurs du son exporté par le logiciel en assument l'entière responsabilité. Si vous n'acceptez pas ces termes, vous ne pouvez ni utiliser ni citer aucun code ou fichier à l'intérieur du package. Voir LICENSE dans le répertoire racine pour plus de détails.",
"*请上传并填写参考信息": "*Veuillez télécharger et remplir les informations de référence",
"*请填写需要合成的目标文本": "*Veuillez remplir le texte cible à synthétiser",
"ASR任务开启%s": "Tâche ASR activée : %s",
"GPT训练完成": "Entraînement GPT terminé",
"GPT训练开始%s": "Entraînement GPT commencé : %s",
"SSL提取进程执行中": "Processus d'extraction SSL en cours",
"SSL提取进程结束": "Processus d'extraction SSL terminé",
"SoVITS训练完成": "Entraînement SoVITS terminé",
"SoVITS训练开始%s": "Entraînement SoVITS commencé : %s",
"一键三连中途报错": "Erreur intermédiaire dans la séquence d'un clic trois connexions",
"一键三连进程结束": "Processus de séquence d'un clic trois connexions terminé",
"中文": "Chinois",
"凑50字一切": "Assembler 50 mots tout",
"凑五句一切": "Assembler cinq phrases tout",
"切分后文本": "Texte après découpage",
"切割执行中": "Découpage en cours",
"切割结束": "Découpage terminé",
"参考音频的文本": "Texte de l'audio de référence",
"参考音频的语种": "Langue de l'audio de référence",
"合成语音": "Synthèse vocale",
"后续将支持混合语种编码文本输入。": "Prise en charge ultérieure du codage de texte avec des langues mixtes.",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "Une tâche ASR est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "Une tâche d'entraînement GPT est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "Une tâche d'extraction SSL est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "Une tâche d'entraînement SoVITS est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "Une tâche d'une séquence d'un clic trois connexions est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "Une tâche de découpage est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "Une tâche de texte est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "Une tâche d'extraction de jetons sémantiques est déjà en cours. Vous devez d'abord l'arrêter avant de démarrer une nouvelle tâche.",
"已终止ASR进程": "Processus ASR arrêté",
"已终止GPT训练": "Entraînement GPT arrêté",
"已终止SoVITS训练": "Entraînement SoVITS arrêté",
"已终止所有1a进程": "Tous les processus 1a ont été arrêtés",
"已终止所有1b进程": "Tous les processus 1b ont été arrêtés",
"已终止所有一键三连进程": "Tous les processus d'une séquence d'un clic trois connexions ont été arrêtés",
"已终止所有切割进程": "Tous les processus de découpage ont été arrêtés",
"已终止所有语义token进程": "Tous les processus de jetons sémantiques ont été arrêtés",
"按中文句号。切": "Couper selon les points en chinois.",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "Outil de découpage de texte. Un texte trop long peut ne pas donner un bon résultat, donc il est recommandé de le couper d'abord s'il est trop long. La synthèse se fera en séparant le texte par les sauts de ligne puis en les assemblant.",
"文本进程执行中": "Processus de texte en cours",
"文本进程结束": "Processus de texte terminé",
"日文": "Japonais",
"英文": "Anglais",
"语义token提取进程执行中": "Processus d'extraction de jetons sémantiques en cours",
"语义token提取进程结束": "Processus d'extraction de jetons sémantiques terminé",
"请上传参考音频": "Veuillez télécharger l'audio de référence",
"输入路径不存在": "Le chemin d'entrée n'existe pas",
"输入路径存在但既不是文件也不是文件夹": "Le chemin d'entrée existe mais n'est ni un fichier ni un dossier",
"输出的语音": "Audio de sortie",
"进度1a-done": "Progression : 1a-done",
"进度1a-done, 1b-ing": "Progression : 1a-done, 1b-ing",
"进度1a-ing": "Progression : 1a-ing",
"进度1a1b-done": "Progression : 1a1b-done",
"进度1a1b-done, 1cing": "Progression : 1a1b-done, 1cing",
"进度all-done": "Progression : all-done",
"需要合成的切分前文本": "Texte préalable à la synthèse",
"需要合成的文本": "Texte à synthétiser",
"需要合成的语种": "Langue de synthèse requise",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Si >= 3, utilisez le résultat de la reconnaissance de hauteur de récolte avec un filtre médian, la valeur est le rayon du filtre, son utilisation peut atténuer les sons sourds",
"A模型权重": "Poids du modèle A",
"A模型路径": "Chemin du modèle A",
"B模型路径": "Chemin du modèle B",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "Fichier de courbe F0 (facultatif). Une hauteur par ligne. Remplace la fréquence fondamentale par défaut et la modulation de la hauteur :",
"Index Rate": "Taux d'indexation",
"Onnx导出": "Exporter en ONNX",
"Onnx输出路径": "Chemin d'exportation ONNX :",
"RVC模型路径": "Chemin du modèle RVC :",
"ckpt处理": "Traitement des fichiers .ckpt",
"harvest进程数": "Nombre de processus CPU utilisés pour l'algorithme de reconnaissance de la hauteur (pitch) dans le cadre de la récolte (harvest).",
"index文件路径不可包含中文": "Le chemin du fichier d'index ne doit pas contenir de caractères chinois.",
"pth文件路径不可包含中文": "Le chemin du fichier .pth ne doit pas contenir de caractères chinois.",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Configuration des numéros de carte RMVPE : séparez les index GPU par des tirets \"-\", par exemple, 0-0-1 pour utiliser 2 processus sur GPU0 et 1 processus sur GPU1.",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Étape 1 : Remplissez la configuration expérimentale. Les données expérimentales sont stockées dans le dossier 'logs', avec chaque expérience ayant un dossier distinct. Entrez manuellement le chemin du nom de l'expérience, qui contient la configuration expérimentale, les journaux et les fichiers de modèle entraînés.",
"step1:正在处理数据": "Étape 1 : Traitement des données en cours.",
"step2:正在提取音高&正在提取特征": "Étape 2 : Extraction de la hauteur et extraction des caractéristiques en cours.",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Étape 2a : Parcours automatique de tous les fichiers du dossier d'entraînement qui peuvent être décodés en fichiers audio et réalisation d'une normalisation par tranches. Génère 2 dossiers wav dans le répertoire de l'expérience. Actuellement, seule la formation avec un seul chanteur/locuteur est prise en charge.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Étape 2b : Utilisez le CPU pour extraire la hauteur (si le modèle le permet), utilisez le GPU pour extraire les caractéristiques (sélectionnez l'index du GPU) :",
"step3: 填写训练设置, 开始训练模型和索引": "Étape 3 : Remplissez les paramètres d'entraînement et démarrez l'entraînement du modèle ainsi que l'indexation.",
"step3a:正在训练模型": "Étape 3a : L'entraînement du modèle a commencé.",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "Fichier de courbe F0, optionnel, une ligne par hauteur de ton, remplace F0 et la hauteur de ton par défaut",
"Index Rate": "Taux d'index",
"Onnx导出": "Exportation Onnx",
"Onnx输出路径": "Chemin d'exportation Onnx",
"RVC模型路径": "Chemin du modèle RVC",
"ckpt处理": "Traitement des points de contrôle",
"harvest进程数": "Nombre de processus de récolte",
"index文件路径不可包含中文": "Le chemin du fichier d'index ne peut pas contenir de caractères chinois",
"pth文件路径不可包含中文": "Le chemin du fichier pth ne peut pas contenir de caractères chinois",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Configuration des numéros de carte rmvpe : séparez les numéros de carte utilisés en entrée par des tirets, par exemple 0-0-1 signifie 2 processus sur la carte 0 et 1 processus sur la carte 1",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Étape 1 : Remplissez la configuration de l'expérience. Les données de l'expérience sont stockées dans le dossier logs, chaque expérience a son propre dossier. Vous devez entrer manuellement le chemin du nom de l'expérience, qui contient la configuration de l'expérience, les journaux et les fichiers de modèle entraînés.",
"step1:正在处理数据": "Étape 1 : Traitement des données en cours",
"step2:正在提取音高&正在提取特征": "Étape 2 : Extraction de la hauteur tonale et des caractéristiques en cours",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Étape 2a : Parcours automatique de tous les fichiers décodables en audio dans le dossier d'entraînement et normalisation par découpage. Deux dossiers wav sont générés dans le répertoire de l'expérience. Actuellement, seule la formation individuelle est prise en charge.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Étape 2b : Extraction de la hauteur tonale avec le CPU (si le modèle a une hauteur tonale) et extraction des caractéristiques avec le GPU (choisissez le numéro de la carte)",
"step3: 填写训练设置, 开始训练模型和索引": "Étape 3 : Remplissez les paramètres d'entraînement et commencez l'entraînement du modèle et de l'index",
"step3a:正在训练模型": "Étape 3a : Entraînement du modèle en cours",
"一键训练": "Entraînement en un clic",
"也可批量输入音频文件, 二选一, 优先读文件夹": "Il est également possible d'importer plusieurs fichiers audio. Si un chemin de dossier existe, cette entrée est ignorée.",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "Traitement en lot pour la séparation de la voix et de l'accompagnement vocal à l'aide du modèle UVR5.<br>Exemple d'un format de chemin de dossier valide : D:\\chemin\\vers\\dossier\\d'entrée (copiez-le depuis la barre d'adresse du gestionnaire de fichiers).<br>Le modèle est divisé en trois catégories :<br>1. Préserver la voix : Choisissez cette option pour l'audio sans harmonies. Elle préserve la voix mieux que HP5. Il comprend deux modèles intégrés : HP2 et HP3. HP3 peut légèrement laisser passer l'accompagnement mais préserve légèrement mieux la voix que HP2.<br>2. Préserver uniquement la voix principale : Choisissez cette option pour l'audio avec harmonies. Cela peut affaiblir la voix principale. Il comprend un modèle intégré : HP5.<br>3. Modèles de suppression de la réverbération et du délai (par FoxJoy) :<br>(1) MDX-Net : Le meilleur choix pour la suppression de la réverbération stéréo, mais ne peut pas supprimer la réverbération mono.<br>(234) DeEcho : Supprime les effets de délai. Le mode Aggressive supprime plus efficacement que le mode Normal. DeReverb supprime également la réverbération et peut supprimer la réverbération mono, mais pas très efficacement pour les contenus à haute fréquence fortement réverbérés.<br>Notes sur la suppression de la réverbération et du délai :<br>1. Le temps de traitement pour le modèle DeEcho-DeReverb est environ deux fois plus long que pour les autres deux modèles DeEcho.<br>2. Le modèle MDX-Net-Dereverb est assez lent.<br>3. La configuration la plus propre recommandée est d'appliquer d'abord MDX-Net, puis DeEcho-Aggressive.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Entrez le(s) index GPU séparé(s) par '-', par exemple, 0-1-2 pour utiliser les GPU 0, 1 et 2 :",
"伴奏人声分离&去混响&去回声": "Séparation des voix/accompagnement et suppression de la réverbération",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "Nom de sauvegarde :",
"保存的文件名, 默认空为和源文件同名": "Nom du fichier de sauvegarde (par défaut : identique au nom du fichier source) :",
"保存的模型名不带后缀": "Nom du modèle enregistré (sans extension) :",
"保存频率save_every_epoch": "Fréquence de sauvegarde (save_every_epoch) :",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Protéger les consonnes sourdes et les bruits de respiration pour éviter les artefacts tels que le déchirement dans la musique électronique. Réglez à 0,5 pour désactiver. Diminuez la valeur pour renforcer la protection, mais cela peut réduire la précision de l'indexation :",
"也可批量输入音频文件, 二选一, 优先读文件夹": "Également possible d'entrer en lot des fichiers audio, au choix, privilégiez la lecture du dossier",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Numéros de carte utilisés en entrée séparés par des tirets, par exemple 0-1-2 Utilisez les cartes 0, 1 et 2",
"伴奏人声分离&去混响&去回声": "Séparation de la voix et de l'accompagnement, suppression de la réverbération et de l'écho",
"使用模型采样率": "Taux d'échantillonnage du modèle",
"使用设备采样率": "Taux d'échantillonnage de l'appareil",
"保存名": "Nom de sauvegarde",
"保存的文件名, 默认空为和源文件同名": "Nom de fichier sauvegardé, par défaut vide pour avoir le même nom que le fichier source",
"保存的模型名不带后缀": "Nom du modèle sauvegardé sans suffixe",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Protéger les consonnes claires et les sons de respiration, éviter les artefacts tels que le déchirement du son électronique, tirer à 0.5 pour désactiver, diminuer pour augmenter la protection mais cela peut réduire l'efficacité de l'indexation",
"修改": "Modifier",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modifier les informations du modèle (uniquement pris en charge pour les petits fichiers de modèle extraits du dossier 'weights')",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modifier les informations du modèle (uniquement pour les petits fichiers de modèle extraits sous le dossier weights)",
"停止音频转换": "Arrêter la conversion audio",
"全流程结束!": "Toutes les étapes ont été terminées !",
"刷新音色列表和索引路径": "Actualiser la liste des voix et le vers l'index.",
"加载模型": "Charger le modèle.",
"加载预训练底模D路径": "Charger le chemin du modèle de base pré-entraîné D :",
"加载预训练底模G路径": "Charger le chemin du modèle de base pré-entraîné G :",
"单次推理": "单次推理",
"卸载音色省显存": "Décharger la voix pour économiser la mémoire GPU.",
"变调(整数, 半音数量, 升八度12降八度-12)": "Transposer (entier, nombre de demi-tons, monter d'une octave : 12, descendre d'une octave : -12) :",
"后处理重采样至最终采样率0为不进行重采样": "Rééchantillonner l'audio de sortie en post-traitement à la fréquence d'échantillonnage finale. Réglez sur 0 pour ne pas effectuer de rééchantillonnage :",
"全流程结束!": "Processus complet terminé !",
"刷新音色列表和索引路径": "Actualiser la liste des timbres et les chemins d'index",
"加载模型": "Charger le modèle",
"加载预训练底模D路径": "Charger le chemin du modèle de base pré-entraîné D",
"加载预训练底模G路径": "Charger le chemin du modèle de base pré-entraîné G",
"单次推理": "Inférence unique",
"卸载音色省显存": "Décharger le timbre pour économiser la mémoire vidéo",
"变调(整数, 半音数量, 升八度12降八度-12)": "Changer la tonalité (entier, quantité de demi-tons, monter d'une octave 12, descendre d'une octave -12)",
"后处理重采样至最终采样率0为不进行重采样": "Re-échantillonnage en post-traitement à la fréquence d'échantillonnage finale, 0 pour ne pas effectuer de re-échantillonnage",
"否": "Non",
"启用相位声码器": "启用相位声码器",
"启用相位声码器": "Activer le codeur de phase",
"响应阈值": "Seuil de réponse",
"响度因子": "Facteur de volume sonore",
"处理数据": "Traitement des données",
"导出Onnx模型": "Exporter le modèle au format ONNX.",
"导出文件格式": "Format de fichier d'exportation",
"常见问题解答": "FAQ (Foire Aux Questions)",
"处理数据": "Traiter les données",
"导出Onnx模型": "Exporter le modèle Onnx",
"导出文件格式": "Format d'exportation du fichier",
"常见问题解答": "Questions fréquemment posées",
"常规设置": "Paramètres généraux",
"开始音频转换": "Démarrer la conversion audio.",
"很遗憾您这没有能用的显卡来支持您训练": "Malheureusement, il n'y a pas de GPU compatible disponible pour prendre en charge votre entrainement.",
"开始音频转换": "Démarrer la conversion audio",
"性能设置": "Paramètres de performance",
"总训练轮数total_epoch": "Nombre total d'époques d'entraînement (total_epoch) :",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversion en lot. Entrez le dossier contenant les fichiers audio à convertir ou téléchargez plusieurs fichiers audio. Les fichiers audio convertis seront enregistrés dans le dossier spécifié (par défaut : 'opt').",
"指定输出主人声文件夹": "Spécifiez le dossier de sortie pour les fichiers de voix :",
"指定输出文件夹": "Spécifiez le dossier de sortie :",
"指定输出非主人声文件夹": "Spécifiez le dossier de sortie pour l'accompagnement :",
"批量推理": "Inférence en lot",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversion en lot, entrez le dossier audio à convertir, ou téléchargez plusieurs fichiers audio, les fichiers convertis seront enregistrés dans le dossier spécifié (opt par défaut).",
"指定输出主人声文件夹": "Spécifier le dossier de sortie pour la voix principale",
"指定输出文件夹": "Spécifier le dossier de sortie",
"指定输出非主人声文件夹": "Spécifier le dossier de sortie pour la non-voix principale",
"推理时间(ms):": "Temps d'inférence (ms) :",
"推理音色": "Voix pour l'inférence",
"推理音色": "Timbre d'inférence",
"提取": "Extraire",
"提取音高和处理数据使用的CPU进程数": "Nombre de processus CPU utilisés pour l'extraction de la hauteur et le traitement des données :",
"提取音高和处理数据使用的CPU进程数": "Nombre de processus CPU utilisés pour extraire la hauteur tonale et traiter les données",
"是": "Oui",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Enregistrer uniquement le dernier fichier '.ckpt' pour économiser de l'espace disque :",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Enregistrer un petit modèle final dans le dossier 'weights' à chaque point de sauvegarde :",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Mettre en cache tous les ensembles d'entrainement dans la mémoire GPU. Mettre en cache de petits ensembles de données (moins de 10 minutes) peut accélérer l'entrainement, mais mettre en cache de grands ensembles de données consommera beaucoup de mémoire GPU et peut ne pas apporter beaucoup d'amélioration de vitesse :",
"显卡信息": "Informations sur la carte graphique (GPU)",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Ce logiciel est open source sous la licence MIT. L'auteur n'a aucun contrôle sur le logiciel. Les utilisateurs qui utilisent le logiciel et distribuent les sons exportés par le logiciel en sont entièrement responsables. <br>Si vous n'acceptez pas cette clause, vous ne pouvez pas utiliser ou faire référence à aucun code ni fichier contenu dans le package logiciel. Consultez le fichier <b>Agreement-LICENSE.txt</b> dans le répertoire racine pour plus de détails.",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Mettre en cache ou non tous les ensembles d'entraînement dans la mémoire vidéo. Pour les petites données de moins de 10 minutes, la mise en cache peut accélérer l'entraînement, mais pour les grandes données, la mise en cache peut épuiser la mémoire vidéo sans améliorer considérablement la vitesse.",
"查看": "Voir",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Afficher les informations sur le modèle (uniquement pour les petits fichiers de modèle extraits du dossier \"weights\")",
"检索特征占比": "Rapport de recherche de caractéristiques (contrôle l'intensité de l'accent, un rapport trop élevé provoque des artefacts) :",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Voir les informations du modèle (uniquement pour les petits fichiers de modèle extraits sous le dossier weights)",
"检索特征占比": "Pourcentage des caractéristiques extraites",
"模型": "Modèle",
"模型推理": "Inférence du modèle",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Extraction du modèle (saisissez le chemin d'accès au modèle du grand fichier dans le dossier \"logs\"). Cette fonction est utile si vous souhaitez arrêter l'entrainement à mi-chemin et extraire et enregistrer manuellement un petit fichier de modèle, ou si vous souhaitez tester un modèle intermédiaire :",
"模型是否带音高指导": "Indique si le modèle dispose d'un guidage en hauteur :",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Indique si le modèle dispose d'un système de guidage de la hauteur (obligatoire pour le chant, facultatif pour la parole) :",
"模型是否带音高指导,1是0否": "Le modèle dispose-t-il d'un guide de hauteur (1 : oui, 0 : non) ?",
"模型版本型号": "Version de l'architecture du modèle :",
"模型融合, 可用于测试音色融合": "Fusion de modèles, peut être utilisée pour tester la fusion de timbres",
"模型路径": "Le chemin vers le modèle :",
"每张显卡的batch_size": "Taille du batch par GPU :",
"淡入淡出长度": "Longueur de la transition",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Extraction du modèle (saisissez le chemin du modèle volumineux sous le dossier logs), utilisé lorsque l'entraînement est à mi-chemin, que vous ne voulez pas continuer l'entraînement, que le modèle n'a pas été automatiquement extrait et sauvegardé en tant que petit fichier, ou que vous souhaitez tester le modèle intermédiaire.",
"模型是否带音高指导": "Le modèle inclut-il un guidage en hauteur tonale",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Le modèle inclut-il un guidage en hauteur tonale (nécessaire pour le chant, facultatif pour la parole)",
"模型是否带音高指导,1是0否": "Le modèle inclut-il un guidage en hauteur tonale, 1 pour oui, 0 pour non",
"模型版本型号": "Numéro de version du modèle",
"模型融合, 可用于测试音色融合": "Fusion de modèles, utilisée pour tester la fusion des timbres",
"模型路径": "Chemin du modèle",
"淡入淡出长度": "Longueur du fondu enchaîné",
"版本": "Version",
"特征提取": "Extraction des caractéristiques",
"特征检索库文件路径,为空则使用下拉的选择结果": "Chemin d'accès au fichier d'index des caractéristiques. Laisser vide pour utiliser le résultat sélectionné dans la liste déroulante :",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Il est recommandé d'utiliser la clé +12 pour la conversion homme-femme et la clé -12 pour la conversion femme-homme. Si la plage sonore est trop large et que la voix est déformée, vous pouvez également l'ajuster vous-même à la plage appropriée.",
"目标采样率": "Taux d'échantillonnage cible :",
"算法延迟(ms):": "Délais algorithmiques (ms):",
"自动检测index路径,下拉式选择(dropdown)": "Détecter automatiquement le chemin d'accès à l'index et le sélectionner dans la liste déroulante :",
"特征检索库文件路径,为空则使用下拉的选择结果": "Chemin du fichier de bibliothèque de recherche de caractéristiques, laisser vide pour utiliser le résultat de la liste déroulante",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Recommandation pour la transformation homme vers femme +12 clés, femme vers homme -12 clés, ajustez vous-même si l'étendue du son explose et provoque une distorsion de la voix.",
"目标采样率": "Taux d'échantillonnage cible",
"算法延迟(ms):": "Retard de l'algorithme (ms):",
"自动检测index路径,下拉式选择(dropdown)": "Détection automatique du chemin de l'index, choix dans la liste déroulante",
"融合": "Fusion",
"要改的模型信息": "Informations sur le modèle à modifier :",
"要置入的模型信息": "Informations sur le modèle à placer :",
"训练": "Entraîner",
"要改的模型信息": "Informations du modèle à modifier",
"要置入的模型信息": "Informations du modèle à insérer",
"训练": "Entraînement",
"训练模型": "Entraîner le modèle",
"训练特征索引": "Entraîner l'index des caractéristiques",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entraînement terminé. Vous pouvez consulter les rapports d'entraînement dans la console ou dans le fichier 'train.log' situé dans le dossier de l'expérience.",
"请指定说话人id": "Veuillez spécifier l'ID de l'orateur ou du chanteur :",
"请选择index文件": "Veuillez sélectionner le fichier d'index",
"请选择pth文件": "Veuillez sélectionner le fichier pth",
"请选择说话人id": "Sélectionner l'ID de l'orateur ou du chanteur :",
"转换": "Convertir",
"输入实验名": "Saisissez le nom de l'expérience :",
"输入待处理音频文件夹路径": "Entrez le chemin du dossier audio à traiter :",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Entrez le chemin du dossier audio à traiter (copiez-le depuis la barre d'adresse du gestionnaire de fichiers) :",
"输入待处理音频文件路径(默认是正确格式示例)": "Entrez le chemin d'accès du fichier audio à traiter (par défaut, l'exemple de format correct) :",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Ajustez l'échelle de l'enveloppe de volume. Plus il est proche de 0, plus il imite le volume des voix originales. Cela peut aider à masquer les bruits et à rendre le volume plus naturel lorsqu'il est réglé relativement bas. Plus le volume est proche de 1, plus le volume sera fort et constant :",
"输入监听": "Moniteur vocal d'entrée",
"输入训练文件夹路径": "Indiquez le chemin d'accès au dossier d'entraînement :",
"输入设备": "Dispositif d'entrée",
"输入降噪": "Réduction du bruit d'entrée",
"输出信息": "Informations sur la sortie",
"输出变声": "Sortie voix convertie",
"输出设备": "Dispositif de sortie",
"输出降噪": "Réduction du bruit de sortie",
"输出音频(右下角三个点,点了可以下载)": "Exporter l'audio (cliquer sur les trois points dans le coin inférieur droit pour télécharger)",
"选择.index文件": "Sélectionner le fichier .index",
"选择.pth文件": "Sélectionner le fichier .pth",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "Sélection de l'algorithme d'extraction de la hauteur, les voix d'entrée peuvent être accélérées avec pm, harvest a de bonnes basses mais est très lent, crepe est bon mais consomme beaucoup de ressources GPU.",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Sélectionnez l'algorithme d'extraction de la hauteur de ton (\"pm\" : extraction plus rapide mais parole de moindre qualité ; \"harvest\" : meilleure basse mais extrêmement lente ; \"crepe\" : meilleure qualité mais utilisation intensive du GPU), \"rmvpe\" : meilleure qualité et peu d'utilisation du GPU.",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Sélection de l'algorithme d'extraction de la hauteur : la chanson d'entrée peut être traitée plus rapidement par pm, avec une voix de haute qualité mais un CPU médiocre, par dio, harvest est meilleur mais plus lent, rmvpe est le meilleur, mais consomme légèrement le CPU/GPU.",
"采样率:": "采样率:",
"采样长度": "Longueur de l'échantillon",
"重载设备列表": "Recharger la liste des dispositifs",
"音调设置": "Réglages de la hauteur",
"音频设备(请使用同种类驱动)": "Périphérique audio (veuillez utiliser le même type de pilote)",
"音高算法": "algorithme de détection de la hauteur",
"额外推理时长": "Temps d'inférence supplémentaire"
}
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Entraînement terminé, vous pouvez consulter les journaux d'entraînement de la console ou le fichier train.log dans le dossier d'expérience",
"请指定说话人id": "Veuillez spécifier l'ID du locuteur",
"请选择index文件": "Veuillez choisir le fichier d'index",
"请选择pth文件": "Veuillez choisir le fichier pth",
"请选择说话人id": "Veuillez choisir l'ID du locuteur",
"转换": "Conversion",
"输入实验名": "Nom de l'expérience d'entrée",
"输入待处理音频文件夹路径": "Entrez le chemin du dossier audio à traiter",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Entrez le chemin du dossier audio à traiter (copiez-le depuis la barre d'adresse du gestionnaire de fichiers)",
"输入待处理音频文件路径(默认是正确格式示例)": "Entrez le chemin du fichier audio à traiter (par défaut, c'est un exemple de format correct)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Entrez le taux de fusion pour remplacer l'enveloppe de volume source par l'enveloppe de volume de sortie, plus proche de 1, plus l'enveloppe de sortie est utilisée",
"输入监听": "Entrée d'écoute",
"输入训练文件夹路径": "Entrez le chemin du dossier d'entraînement",
"输入设备": "Entrée de l'appareil",
"输入降噪": "Entrée de réduction du bruit",
"输出信息": "Sortie d'information",
"输出变声": "Sortie de la transformation de la voix",
"输出设备": "Sortie de l'appareil",
"输出降噪": "Sortie de réduction du bruit",
"输出音频(右下角三个点,点了可以下载)": "Sortie audio (trois points en bas à droite, cliquez pour télécharger)",
"选择.index文件": "Choisissez le fichier .index",
"选择.pth文件": "Choisissez le fichier .pth",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "Choisissez l'algorithme d'extraction de hauteur tonale, vous pouvez utiliser pm pour accélérer l'entrée de la voix, harvest est bon pour les basses mais très lent, crepe a un bon effet mais utilise le GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Choisissez l'algorithme d'extraction de hauteur tonale, vous pouvez utiliser pm pour accélérer l'entrée de la voix, harvest est bon pour les basses mais très lent, crepe a un bon effet mais utilise le GPU, rmvpe a le meilleur effet et utilise légèrement le GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Choisissez l'algorithme d'extraction de hauteur tonale : utilisez pm pour accélérer l'entrée de la voix, une voix de haute qualité mais nécessite une meilleure CPU ; utilisez dio pour accélérer, harvest a une meilleure qualité mais est lent, rmvpe a le meilleur effet et utilise légèrement la CPU/GPU",
"采样率:": "Taux d'échantillonnage:",
"采样长度": "Longueur d'échantillonnage",
"重载设备列表": "Recharger la liste des appareils",
"音调设置": "Paramètres de tonalité",
"音频设备(请使用同种类驱动)": "Appareil audio (veuillez utiliser un pilote de même type)",
"音高算法": "Algorithme de hauteur tonale",
"额外推理时长": "Durée d'inférence supplémentaire"
}

View File

@ -1,135 +1,276 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Se >=3: applica il filtro mediano ai risultati del pitch raccolto. ",
"A模型权重": "Peso (w) per il modello A:",
"A模型路径": "Percorso per il modello A:",
"B模型路径": "Percorso per il modello B:",
"很遗憾您这没有能用的显卡来支持您训练": "Purtroppo non hai una scheda grafica utilizzabile per supportare il tuo addestramento",
"UVR5已开启": "UVR5 è attivato",
"UVR5已关闭": "UVR5 è disattivato",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Questo software è open source con licenza MIT. L'autore non ha alcun controllo sul software. L'utente che utilizza il software o diffonde i suoni derivati dal software ne è responsabile. <br>Se non accetti questi termini, non puoi utilizzare o citare alcun codice o file all'interno del pacchetto software. Vedi la cartella principale<b>LICENSE</b> per i dettagli.",
"0-前置数据集获取工具": "0-Strumento di acquisizione del dataset preliminare",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-Strumento di separazione voce e accompagnamento UVR5 & Rimozione riverbero e ritardo",
"是否开启UVR5-WebUI": "Attivare UVR5-WebUI",
"UVR5进程输出信息": "Informazioni sull'output del processo UVR5",
"0b-语音切分工具": "0b-Strumento di segmentazione vocale",
"音频自动切分输入路径,可文件可文件夹": "Percorso di input per la segmentazione automatica dell'audio, può essere un file o una cartella",
"切分后的子音频的输出根目录": "Directory radice di output per gli audio segmentati",
"threshold:音量小于这个值视作静音的备选切割点": "threshold: Punto di taglio alternativo considerato silenzioso se il volume è inferiore a questo valore",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length: Lunghezza minima di ogni segmento. Se il primo segmento è troppo corto, verrà unito agli segmenti successivi fino a superare questo valore",
"min_interval:最短切割间隔": "min_interval: Intervallo minimo di taglio",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size: Come calcolare la curva del volume. Più piccolo è, maggiore è la precisione ma aumenta la complessità computazionale (non significa che una maggiore precisione dà risultati migliori)",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept: Massima durata del silenzio dopo il taglio",
"开启语音切割": "Attivare la segmentazione vocale",
"终止语音切割": "Terminare la segmentazione vocale",
"max:归一化后最大值多少": "max: Massimo valore dopo la normalizzazione",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix: Quanta proporzione dell'audio normalizzato deve essere miscelata",
"切割使用的进程数": "Numero di processi utilizzati per il taglio",
"语音切割进程输出信息": "Informazioni sull'output del processo di segmentazione vocale",
"0c-中文批量离线ASR工具": "0c-Strumento di ASR offline batch in cinese",
"开启离线批量ASR": "Attivare ASR offline batch",
"终止ASR进程": "Terminare il processo ASR",
"批量ASR(中文only)输入文件夹路径": "Percorso della cartella di input per ASR offline batch (solo cinese)",
"ASR进程输出信息": "Informazioni sull'output del processo ASR",
"0d-语音文本校对标注工具": "0d-Strumento di correzione e annotazione testo vocale",
"是否开启打标WebUI": "Attivare l'interfaccia utente Web di annotazione",
"打标数据标注文件路径": "Percorso del file di annotazione dei dati contrassegnati",
"打标工具进程输出信息": "Informazioni sull'output del processo di annotazione",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*Nome dell'esperimento/modello",
"显卡信息": "Informazioni sulla scheda grafica",
"预训练的SoVITS-G模型路径": "Percorso del modello preaddestrato SoVITS-G",
"预训练的SoVITS-D模型路径": "Percorso del modello preaddestrato SoVITS-D",
"预训练的GPT模型路径": "Percorso del modello preaddestrato GPT",
"1A-训练集格式化工具": "1A-Strumento di formattazione del set di addestramento",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "Nella cartella logs/nome dell'esperimento dovrebbero esserci file e cartelle che iniziano con 23456",
"*文本标注文件": "*File di annotazione del testo",
"*训练集音频文件目录": "*Directory dei file audio del set di addestramento",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "Directory dei file audio del set di addestramento, concatenare il nome del file corrispondente nella lista",
"1Aa-文本内容": "1Aa-Contenuto del testo",
"GPU卡号以-分割,每个卡号一个进程": "Numero di GPU separati da '-'; ogni numero corrisponde a un processo",
"预训练的中文BERT模型路径": "Percorso del modello BERT cinese preaddestrato",
"开启文本获取": "Attivare l'estrazione del testo",
"终止文本获取进程": "Terminare il processo di estrazione del testo",
"文本进程输出信息": "Informazioni sull'output del processo di estrazione del testo",
"1Ab-SSL自监督特征提取": "1Ab-Estrazione di caratteristiche auto-supervisionata SSL",
"预训练的SSL模型路径": "Percorso del modello SSL preaddestrato",
"开启SSL提取": "Attivare l'estrazione SSL",
"终止SSL提取进程": "Terminare il processo di estrazione SSL",
"SSL进程输出信息": "Informazioni sull'output del processo SSL",
"1Ac-语义token提取": "1Ac-Estrazione del token semantico",
"开启语义token提取": "Attivare l'estrazione del token semantico",
"终止语义token提取进程": "Terminare il processo di estrazione del token semantico",
"语义token提取进程输出信息": "Informazioni sull'output del processo di estrazione del token semantico",
"1Aabc-训练集格式化一键三连": "1Aabc-Strumento di formattazione del set di addestramento con tre passaggi",
"开启一键三连": "Attivare la formattazione con tre passaggi",
"终止一键三连": "Terminare la formattazione con tre passaggi",
"一键三连进程输出信息": "Informazioni sull'output del processo di 'One Click Three Connect'",
"1B-微调训练": "1B-Allenamento di affinamento",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-Allenamento di SoVITS. I file del modello destinati alla condivisione sono salvati in SoVITS_weights.",
"每张显卡的batch_size": "Batch size per ogni scheda grafica",
"总训练轮数total_epoch不建议太高": "Numero totale di epoche di addestramento, non raccomandato troppo alto",
"文本模块学习率权重": "Peso del tasso di apprendimento del modulo di testo",
"保存频率save_every_epoch": "Frequenza di salvataggio ogni epoca",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Salvare solo il file ckpt più recente per risparmiare spazio su disco",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Salvare il modello finale più piccolo nella cartella weights ad ogni punto di salvataggio",
"开启SoVITS训练": "Attivare l'allenamento di SoVITS",
"终止SoVITS训练": "Terminare l'allenamento di SoVITS",
"SoVITS训练进程输出信息": "Informazioni sull'output del processo di allenamento di SoVITS",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-Allenamento di GPT. I file del modello destinati alla condivisione sono salvati in GPT_weights.",
"总训练轮数total_epoch": "Numero totale di epoche di addestramento",
"开启GPT训练": "Attivare l'allenamento di GPT",
"终止GPT训练": "Terminare l'allenamento di GPT",
"GPT训练进程输出信息": "Informazioni sull'output del processo di allenamento di GPT",
"1C-推理": "1C-Inferenza",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "Scegli il modello salvato in SoVITS_weights e GPT_weights dopo l'addestramento. Uno di default è il modello di base, utilizzato per l'esperienza di Zero Shot TTS in 5 secondi.",
"*GPT模型列表": "*Lista dei modelli GPT",
"*SoVITS模型列表": "*Lista dei modelli SoVITS",
"GPU卡号,只能填1个整数": "Numero della scheda grafica, può essere inserito solo un numero intero",
"刷新模型路径": "Aggiorna il percorso del modello",
"是否开启TTS推理WebUI": "Attivare l'interfaccia utente Web per l'inferenza TTS",
"TTS推理WebUI进程输出信息": "Informazioni sull'output del processo dell'interfaccia utente Web per l'inferenza TTS",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-Voce modificata",
"施工中,请静候佳音": "In costruzione, attendi pazientemente le buone notizie",
"TTS推理进程已开启": "Il processo di inferenza TTS è stato avviato",
"TTS推理进程已关闭": "Il processo di inferenza TTS è stato chiuso",
"打标工具WebUI已开启": "L'interfaccia utente Web dello strumento di annotazione è stata avviata",
"打标工具WebUI已关闭": "L'interfaccia utente Web dello strumento di annotazione è stata chiusa",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "Questo software è open source con licenza MIT. L'autore non ha alcun controllo sul software. L'utente che utilizza il software o diffonde i suoni derivati dal software ne è responsabile. Se non accetti questi termini, non puoi utilizzare o citare alcun codice o file all'interno del pacchetto software. Vedi la cartella principale LICENSE per i dettagli.",
"*请上传并填写参考信息": "*Carica e compila le informazioni di riferimento",
"*请填写需要合成的目标文本": "*Compila il testo di destinazione da sintetizzare",
"ASR任务开启%s": "Attività ASR avviata: %s",
"GPT训练完成": "Allenamento di GPT completato",
"GPT训练开始%s": "Inizio dell'allenamento di GPT: %s",
"SSL提取进程执行中": "Processo di estrazione SSL in corso",
"SSL提取进程结束": "Processo di estrazione SSL completato",
"SoVITS训练完成": "Allenamento di SoVITS completato",
"SoVITS训练开始%s": "Inizio dell'allenamento di SoVITS: %s",
"一键三连中途报错": "Errore durante 'One Click Three Connect'",
"一键三连进程结束": "Processo di 'One Click Three Connect' completato",
"中文": "Cinese",
"凑50字一切": "Riempire con 50 caratteri per tutto",
"凑五句一切": "Riempire con cinque frasi per tutto",
"切分后文本": "Testo dopo il taglio",
"切割执行中": "Taglio in corso",
"切割结束": "Taglio completato",
"参考音频的文本": "Testo dell'audio di riferimento",
"参考音频的语种": "Lingua dell'audio di riferimento",
"合成语音": "Sintesi vocale",
"后续将支持混合语种编码文本输入。": "In futuro sarà supportata l'input di testi con codifica mista di lingue.",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "È già in corso un'attività ASR. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "È già in corso un'attività di allenamento di GPT. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "È già in corso un'attività di estrazione SSL. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "È già in corso un'attività di allenamento di SoVITS. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "È già in corso un'attività di 'One Click Three Connect'. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "È già in corso un'attività di taglio. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "È già in corso un'attività di testo. Devi interromperla prima di avviare una nuova attività.",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "È già in corso un'attività di estrazione di token semantici. Devi interromperla prima di avviare una nuova attività.",
"已终止ASR进程": "Il processo ASR è stato terminato",
"已终止GPT训练": "L'allenamento di GPT è stato terminato",
"已终止SoVITS训练": "Allenamento SoVITS terminato",
"已终止所有1a进程": "Processi 1a terminati",
"已终止所有1b进程": "Processi 1b terminati",
"已终止所有一键三连进程": "Processi One Click Three Connect terminati",
"已终止所有切割进程": "Processi di taglio terminati",
"已终止所有语义token进程": "Processi di estrazione token semantici terminati",
"按中文句号。切": "Taglia secondo il punto cinese.",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "Strumento di divisione del testo. I testi troppo lunghi potrebbero non avere un buon effetto di sintesi, quindi è consigliabile dividerli prima della sintesi. La sintesi verrà separata in base ai ritorni a capo nel testo e successivamente ricomposta.",
"文本进程执行中": "Processo di testo in esecuzione",
"文本进程结束": "Processo di testo terminato",
"日文": "Giapponese",
"英文": "Inglese",
"语义token提取进程执行中": "Processo di estrazione token semantici in esecuzione",
"语义token提取进程结束": "Processo di estrazione token semantici terminato",
"请上传参考音频": "Carica l'audio di riferimento",
"输入路径不存在": "Il percorso di input non esiste",
"输入路径存在但既不是文件也不是文件夹": "Il percorso di input esiste ma non è né un file né una cartella",
"输出的语音": "Audio di output",
"进度1a-done": "Progresso: 1a-done",
"进度1a-done, 1b-ing": "Progresso: 1a-done, 1b-ing",
"进度1a-ing": "Progresso: 1a-ing",
"进度1a1b-done": "Progresso: 1a1b-done",
"进度1a1b-done, 1cing": "Progresso: 1a1b-done, 1cing",
"进度all-done": "Progresso: all-done",
"需要合成的切分前文本": "Testo da sintetizzare prima del taglio",
"需要合成的文本": "Testo da sintetizzare",
"需要合成的语种": "Lingua da sintetizzare",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "Se >=3, usa il filtraggio mediano sui risultati del riconoscimento dell'altezza di harvest, il valore è il raggio del filtro. L'uso di questo valore può attenuare i suoni muti.",
"A模型权重": "Peso del modello A",
"A模型路径": "Percorso del modello A",
"B模型路径": "Percorso del modello B",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "File curva F0 (opzionale). ",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "File della curva F0, opzionale, una riga per un'altezza, sostituisce il F0 predefinito e le variazioni di tono",
"Index Rate": "Tasso di indice",
"Onnx导出": "Esporta Onnx",
"Onnx输出路径": "Percorso di esportazione Onnx:",
"RVC模型路径": "Percorso modello RVC:",
"ckpt处理": "Elaborazione ckpt",
"harvest进程数": "harvest进程数",
"index文件路径不可包含中文": "index文件路径不可包含中文",
"pth文件路径不可包含中文": "pth è un'app per il futuro",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Passaggio 1: compilare la configurazione sperimentale. ",
"step1:正在处理数据": "Passaggio 1: elaborazione dei dati",
"step2:正在提取音高&正在提取特征": "step2:正在提取音高&正在提取特征",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Passaggio 2a: attraversa automaticamente tutti i file nella cartella di addestramento che possono essere decodificati in audio ed esegui la normalizzazione delle sezioni. ",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Passaggio 2b: utilizzare la CPU per estrarre il tono (se il modello ha il tono), utilizzare la GPU per estrarre le caratteristiche (selezionare l'indice GPU):",
"step3: 填写训练设置, 开始训练模型和索引": "Passaggio 3: compilare le impostazioni di addestramento e avviare l'addestramento del modello e dell'indice",
"step3a:正在训练模型": "Passaggio 3a: è iniziato l'addestramento del modello",
"一键训练": "Addestramento con un clic",
"也可批量输入音频文件, 二选一, 优先读文件夹": "也可批量输入音频文件, 二选一, 优先读文件夹",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "Elaborazione batch per la separazione dell'accompagnamento vocale utilizzando il modello UVR5.<br>Esempio di un formato di percorso di cartella valido: D:\\path\\to\\input\\folder (copialo dalla barra degli indirizzi del file manager).<br>Il modello è suddiviso in tre categorie:<br>1. Conserva la voce: scegli questa opzione per l'audio senza armonie. <br>2. Mantieni solo la voce principale: scegli questa opzione per l'audio con armonie. <br>3. Modelli di de-riverbero e de-delay (di FoxJoy):<br>(1) MDX-Net: la scelta migliore per la rimozione del riverbero stereo ma non può rimuovere il riverbero mono;<br><br>Note di de-riverbero/de-delay:<br>1. Il tempo di elaborazione per il modello DeEcho-DeReverb è circa il doppio rispetto agli altri due modelli DeEcho.<br>2. Il modello MDX-Net-Dereverb è piuttosto lento.<br>3. La configurazione più pulita consigliata consiste nell'applicare prima MDX-Net e poi DeEcho-Aggressive.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Inserisci gli indici GPU separati da '-', ad esempio 0-1-2 per utilizzare GPU 0, 1 e 2:",
"伴奏人声分离&去混响&去回声": "Separazione voce/accompagnamento",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "Salva nome:",
"保存的文件名, 默认空为和源文件同名": "Salva il nome del file (predefinito: uguale al file di origine):",
"保存的模型名不带后缀": "Nome del modello salvato (senza estensione):",
"保存频率save_every_epoch": "Frequenza di salvataggio (save_every_epoch):",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Proteggi le consonanti senza voce e i suoni del respiro per evitare artefatti come il tearing nella musica elettronica. ",
"修改": "Modificare",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modifica le informazioni sul modello (supportato solo per i file di modello di piccole dimensioni estratti dalla cartella 'weights')",
"停止音频转换": "Arresta la conversione audio",
"全流程结束!": "Tutti i processi sono stati completati!",
"刷新音色列表和索引路径": "Aggiorna l'elenco delle voci e il percorso dell'indice",
"加载模型": "Carica modello",
"加载预训练底模D路径": "Carica il percorso D del modello base pre-addestrato:",
"加载预训练底模G路径": "Carica il percorso G del modello base pre-addestrato:",
"单次推理": "单次推理",
"卸载音色省显存": "Scarica la voce per risparmiare memoria della GPU:",
"变调(整数, 半音数量, 升八度12降八度-12)": "Trasposizione (numero intero, numero di semitoni, alza di un'ottava: 12, abbassa di un'ottava: -12):",
"后处理重采样至最终采样率0为不进行重采样": "Ricampiona l'audio di output in post-elaborazione alla frequenza di campionamento finale. ",
"否": "NO",
"启用相位声码器": "启用相位声码器",
"Onnx导出": "Esporta in Onnx",
"Onnx输出路径": "Percorso di output Onnx",
"RVC模型路径": "Percorso del modello RVC",
"ckpt处理": "Elaborazione del ckpt",
"harvest进程数": "Numero di processi harvest",
"index文件路径不可包含中文": "Il percorso del file di indice non può contenere caratteri cinesi",
"pth文件路径不可包含中文": "Il percorso del file pth non può contenere caratteri cinesi",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "Configurazione dei numeri delle schede rmvpe: separa con - i numeri delle schede dei diversi processi utilizzati in input. Ad esempio, 0-0-1 utilizza 2 processi sulla scheda 0 e 1 processo sulla scheda 1",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "Passo 1: Compila la configurazione sperimentale. I dati sperimentali sono salvati in logs, ogni esperimento in una cartella. È necessario inserire manualmente il percorso del nome dell'esperimento, contenente configurazione sperimentale, log e file di modello addestrato.",
"step1:正在处理数据": "Passo 1: Elaborazione dei dati in corso",
"step2:正在提取音高&正在提取特征": "Passo 2: Estrazione dell'altezza e delle caratteristiche in corso",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "Passo 2a: Attraversa automaticamente tutti i file nella cartella di addestramento che possono essere decodificati in audio e li normalizza a fette. Nella cartella sperimentale vengono generate due cartelle wav; Al momento supporta solo l'addestramento singolo.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "Passo 2b: Usa la CPU per estrarre l'altezza (se il modello la include) e la GPU per estrarre le caratteristiche (scegliendo il numero della scheda)",
"step3: 填写训练设置, 开始训练模型和索引": "Passo 3: Compila le impostazioni di addestramento, inizia ad addestrare il modello e l'indice",
"step3a:正在训练模型": "Passo 3a: Addestramento del modello in corso",
"一键训练": "Allenamento One-Click",
"也可批量输入音频文件, 二选一, 优先读文件夹": "È possibile anche inserire file audio in batch, una delle due opzioni, con priorità alla lettura della cartella",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "Numeri delle schede separati da - utilizzati in input, ad esempio 0-1-2, utilizzando le schede 0, 1 e 2",
"伴奏人声分离&去混响&去回声": "Separazione tra accompagnamento e voce & Rimozione dell'eco & Rimozione dell'eco",
"使用模型采样率": "Frequenza di campionamento del modello",
"使用设备采样率": "Frequenza di campionamento del dispositivo",
"保存名": "Nome del salvataggio",
"保存的文件名, 默认空为和源文件同名": "Nome del file salvato, vuoto di default è lo stesso del file sorgente",
"保存的模型名不带后缀": "Nome del modello salvato senza estensione",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "Protegge le consonanti chiare e i suoni di respirazione, evita artifact come la rottura del suono elettronico, tirare a 0.5 per disattivare, abbassare per aumentare la protezione ma potrebbe ridurre l'effetto di indicizzazione",
"修改": "Modifica",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "Modifica le informazioni del modello (supporta solo i piccoli file di modello estratti dalla cartella weights)",
"停止音频转换": "Interrompi la conversione audio",
"全流程结束!": "Processo completo!",
"刷新音色列表和索引路径": "Aggiorna la lista dei toni e il percorso dell'indice",
"加载模型": "Carica il modello",
"加载预训练底模D路径": "Carica il percorso del modello di fondo preaddestrato D",
"加载预训练底模G路径": "Carica il percorso del modello di fondo preaddestrato G",
"单次推理": "Inferenza singola",
"卸载音色省显存": "Scarica il tono per risparmiare memoria video",
"变调(整数, 半音数量, 升八度12降八度-12)": "Modifica del tono (numero intero, quantità di semitoni, 12 per un'ottava in su, -12 per un'ottava in giù)",
"后处理重采样至最终采样率0为不进行重采样": "Ricampiona in modo post-elaborazione alla frequenza di campionamento finale, 0 per non eseguire il ricampionamento",
"否": "No",
"启用相位声码器": "Abilita il codificatore di fase",
"响应阈值": "Soglia di risposta",
"响度因子": "fattore di sonorità",
"处理数据": "Processa dati",
"导出Onnx模型": "Esporta modello Onnx",
"导出文件格式": "Formato file di esportazione",
"常见问题解答": "FAQ (Domande frequenti)",
"响度因子": "Fattore di risposta",
"处理数据": "Elaborazione dati",
"导出Onnx模型": "Esporta il modello Onnx",
"导出文件格式": "Formato di esportazione del file",
"常见问题解答": "Domande frequenti",
"常规设置": "Impostazioni generali",
"开始音频转换": "Avvia la conversione audio",
"很遗憾您这没有能用的显卡来支持您训练": "Sfortunatamente, non è disponibile alcuna GPU compatibile per supportare l'addestramento.",
"性能设置": "Impostazioni delle prestazioni",
"总训练轮数total_epoch": "Epoch totali di addestramento (total_epoch):",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversione massiva. Inserisci il percorso della cartella che contiene i file da convertire o carica più file audio. I file convertiti finiranno nella cartella specificata. (default: opt) ",
"指定输出主人声文件夹": "Specifica la cartella di output per le voci:",
"指定输出文件夹": "Specifica la cartella di output:",
"指定输出非主人声文件夹": "Specificare la cartella di output per l'accompagnamento:",
"开始音频转换": "Inizia la conversione audio",
"性能设置": "Impostazioni di performance",
"批量推理": "Inferenza batch",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "Conversione in batch, inserisci la cartella con i file audio da convertire o carica più file audio, i file convertiti verranno salvati nella cartella specificata (per impostazione predefinita opt).",
"指定输出主人声文件夹": "Specifica la cartella di output per la voce principale",
"指定输出文件夹": "Specifica la cartella di output",
"指定输出非主人声文件夹": "Specifica la cartella di output per la non voce principale",
"推理时间(ms):": "Tempo di inferenza (ms):",
"推理音色": "Voce di inferenza:",
"推理音色": "Tono di inferenza",
"提取": "Estrai",
"提取音高和处理数据使用的CPU进程数": "Numero di processi CPU utilizzati per l'estrazione del tono e l'elaborazione dei dati:",
"是": "SÌ",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Salva solo l'ultimo file '.ckpt' per risparmiare spazio su disco:",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Salva un piccolo modello finale nella cartella \"weights\" in ogni punto di salvataggio:",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Memorizza nella cache tutti i set di addestramento nella memoria della GPU. ",
"显卡信息": "Informazioni GPU",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Questo software è open source con licenza MIT. <br>Se non si accetta questa clausola, non è possibile utilizzare o fare riferimento a codici e file all'interno del pacchetto software. <b>Contratto-LICENZA.txt</b> per dettagli.",
"查看": "Visualizzazione",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Visualizza le informazioni sul modello (supportato solo per file di modello piccoli estratti dalla cartella 'weights')",
"检索特征占比": "Rapporto funzionalità di ricerca (controlla la forza dell'accento, troppo alto ha artefatti):",
"提取音高和处理数据使用的CPU进程数": "Numero di processi CPU utilizzati per l'estrazione dell'altezza del suono e l'elaborazione dei dati",
"是": "Sì",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "Se memorizzare nella cache tutto l'insieme di addestramento nella memoria video. Piccoli set di dati inferiori a 10 minuti possono essere memorizzati nella cache per accelerare l'addestramento, la memorizzazione nella cache di grandi set di dati può esaurire la memoria video e non accelerare di molto",
"查看": "Visualizza",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "Visualizza le informazioni del modello (supporta solo i piccoli file di modello estratti dalla cartella weights)",
"检索特征占比": "Percentuale di caratteristiche di ricerca",
"模型": "Modello",
"模型推理": "Inferenza del modello",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Estrazione del modello (inserire il percorso del modello di file di grandi dimensioni nella cartella \"logs\"). ",
"模型是否带音高指导": "Se il modello ha una guida del tono:",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Se il modello ha una guida del tono (necessario per il canto, facoltativo per il parlato):",
"模型是否带音高指导,1是0否": "Se il modello ha una guida del tono (1: sì, 0: no):",
"模型版本型号": "Versione dell'architettura del modello:",
"模型融合, 可用于测试音色融合": "Model fusion, può essere utilizzato per testare la fusione timbrica",
"模型路径": "Percorso al modello:",
"每张显卡的batch_size": "Dimensione batch per GPU:",
"淡入淡出长度": "Lunghezza dissolvenza",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "Estrazione del modello (inserisci il percorso del modello di grandi dimensioni nella cartella logs), adatto per i modelli a metà addestramento che non si desidera continuare ad addestrare, i modelli non estratti automaticamente vengono salvati come modelli di piccole dimensioni o per testare la situazione del modello intermedio",
"模型是否带音高指导": "Il modello include o meno la guida all'altezza del suono",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "Il modello include o meno la guida all'altezza del suono (necessario per il canto, opzionale per la voce)",
"模型是否带音高指导,1是0否": "Il modello include o meno la guida all'altezza del suono, 1 sì, 0 no",
"模型版本型号": "Versione e modello del modello",
"模型融合, 可用于测试音色融合": "Fusione dei modelli, utile per testare la fusione dei toni",
"模型路径": "Percorso del modello",
"淡入淡出长度": "Lunghezza del fading in/fading out",
"版本": "Versione",
"特征提取": "Estrazione delle caratteristiche",
"特征检索库文件路径,为空则使用下拉的选择结果": "Percorso del file di indice delle caratteristiche. ",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Tonalità +12 consigliata per la conversione da maschio a femmina e tonalità -12 per la conversione da femmina a maschio. ",
"目标采样率": "Frequenza di campionamento target:",
"算法延迟(ms):": "算法延迟(ms):",
"自动检测index路径,下拉式选择(dropdown)": "Rileva automaticamente il percorso dell'indice e seleziona dal menu a tendina:",
"特征检索库文件路径,为空则使用下拉的选择结果": "Percorso del file della libreria di ricerca delle caratteristiche, se vuoto usa la selezione a discesa",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "Consigliato +12 toni per la trasformazione da uomo a donna, -12 toni per la trasformazione da donna a uomo. Se l'intervallo tonale esplode causando distorsioni nel timbro, è possibile regolarlo manualmente nell'intervallo adatto.",
"目标采样率": "Frequenza di campionamento obiettivo",
"算法延迟(ms):": "Ritardo dell'algoritmo (ms):",
"自动检测index路径,下拉式选择(dropdown)": "Rilevamento automatico del percorso dell'indice, selezione a discesa (dropdown)",
"融合": "Fusione",
"要改的模型信息": "Informazioni sul modello da modificare:",
"要置入的模型信息": "Informazioni sul modello da posizionare:",
"要改的模型信息": "Informazioni del modello da modificare",
"要置入的模型信息": "Informazioni del modello da inserire",
"训练": "Addestramento",
"训练模型": "Addestra modello",
"训练特征索引": "Addestra indice delle caratteristiche",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Addestramento completato. ",
"请指定说话人id": "Si prega di specificare l'ID del locutore/cantante:",
"请选择index文件": "请选择index文件",
"请选择pth文件": "请选择pth 文件",
"请选择说话人id": "Seleziona ID locutore/cantante:",
"转换": "Convertire",
"输入实验名": "Inserisci il nome dell'esperimento:",
"输入待处理音频文件夹路径": "Immettere il percorso della cartella audio da elaborare:",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Immettere il percorso della cartella audio da elaborare (copiarlo dalla barra degli indirizzi del file manager):",
"输入待处理音频文件路径(默认是正确格式示例)": "Immettere il percorso del file audio da elaborare (l'impostazione predefinita è l'esempio di formato corretto):",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Regola il ridimensionamento dell'inviluppo del volume. ",
"输入监听": "输入监听",
"输入训练文件夹路径": "Inserisci il percorso della cartella di addestramento:",
"训练模型": "Addestra il modello",
"训练特征索引": "Addestramento dell'indice delle caratteristiche",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "Fine dell'addestramento, puoi visualizzare il registro di addestramento sulla console o il file train.log nella cartella dell'esperimento",
"请指定说话人id": "Si prega di specificare l'ID del parlante",
"请选择index文件": "Seleziona il file di indice",
"请选择pth文件": "Seleziona il file pth",
"请选择说话人id": "Seleziona l'ID del parlante",
"转换": "Converti",
"输入实验名": "Inserisci il nome dell'esperimento",
"输入待处理音频文件夹路径": "Inserisci il percorso della cartella dei file audio da elaborare",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "Inserisci il percorso della cartella dei file audio da elaborare (copialo dalla barra degli indirizzi del gestore dei file)",
"输入待处理音频文件路径(默认是正确格式示例)": "Inserisci il percorso del file audio da elaborare (esempio di formato corretto predefinito)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "Inserisci la proporzione di fusione della sostituzione dell'involucro del volume di ingresso con l'involucro del volume di uscita, più vicino a 1 più utilizza l'involucro di uscita",
"输入监听": "Inserisci l'ascolto",
"输入训练文件夹路径": "Inserisci il percorso della cartella di addestramento",
"输入设备": "Dispositivo di input",
"输入降噪": "Riduzione del rumore in ingresso",
"输出信息": "Informazioni sull'uscita",
"输出变声": "输出变声",
"输出设备": "Dispositivo di uscita",
"输出降噪": "Riduzione del rumore in uscita",
"输出音频(右下角三个点,点了可以下载)": "Esporta audio (clicca sui tre puntini in basso a destra per scaricarlo)",
"输入降噪": "Inserisci la riduzione del rumore",
"输出信息": "Informazioni di output",
"输出变声": "Variazione della voce in output",
"输出设备": "Dispositivo di output",
"输出降噪": "Riduzione del rumore in output",
"输出音频(右下角三个点,点了可以下载)": "Audio in output (tre punti nell'angolo in basso a destra, fare clic per scaricare)",
"选择.index文件": "Seleziona il file .index",
"选择.pth文件": "Seleziona il file .pth",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Seleziona l'algoritmo di estrazione del tono (\"pm\": estrazione più veloce ma risultato di qualità inferiore; \"harvest\": bassi migliori ma estremamente lenti; \"crepe\": qualità migliore ma utilizzo intensivo della GPU):",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU",
"采样率:": "采样率:",
"采样长度": "Lunghezza del campione",
"重载设备列表": "Ricaricare l'elenco dei dispositivi",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "Seleziona l'algoritmo di estrazione dell'altezza del suono, l'input vocale può utilizzare pm per velocizzare, harvest ha bassi migliori ma è incredibilmente lento, crepe ha un buon effetto ma consuma molte risorse della GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "Seleziona l'algoritmo di estrazione dell'altezza del suono, l'input vocale può utilizzare pm per velocizzare, harvest ha bassi migliori ma è incredibilmente lento, crepe ha un buon effetto ma consuma molte risorse della GPU, rmvpe ha il miglior effetto ed è leggermente esigente sulla GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "Seleziona l'algoritmo di estrazione dell'altezza del suono: l'input vocale può utilizzare pm per velocizzare, la qualità del suono è elevata ma richiede molte risorse della CPU; l'input vocale può utilizzare dio per velocizzare, harvest ha una qualità del suono migliore ma è lento, rmvpe ha il miglior effetto ed è leggermente esigente sulla CPU/GPU",
"采样率:": "Frequenza di campionamento:",
"采样长度": "Lunghezza del campionamento",
"重载设备列表": "Ricarica la lista dei dispositivi",
"音调设置": "Impostazioni del tono",
"音频设备(请使用同种类驱动)": "Dispositivo audio (utilizzare lo stesso tipo di driver)",
"音高算法": "音高算法",
"音频设备(请使用同种类驱动)": "Dispositivo audio (usa driver della stessa categoria)",
"音高算法": "Algoritmo dell'altezza del suono",
"额外推理时长": "Tempo di inferenza extra"
}
}

View File

@ -1,135 +1,283 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": ">=3 次に、harvestピッチの認識結果に対してメディアンフィルタを使用します。値はフィルター半径で、ミュートを減衰させるために使用します。",
"A模型权重": "Aモデルの重み",
"A模型路径": "Aモデルのパス",
"B模型路径": "Bモデルのパス",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0(最低共振周波数)カーブファイル(オプション、1行に1ピッチ、デフォルトのF0(最低共振周波数)とエレベーションを置き換えます。)",
"Index Rate": "Index Rate",
"很遗憾您这没有能用的显卡来支持您训练": "残念ながら、トレーニングをサポートする利用可能なグラフィックカードがありません",
"UVR5已开启": "UVR5がオンになっています",
"UVR5已关闭": "UVR5がオフになっています",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "このソフトウェアはMITライセンスでオープンソース化されており、作者はソフトウェアに対して一切の制御権を持っていません。ソフトウェアを使用する者、ソフトウェアから導出される音声を広める者は、自己責任で行ってください。<br>この条件を認めない場合、ソフトウェアパッケージ内の任意のコードやファイルを使用または引用することはできません。詳細はルートディレクトリの<b>LICENSE</b>を参照してください。",
"0-前置数据集获取工具": "0-データセット取得ツールの事前処理",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5ボーカルアカンパニメント分離リバーブおよびディレイ除去ツール",
"是否开启UVR5-WebUI": "UVR5-WebUIをオンにしますか",
"UVR5进程输出信息": "UVR5プロセスの出力情報",
"0b-语音切分工具": "0b-音声分割ツール",
".list标注文件的路径": ".listアテーションファイルのパス",
"GPT模型列表": "GPTモデルリスト",
"SoVITS模型列表": "SoVITSモデルリスト",
"填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。": "音声を切り取った後の音声が保存されているディレクトリ!読み取られる音声ファイルの完全なパス=このディレクトリ-連結-リストファイル内の波形に対応するファイル名(フルパスではない)。",
"音频自动切分输入路径,可文件可文件夹": "オーディオの自動分割入力パス、ファイルまたはフォルダを指定できます",
"切分后的子音频的输出根目录": "分割後のサブオーディオの出力ルートディレクトリ",
"怎么切": "どうやって切るか",
"不切": "切らない",
"凑四句一切": "4つの文で埋める",
"按英文句号.切": "英文のピリオドで切ってください",
"threshold:音量小于这个值视作静音的备选切割点": "閾値:この値未満の音量は静音と見なされ、代替のカットポイントとして扱われます",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length各セグメントの最小長さ。最初のセグメントが短すぎる場合、連続して後続のセグメントに接続され、この値を超えるまで続きます。",
"min_interval:最短切割间隔": "min_interval最短カット間隔",
"hop_size:怎么算音量曲线,越小精度越大計算量越高(不是精度越大效果越好)": "hop_size音量曲線を計算する方法。値が小さいほど精度が高くなり、計算量が増加します精度が高いほど効果が良いわけではありません。",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept切り終えた後、最大でどれだけ静かにするか",
"开启语音切割": "音声の分割を開始",
"终止语音切割": "音声の分割を停止",
"max:归一化后最大值多少": "max正規化後の最大値",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix正規化後のオーディオが入る割合",
"切割使用的进程数": "分割に使用されるプロセス数",
"语音切割进程输出信息": "音声分割プロセスの出力情報",
"0c-中文批量离线ASR工具": "0c-中国語バッチオフラインASRツール",
"开启离线批量ASR": "オフラインバッチASRを開始",
"终止ASR进程": "ASRプロセスを停止",
"批量ASR(中文only)输入文件夹路径": "バッチASR中国語のみの入力フォルダパス",
"ASR进程输出信息": "ASRプロセスの出力情報",
"0d-语音文本校对标注工具": "0d-音声テキストの校正アノテーションツール",
"是否开启打标WebUI": "WebUIを使用したアテーションを開始しますか",
"打标数据标注文件路径": "アノテーションデータのファイルパス",
"打标工具进程输出信息": "アノテーションツールプロセスの出力情報",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*実験/モデル名",
"显卡信息": "グラフィックカード情報",
"预训练的SoVITS-G模型路径": "事前にトレーニングされたSoVITS-Gモデルのパス",
"预训练的SoVITS-D模型路径": "事前にトレーニングされたSoVITS-Dモデルのパス",
"预训练的GPT模型路径": "事前にトレーニングされたGPTモデルのパス",
"1A-训练集格式化工具": "1A-トレーニングデータのフォーマットツール",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "logs/実験名ディレクトリには23456で始まるファイルとフォルダが含まれている必要があります",
"*文本标注文件": "*テキスト注釈ファイル",
"*训练集音频文件目录": "*トレーニングデータのオーディオファイルディレクトリ",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "トレーニングデータのオーディオファイルディレクトリ。リストファイル内の波形に対応するファイル名を連結します。",
"1Aa-文本内容": "1Aa-テキストの内容",
"GPU卡号以-分割,每个卡号一个进程": "GPUカード番号はハイフンで区切り、各カード番号ごとに1つのプロセスが実行されます",
"预训练的中文BERT模型路径": "事前にトレーニングされた中文BERTモデルのパス",
"开启文本获取": "テキストの取得を開始",
"终止文本获取进程": "テキスト取得プロセスを停止",
"文本进程输出信息": "テキストプロセスの出力情報",
"1Ab-SSL自监督特征提取": "1Ab-SSLセルフスーパーバイズ特徴抽出",
"预训练的SSL模型路径": "事前にトレーニングされたSSLモデルのパス",
"开启SSL提取": "SSL抽出を開始",
"终止SSL提取进程": "SSL抽出プロセスを停止",
"SSL进程输出信息": "SSLプロセスの出力情報",
"1Ac-语义token提取": "1Ac-セマンティックトークン抽出",
"开启语义token提取": "セマンティックトークン抽出を開始",
"终止语义token提取进程": "セマンティックトークン抽出プロセスを停止",
"语义token提取进程输出信息": "セマンティックトークン抽出プロセスの出力情報",
"1Aabc-训练集格式化一键三连": "1Aabc-トレーニングデータのフォーマットワンクリック三連",
"开启一键三连": "ワンクリック三連を開始",
"终止一键三连": "ワンクリック三連を停止",
"一键三连进程输出信息": "ワンクリック三連プロセスの出力情報",
"1B-微调训练": "1B-ファインチューニングトレーニング",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-SoVITSトレーニング。共有用のモデルファイルはSoVITS_weightsディレクトリに出力されます。",
"每张显卡的batch_size": "各グラフィックカードのバッチサイズ",
"总训练轮数total_epoch不建议太高": "総トレーニングエポック数total_epoch、高すぎないようにお勧めします",
"文本模块学习率权重": "テキストモジュールの学習率の重み",
"保存频率save_every_epoch": "保存頻度save_every_epoch",
"是否仅保存最新的ckpt文件以节省硬盘空间": "最新のckptファイルのみを保存してディスクスペースを節約するかどうか",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "各保存時間点で最終的な小さなモデルをweightsフォルダに保存するかどうか",
"开启SoVITS训练": "SoVITSトレーニングを開始",
"终止SoVITS训练": "SoVITSトレーニングを停止",
"SoVITS训练进程输出信息": "SoVITSトレーニングプロセスの出力情報",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-GPTトレーニング。共有用のモデルファイルはGPT_weightsディレクトリに出力されます。",
"总训练轮数total_epoch": "総トレーニングエポック数total_epoch",
"开启GPT训练": "GPTトレーニングを開始",
"终止GPT训练": "GPTトレーニングを停止",
"GPT训练进程输出信息": "GPTトレーニングプロセスの出力情報",
"1C-推理": "1C-推論",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "SoVITS_weightsおよびGPT_weightsに保存されたモデルを選択します。デフォルトのものはプレトレインであり、ゼロショットTTSを体験できます。",
"*GPT模型列表": "*GPTモデルリスト",
"*SoVITS模型列表": "*SoVITSモデルリスト",
"GPU卡号,只能填1个整数": "GPU番号、1つの整数しか入力できません",
"刷新模型路径": "モデルのパスを更新",
"是否开启TTS推理WebUI": "TTS推論WebUIを開く",
"TTS推理WebUI进程输出信息": "TTS推論WebUIプロセスの出力情報",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-ボイスチェンジャー",
"施工中,请静候佳音": "施工中、お待ちください",
"TTS推理进程已开启": "TTS推論プロセスが開始されました",
"TTS推理进程已关闭": "TTS推論プロセスが終了しました",
"打标工具WebUI已开启": "校正ツールWebUIが開始されました",
"打标工具WebUI已关闭": "校正ツールWebUIが終了しました",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "このソフトウェアはMITライセンスでオープンソース化されており、作者はソフトウェアに対して一切の制御権を持っていません。ソフトウェアを使用する者、ソフトウェアからエクスポートされた音声を伝播する者は、自己の責任を負います。この条件を受け入れない場合は、ソフトウェアパッケージ内の任意のコードやファイルを使用または引用することはできません。詳細はLICENSEを参照してください。",
"*请上传并填写参考信息": "*参照情報をアップロードして記入してください",
"*请填写需要合成的目标文本": "*合成が必要な対象のテキストを記入してください",
"ASR任务开启%s": "ASRタスクが開始されました%s",
"GPT训练完成": "GPTトレーニングが完了しました",
"GPT训练开始%s": "GPTトレーニングが開始されました%s",
"SSL提取进程执行中": "SSL抽出プロセス実行中",
"SSL提取进程结束": "SSL抽出プロセスが終了しました",
"SoVITS训练完成": "SoVITSトレーニングが完了しました",
"SoVITS训练开始%s": "SoVITSトレーニングが開始されました%s",
"一键三连中途报错": "ワンクリックフォーマット中にエラーが発生しました",
"一键三连进程结束": "ワンクリックフォーマットが終了しました",
"中文": "中国語",
"凑50字一切": "50文字ずつカット",
"凑五句一切": "5つの文ごとにカット",
"切分后文本": "分割後のテキスト",
"切割执行中": "オーディオの分割中",
"切割结束": "オーディオの分割が完了しました",
"参考音频的文本": "参照オーディオのテキスト",
"参考音频的语种": "参照オーディオの言語",
"合成语音": "推論を開始",
"后续将支持混合语种编码文本输入。": "後で混合言語コードテキストの入力がサポートされるようになります。",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "すでに進行中のASRタスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "すでに進行中のGPTトレーニングタスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "すでに進行中のSSL抽出タスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "すでに進行中のSoVITSトレーニングタスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "すでに進行中のワンクリックフォーマットタスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "すでに進行中のオーディオの分割タスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "すでに進行中のTTS校正タスクがあります。次のタスクを開始する前に停止してください",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "すでに進行中の意味トークン抽出タスクがあります。次のタスクを開始する前に停止してください",
"已终止ASR进程": "ASRタスクが終了しました",
"已终止GPT训练": "GPTトレーニングが終了しました",
"已终止SoVITS训练": "SoVITSトレーニングが終了しました",
"已终止所有1a进程": "すべての1aタスクが終了しました",
"已终止所有1b进程": "すべての1bタスクが終了しました",
"已终止所有一键三连进程": "すべてのワンクリックフォーマットタスクが終了しました",
"已终止所有切割进程": "すべてのオーディオの分割タスクが終了しました",
"已终止所有语义token进程": "すべての意味トークンタスクが終了しました",
"按中文句号。切": "中国語の句点でカット",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "テキストスライサーツール。長文を変換すると効果が不安定になる可能性があるため、長文の場合は事前に切り分けることをお勧めします。推論時には、テキストを個別に推論し、それを組み合わせて再構築します。",
"文本进程执行中": "テキスト処理中",
"文本进程结束": "テキスト処理が終了しました",
"日文": "日本語",
"英文": "英語",
"语义token提取进程执行中": "意味トークン抽出実行中",
"语义token提取进程结束": "意味トークン抽出が終了しました",
"请上传参考音频": "参照オーディオをアップロードしてください",
"输入路径不存在": "入力パスが存在しません",
"输入路径存在但既不是文件也不是文件夹": "入力ディレクトリが存在しますが、ファイルでもフォルダでもありません",
"输出的语音": "推論結果",
"进度1a-done": "進捗1a完了",
"进度1a-done, 1b-ing": "進捗1a完了、1b進行中",
"进度1a-ing": "進捗1a進行中",
"进度1a1b-done": "進捗1a1b完了",
"进度1a1b-done, 1cing": "進捗1a1b完了、1c進行中",
"进度all-done": "進捗all-done",
"需要合成的切分前文本": "推論が必要な分割前のテキスト",
"需要合成的文本": "推論テキスト",
"需要合成的语种": "推論テキストの言語",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": "3以上の場合収穫音高の認識結果に中央値フィルタリングを適用します。値はフィルターの半径を表し、息遣いを減少させることができます。",
"A模型权重": "モデルAの重み (w):",
"A模型路径": "モデルAのパス:",
"B模型路径": "モデルBのパス:",
"E:\\语音音频+标注\\米津玄师\\src": "C:\\Users\\Desktop\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0曲線ファイルオプション。1行に1つの音高があります。デフォルトのF0とピッチ変調の代わりに使用します:",
"Index Rate": "インデックスレート",
"Onnx导出": "Onnxエクスポート",
"Onnx输出路径": "Onnx出力パス",
"RVC模型路径": "RVCモデルパス",
"ckpt处理": "ckptファイルの処理",
"harvest进程数": "harvestプロセス数",
"index文件路径不可包含中文": "indexファイルのパスに漢字を含んではいけません",
"pth文件路径不可包含中文": "pthファイルのパスに漢字を含んではいけません",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpeカード番号設定異なるプロセスに使用するカード番号を入力する。例えば、0-0-1でカード0に2つのプロセス、カード1に1つのプロセスを実行する。",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "ステップ1:実験設定を入力します。実験データはlogsに保存され、各実験にはフォルダーがあります。実験名のパスを手動で入力する必要があり、実験設定、ログ、トレーニングされたモデルファイルが含まれます。",
"step1:正在处理数据": "step1:処理中のデータ",
"step2:正在提取音高&正在提取特征": "step2:ピッチ抽出と特徴抽出",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "ステップ2a: 訓練フォルダー内のすべての音声ファイルを自動的に探索し、スライスと正規化を行い、2つのwavフォルダーを実験ディレクトリに生成します。現在は一人でのトレーニングのみをサポートしています。",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "ステップ2b: CPUを使用して音高を抽出する(モデルに音高がある場合)、GPUを使用して特徴を抽出する(GPUの番号を選択する)",
"step3: 填写训练设置, 开始训练模型和索引": "ステップ3: トレーニング設定を入力して、モデルとインデックスのトレーニングを開始します",
"step3a:正在训练模型": "step3a:トレーニング中のモデル",
"Onnx输出路径": "Onnxエクスポートパス:",
"RVC模型路径": "RVCモデルパス:",
"ckpt处理": "ckpt処理",
"harvest进程数": "harvestピッチアルゴリズムに使用するCPUプロセス数",
"index文件路径不可包含中文": "インデックスファイルパスには中文を含めないでください",
"pth文件路径不可包含中文": "pthファイルパスには中文を含めないでください",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "異なるプロセスカードの入力に使用するGPUインデックスを'-'で区切って入力します。例0-0-1はGPU0で2つのプロセスを実行し、GPU1で1つのプロセスを実行します",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "ステップ1実験構成を記入します。実験データは「logs」フォルダに保存され、各実験には別々のフォルダがあります。実験名のパスを手動で入力する必要があり、実験構成、ログ、トレーニングされたモデルファイルが含まれています。",
"step1:正在处理数据": "ステップ1データ処理中",
"step2:正在提取音高&正在提取特征": "ステップ2ピッチ抽出と特徴抽出中",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "ステップ2aトレーニングフォルダ内のデコード可能なすべてのファイルを自動的にトラバースし、スライス正規化を実行します。実験ディレクトリに2つのwavフォルダが生成されます。現時点では、単一の歌手/スピーカーのトレーニングのみがサポートされています。",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "ステップ2bCPUを使用してピッチを抽出しますモデルにピッチがある場合、GPUを使用して特徴を抽出しますGPUインデックスを選択します:",
"step3: 填写训练设置, 开始训练模型和索引": "ステップ3:トレーニング設定を入力し、モデルとインデックスのトレーニングを開始します",
"step3a:正在训练模型": "ステップ3aモデルのトレーニングが開始されました",
"一键训练": "ワンクリックトレーニング",
"也可批量输入音频文件, 二选一, 优先读文件夹": "複数のオーディオファイルをインポートすることもできます。フォルダパスが存在する場合、この入力は無視されます。",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "UVR5モデルを使用したボーカル伴奏の分離バッチ処理。<br>有効なフォルダーパスフォーマットの例: D:\\path\\to\\input\\folder (エクスプローラーのアドレスバーからコピーします)。<br>モデルは三つのカテゴリに分かれています:<br>1. ボーカルを保持: ハーモニーのないオーディオに対してこれを選択します。HP5よりもボーカルをより良く保持します。HP2とHP3の二つの内蔵モデルが含まれています。HP3は伴奏をわずかに漏らす可能性がありますが、HP2よりもわずかにボーカルをより良く保持します。<br>2. 主なボーカルのみを保持: ハーモニーのあるオーディオに対してこれを選択します。主なボーカルを弱める可能性があります。HP5の一つの内蔵モデルが含まれています。<br>3. ディリバーブとディレイモデル (by FoxJoy):<br>(1) MDX-Net: ステレオリバーブの除去に最適な選択肢ですが、モノリバーブは除去できません;<br>&emsp;(234) DeEcho: ディレイ効果を除去します。AggressiveモードはNormalモードよりも徹底的に除去します。DeReverbはさらにリバーブを除去し、モリバーブを除去することができますが、高周波のリバーブが強い内容に対しては非常に効果的ではありません。<br>ディリバーブ/ディレイに関する注意点:<br>1. DeEcho-DeReverbモデルの処理時間は、他の二つのDeEchoモデルの約二倍です。<br>2. MDX-Net-Dereverbモデルは非常に遅いです。<br>3. 推奨される最もクリーンな設定は、最初にMDX-Netを適用し、その後にDeEcho-Aggressiveを適用することです。",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "ハイフンで区切って使用するGPUの番号を入力します。例えば0-1-2はGPU0、GPU1、GPU2を使用します",
"伴奏人声分离&去混响&去回声": "伴奏ボーカル分離&残響除去&エコー除去",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "保存ファイル名",
"保存的文件名, 默认空为和源文件同名": "保存するファイル名、デフォルトでは空欄で元のファイル名と同じ名前になります",
"保存的模型名不带后缀": "拡張子のない保存するモデル名",
"保存频率save_every_epoch": "エポックごとの保存頻度",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "明確な子音と呼吸音を保護し、電子音の途切れやその他のアーティファクトを防止します。0.5でオフになります。下げると保護が強化されますが、indexの効果が低下する可能性があります。",
"也可批量输入音频文件, 二选一, 优先读文件夹": "複数のオーディオファイルもインポートできます。フォルダパスが存在する場合、この入力は無視されます。",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "GPUインデックスを'-'で区切って入力します。例0-1-2はGPU 0、1、および2を使用します。",
"伴奏人声分离&去混响&去回声": "ボーカル/伴奏の分離と残響の除去",
"使用模型采样率": "使用するモデルのサンプルレート",
"使用设备采样率": "使用デバイスのサンプルレート",
"保存名": "保存名:",
"保存的文件名, 默认空为和源文件同名": "保存ファイル名(デフォルト:元のファイルと同じ):",
"保存的模型名不带后缀": "保存されるモデル名(拡張子なし):",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "清濁音と呼吸音を保護し、電子音楽の撕裂などのアーティファクトを防ぎます。0.5まで引っ張ると無効になり、保護力を高めるには値を下げますが、索引の精度が低下する可能性があります。",
"修改": "変更",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "モデル情報の修正(weightsフォルダから抽出された小さなモデルファイルのみ対応)",
"停止音频转换": "音声変換を停止",
"全流程结束!": "全工程が完了!",
"刷新音色列表和索引路径": "音源リストとインデックスパスの更新",
"加载模型": "モデルをロード",
"加载预训练底模D路径": "事前学習済みのDモデルのパス",
"加载预训练底模G路径": "事前学習済みのGモデルのパス",
"单次推理": "单次推理",
"卸载音色省显存": "音源を削除してメモリを節約",
"变调(整数, 半音数量, 升八度12降八度-12)": "ピッチ変更(整数、半音数、上下オクターブ12-12)",
"后处理重采样至最终采样率0为不进行重采样": "最終的なサンプリングレートへのポストプロセッシングのリサンプリング リサンプリングしない場合は0",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "モデル情報の変更('weights'フォルダから抽出された小さなモデルファイルのみサポート)",
"停止音频转换": "オーディオ変換を停止",
"全流程结束!": "すべてのプロセスが完了しました",
"刷新音色列表和索引路径": "ボイスリストとインデックスパスをリフレッシュ",
"加载模型": "モデルの読み込み",
"加载预训练底模D路径": "事前にトレーニングされたベースモデルDのパスをロード:",
"加载预训练底模G路径": "事前にトレーニングされたベースモデルGのパスをロード:",
"单次推理": "単一推論",
"卸载音色省显存": "GPUメモリを節約するためにボイスをアンロード:",
"变调(整数, 半音数量, 升八度12降八度-12)": "トランスポーズ整数、半音の数、8度上げ: 12、8度下げ: -12:",
"后处理重采样至最终采样率0为不进行重采样": "後処理でオーディオを最終のサンプルレートに再サンプリングします。リサンプリングを行わない場合は0に設定してください:",
"否": "いいえ",
"启用相位声码器": "启用相位声码器",
"响应阈值": "反応閾値",
"响度因子": "ラウドネス係数",
"启用相位声码器": "位相音声コーダーを有効にする",
"响应阈值": "閾値",
"响度因子": "音量ファクター",
"处理数据": "データ処理",
"导出Onnx模型": "Onnxに変換",
"导出文件格式": "エクスポート形式",
"常见问题解答": "よくある質問",
"常规设置": "一般設定",
"开始音频转换": "音声変換を開始",
"很遗憾您这没有能用的显卡来支持您训练": "トレーニングに対応したGPUが動作しないのは残念です。",
"性能设置": "パフォーマンス設定",
"总训练轮数total_epoch": "総エポック数",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "一括変換、変換する音声フォルダを入力、または複数の音声ファイルをアップロードし、指定したフォルダ(デフォルトのopt)に変換した音声を出力します。",
"指定输出主人声文件夹": "マスターの出力音声フォルダーを指定する",
"指定输出文件夹": "出力フォルダを指定してください",
"指定输出非主人声文件夹": "マスター以外の出力音声フォルダーを指定する",
"推理时间(ms):": "推論時間(ms):",
"推理音色": "音源推論",
"导出Onnx模型": "Onnxモデルのエクスポート",
"导出文件格式": "エクスポートファイル形式",
"常见问题解答": "よくある質問 (FAQ)",
"常规设置": "一般的な設定",
"开始音频转换": "オーディオ変換を開始",
"性能设置": "性能設定",
"批量推理": "一括推論",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "一括変換。変換するオーディオファイルが含まれるフォルダを入力するか、複数のオーディオファイルをアップロードします。変換されたオーディオは指定されたフォルダ (デフォルト: 'opt') に出力されます。",
"指定输出主人声文件夹": "ボーカルの出力フォルダを指定:",
"指定输出文件夹": "出力フォルダの指定:",
"指定输出非主人声文件夹": "伴奏の出力フォルダを指定:",
"推理时间(ms):": "推論時間 (ms):",
"推理音色": "推論ボイス:",
"提取": "抽出",
"提取音高和处理数据使用的CPU进程数": "ピッチの抽出やデータ処理に使用するCPUスレッド数",
"提取音高和处理数据使用的CPU进程数": "ピッチ抽出およびデータ処理に使用されるCPUプロセスの数:",
"是": "はい",
"是否仅保存最新的ckpt文件以节省硬盘空间": "ハードディスク容量を節約するため、最新のckptファイルのみを保存しますか",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "各保存時点の小モデルを全部weightsフォルダに保存するかどうか",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "すべてのトレーニングデータをメモリにキャッシュするかどうか。10分以下の小さなデータはキャッシュしてトレーニングを高速化できますが、大きなデータをキャッシュするとメモリが破裂し、あまり速度が上がりません。",
"显卡信息": "GPU情報",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本ソフトウェアはMITライセンスに基づくオープンソースであり、製作者は本ソフトウェアに対していかなる責任を持ちません。本ソフトウェアの利用者および本ソフトウェアから派生した音源(成果物)を配布する者は、本ソフトウェアに対して自身で責任を負うものとします。 <br>この条項に同意しない場合、パッケージ内のコードやファイルを使用や参照を禁じます。詳しくは<b>LICENSE</b>をご覧ください。",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "すべてのトレーニングセットをGPUメモリにキャッシュするかどうか。小さなデータセット (10分以下) をキャッシュするとトレーニングが高速化されますが、大きなデータセットをキャッシュするとGPUメモリが消費され、あまり速度が向上しないかもしれません:",
"查看": "表示",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "モデル情報を表示する(小さいモデルファイルはweightsフォルダーからのみサポートされています)",
"检索特征占比": "検索特徴率",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "モデル情報を表示します ( 'weights' フォルダから抽出された小さなモデルファイルにのみ対応):",
"检索特征占比": "特徴の検索比率 (アクセントの強度を制御、高すぎるとアーティファクトが発生します):",
"模型": "モデル",
"模型推理": "モデル推論",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "モデル抽出(ログフォルダー内の大きなファイルのモデルパスを入力)、モデルを半分までトレーニングし、自動的に小さいファイルモデルを保存しなかったり、中間モデルをテストしたい場合に適用されます。",
"模型是否带音高指导": "モデルに音高ガイドを付けるかどうか",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "モデルに音高ガイドがあるかどうか(歌唱には必要ですが、音声には必要ありません)",
"模型是否带音高指导,1是0否": "モデルに音高ガイドを付けるかどうか、1は付ける、0は付けない",
"模型版本型号": "モデルのバージョン",
"模型融合, 可用于测试音色融合": "モデルのマージ、音源のマージテストに使用できます",
"模型路径": "モデルパス",
"每张显卡的batch_size": "GPUごとのバッチサイズ",
"淡入淡出长度": "フェードイン/フェードアウト長",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "モデル抽出 ( 'logs' フォルダ内の大きなファイルモデルのパスを入力)。トレーニングを途中で停止して手動で小さなモデルファイルを抽出および保存したい場合、または中間モデルをテストしたい場合に使用します:",
"模型是否带音高指导": "モデルにピッチガイダンスがあるかどうか:",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "モデルにピッチガイダンスがあるかどうか (歌唱には必須、音声にはオプション):",
"模型是否带音高指导,1是0否": "モデルにピッチガイダンスがあるかどうか (1: はい、0: いいえ):",
"模型版本型号": "モデルアーキテクチャバージョン:",
"模型融合, 可用于测试音色融合": "モデルフュージョン、音色フュージョンをテストするために使用できます",
"模型路径": "モデルへのパス:",
"淡入淡出长度": "フェードの長さ",
"版本": "バージョン",
"特征提取": "特徴抽出",
"特征检索库文件路径,为空则使用下拉的选择结果": "特徴検索ライブラリへのパス 空の場合はドロップダウンで選択",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "男性から女性へは+12キーをお勧めします。女性から男性へは-12キーをお勧めします。音域が広すぎて音質が劣化した場合は、適切な音域に自分で調整してください。",
"目标采样率": "目標サンプリングレート",
"算法延迟(ms):": "算法延迟(ms):",
"自动检测index路径,下拉式选择(dropdown)": "インデックスパスの自動検出 ドロップダウンで選択",
"融合": "マージ",
"要改的模型信息": "変更するモデル情報",
"要置入的模型信息": "挿入するモデル情報",
"特提取": "特徴抽出",
"特徴检索库文件路径,为空则使用下拉的选择结果": "特徴インデックスファイルへのパス。空白の場合はドロップダウンから選択された結果が使用されます:",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "男性から女性への変換では+12キーが推奨され、女性から男性への変換では-12キーが推奨されます。音域が広すぎて音声が歪む場合は、適切な音域に手動で調整することもできます。",
"目标采样率": "目標サンプルレート:",
"算法延迟(ms):": "アルゴリズムの遅延(ms):",
"自动检测index路径,下拉式选择(dropdown)": "indexパスを自動検出し、ドロップダウンから選択します:",
"融合": "フュージョン",
"要改的模型信息": "変更するモデル情報:",
"要置入的模型信息": "挿入するモデル情報:",
"训练": "トレーニング",
"训练模型": "モデルのトレーニング",
"训练特征索引": "特徴インデックスのトレーニング",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "トレーニング終了時に、トレーニングログやフォルダ内のtrain.logを確認することができます",
"请指定说话人id": "話者IDを指定してください",
"请选择index文件": "indexファイルを選択してください",
"请选择pth文件": "pthファイルを選択してください",
"请选择说话人id": "話者IDを選択してください",
"训练特征索引": "特徴索引のトレーニング",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "トレーニングが完了しました。トレーニングログはコンソールまたは実験フォルダの 'train.log' ファイルで確認できます。",
"请指定说话人id": "話者/歌手のIDを指定してください:",
"请选择index文件": ".index ファイルを選択してください",
"请选择pth文件": ".pth ファイルを選択してください",
"请选择说话人id": "話者/歌手のIDを選択してください:",
"转换": "変換",
"输入实验名": "モデル名",
"输入待处理音频文件夹路径": "処理するオーディオファイルのフォルダパスを入力してください",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "処理対象音声フォルダーのパスを入力してください(エクスプローラーのアドレスバーからコピーしてください)",
"输入待处理音频文件路径(默认是正确格式示例)": "処理対象音声ファイルのパスを入力してください(デフォルトは正しいフォーマットの例です)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "入力ソースの音量エンベロープと出力音量エンベロープの融合率 1に近づくほど、出力音量エンベロープの割合が高くなる",
"输入监听": "输入监听",
"输入训练文件夹路径": "トレーニング用フォルダのパスを入力してください",
"输入实验名": "実験名を入力:",
"输入待处理音频文件夹路径": "処理するオーディオフォルダパスを入力してください:",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "処理するオーディオフォルダのパスを入力してください (ファイルマネージャのアドレスバーからコピーしてください):",
"输入待处理音频文件路径(默认是正确格式示例)": "処理するオーディオファイルのパスを入力してください (デフォルトは正しい形式の例です):",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "音量エンベロープのスケーリングを調整します。0に近いほど、元のボーカルの音量に似ます。相対的に低い値に設定すると、イズをマスキングし、音量がより自然に聞こえるようになります。1に近いほど、一貫して大きな音量になります:",
"输入监听": "入力ボイスモニター",
"输入训练文件夹路径": "トレーニングフォルダのパスを入力してください:",
"输入设备": "入力デバイス",
"输入降噪": "入力ノイズの低減",
"输入降噪": "ノイズリダクションの入力",
"输出信息": "出力情報",
"输出变声": "输出变声",
"输出变声": "変換されたボイスの出力",
"输出设备": "出力デバイス",
"输出降噪": "出力ノイズの低減",
"输出音频(右下角三个点,点了可以下载)": "出力音声(右下の三点をクリックしてダウンロードできます)",
"选择.index文件": ".indexファイルを選択",
"选择.pth文件": ".pthファイルを選択",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "ピッチ抽出アルゴリズムの選択、歌声はpmで高速化でき、harvestは低音が良いが信じられないほど遅く、crepeは良く動くがGPUを食います。",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "ピッチ抽出アルゴリズムの選択、歌声はpmで高速化でき、harvestは低音が良いが信じられないほど遅く、crepeは良く動くがGPUを喰います",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "ピッチ抽出アルゴリズムの選択歌声はpmで高速化でき、入力した音声が高音質でCPUが貧弱な場合はdioで高速化でき、harvestの方が良いが遅く、rmvpeがベストだがCPU/GPUを若干食います。",
"采样率:": "采样率:",
"输出降噪": "ノイズリダクションの出力",
"输出音频(右下角三个点,点了可以下载)": "オーディオの出力 (右下隅の三点をクリックしてダウンロード)",
"选择.index文件": ".index ファイルを選択してください",
"选择.pth文件": ".pth ファイルを選択してください",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "音高抽出アルゴリズムを選択します。歌声を抽出する場合は 'pm' を使用して高速化できます。高品質な音声でパフォーマンスが向上するが、CPUの使用が悪化する場合は 'dio' を使用できます。 'harvest' は品質が向上しますが、遅いです。 'rmvpe' は最高の品質で、少ないGPUが必要です",
"选择音高提取算法,输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "音高抽出アルゴリズムを選択します。歌声を抽出する場合は 'pm' を使用して高速化できます。高品質な音声でパフォーマンスが向上するが、CPUの使用が悪化する場合は 'dio' を使用できます。 'harvest' は品質が向上しますが、遅いです。 'rmvpe' は最高の品質で、CPU/GPUの使用が少ないです",
"采样率:": "サンプルレート:",
"采样长度": "サンプル長",
"重载设备列表": "デバイスリストをリロードする",
"音调设置": "音程設定",
"音频设备(请使用同种类驱动)": "オーディオデバイス(同じ種類のドライバーを使用してください)",
"音高算法": "ピッチアルゴリズム",
"重载设备列表": "デバイスリストを再読み込み",
"音调设置": "ピッチ設定",
"音频设备(请使用同种类驱动)": "オーディオデバイス (同じタイプのドライバを使用してください)",
"音高算法": "音程検出アルゴリズム",
"额外推理时长": "追加推論時間"
}

View File

@ -1,135 +1,285 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": ">=3이면 harvest 음높이 인식 결과에 중간값 필터를 사용합니다. 이 수치는 필터 반경이며, 사용하면 불명확한 음성을 어느정도 배제할 수 있습니다.",
"很遗憾您这没有能用的显卡来支持您训练": "죄송합니다. 훈련을 지원할 수 있는 그래픽 카드가 없습니다.",
"UVR5已开启": "UVR5가 활성화되었습니다",
"UVR5已关闭": "UVR5가 비활성화되었습니다",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "본 소프트웨어는 MIT 라이선스로 오픈 소스로 제공되며, 제작자는 소프트웨어에 대해 어떠한 제어력도 가지지 않습니다. 소프트웨어 사용자 및 소프트웨어에서 내보낸 소리를 전파하는 자는 전적으로 책임져야 합니다. <br>이 조항을 인정하지 않으면 소프트웨어의 코드 및 파일을 사용하거나 인용할 수 없습니다. 루트 디렉터리의 <b>LICENSE</b>를 참조하십시오.",
"0-前置数据集获取工具": "0-전방 데이터 세트 수집 도구",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5 보컬 및 반주 분리 및 에코 및 지연 제거 도구",
"是否开启UVR5-WebUI": "UVR5-WebUI 활성화 여부",
"UVR5进程输出信息": "UVR5 프로세스 출력 정보",
"0b-语音切分工具": "0b-음성 분리 도구",
".list标注文件的路径": ".list 주석 파일 경로",
"GPT模型路径": "GPT 모델 경로",
"SoVITS模型列表": "SoVITS 모델 목록",
"填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。": "분리된 오디오가 있는 디렉터리를 입력하십시오! 읽은 오디오 파일의 전체 경로 = 해당 디렉터리-연결-목록 파일에 해당하는 원본 이름 (전체 경로가 아님).",
"音频自动切分输入路径,可文件可文件夹": "오디오 자동 분리 입력 경로, 파일 또는 폴더 가능",
"切分后的子音频的输出根目录": "분리된 하위 오디오의 출력 기본 디렉터리",
"怎么切": "자르기 옵션",
"不切": "자르지 않음",
"凑四句一切": "네 문장의 세트를 완성하세요.",
"按英文句号.切": "영어 문장으로 분리하기",
"threshold:音量小于这个值视作静音的备选切割点": "임계 값: 이 값보다 작은 볼륨은 대체 분리 지점으로 간주됩니다.",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "최소 길이: 각 세그먼트의 최소 길이. 첫 번째 세그먼트가 너무 짧으면 계속해서 뒷부분과 연결하여 이 값 이상이 될 때까지",
"min_interval:最短切割间隔": "최소 분리 간격",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop 크기: 볼륨 곡선을 계산하는 방법. 작을수록 정확도가 높아지지만 계산량이 높아집니다 (정확도가 높다고 효과가 좋아지지 않음)",
"max_sil_kept:切完后静音最多留多长": "최대 유지되는 정적 길이 (분리 후)",
"开启语音切割": "음성 분리 활성화",
"终止语音切割": "음성 분리 종료",
"max:归一化后最大值多少": "최대 값 (정규화 후)",
"alpha_mix:混多少比例归一化后音频进来": "알파 믹스: 정규화된 오디오가 들어오는 비율",
"切割使用的进程数": "사용되는 프로세스 수로 자르기",
"语音切割进程输出信息": "음성 분리 프로세스 출력 정보",
"0c-中文批量离线ASR工具": "0c-중국어 대량 오프라인 ASR 도구",
"开启离线批量ASR": "오프라인 대량 ASR 활성화",
"终止ASR进程": "ASR 프로세스 종료",
"批量ASR(中文only)输入文件夹路径": "대량 ASR (중국어 전용) 입력 폴더 경로",
"ASR进程输出信息": "ASR 프로세스 출력 정보",
"0d-语音文本校对标注工具": "0d-음성 텍스트 교정 주석 도구",
"是否开启打标WebUI": "웹 기반 주석 활성화 여부",
"打标数据标注文件路径": "주석 데이터 주석 파일 경로",
"打标工具进程输出信息": "주석 도구 프로세스 출력 정보",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*실험/모델 이름",
"显卡信息": "그래픽 카드 정보",
"预训练的SoVITS-G模型路径": "사전 훈련된 SoVITS-G 모델 경로",
"预训练的SoVITS-D模型路径": "사전 훈련된 SoVITS-D 모델 경로",
"预训练的GPT模型路径": "사전 훈련된 GPT 모델 경로",
"1A-训练集格式化工具": "1A-훈련 세트 형식 지정 도구",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "logs/실험 이름 디렉터리에는 23456으로 시작하는 파일과 폴더가 있어야 함",
"*文本标注文件": "*텍스트 주석 파일",
"*训练集音频文件目录": "*훈련 세트 오디오 파일 디렉터리",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "훈련 세트 오디오 파일 디렉터리 - 목록 파일에 해당하는 원형 이름 연결",
"1Aa-文本内容": "1Aa-텍스트 내용",
"GPU卡号以-分割,每个卡号一个进程": "GPU 카드 번호는 -로 구분되며 각 카드 번호에 하나의 프로세스가 있어야 함",
"预训练的中文BERT模型路径": "사전 훈련된 중국어 BERT 모델 경로",
"开启文本获取": "텍스트 추출 활성화",
"终止文本获取进程": "텍스트 추출 프로세스 종료",
"文本进程输出信息": "텍스트 프로세스 출력 정보",
"1Ab-SSL自监督特征提取": "1Ab-SSL 자기 지도 특징 추출",
"预训练的SSL模型路径": "사전 훈련된 SSL 모델 경로",
"开启SSL提取": "SSL 추출 활성화",
"终止SSL提取进程": "SSL 추출 프로세스 종료",
"SSL进程输出信息": "SSL 프로세스 출력 정보",
"1Ac-语义token提取": "1Ac-의미 토큰 추출",
"开启语义token提取": "의미 토큰 추출 활성화",
"终止语义token提取进程": "의미 토큰 추출 프로세스 종료",
"语义token提取进程输出信息": "의미 토큰 추출 프로세스 출력 정보",
"1Aabc-训练集格式化一键三连": "1Aabc-훈련 세트 형식 지정 일괄 처리",
"开启一键三连": "일괄 처리 활성화",
"终止一键三连": "일괄 처리 종료",
"一键三连进程输出信息": "일괄 처리 프로세스 출력 정보",
"1B-微调训练": "1B-미세 조정 훈련",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-SoVITS 훈련. 공유 용 모델 파일은 SoVITS_weights 하위에 출력됩니다.",
"每张显卡的batch_size": "각 그래픽 카드의 배치 크기",
"总训练轮数total_epoch不建议太高": "총 훈련 라운드 수 (total_epoch), 너무 높지 않게 권장됨",
"文本模块学习率权重": "텍스트 모듈 학습률 가중치",
"保存频率save_every_epoch": "저장 빈도 (각 라운드마다)",
"是否仅保存最新的ckpt文件以节省硬盘空间": "디스크 공간을 절약하기 위해 최신 ckpt 파일만 저장할지 여부",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "각 저장 시간에 최종 작은 모델을 weights 폴더에 저장할지 여부",
"开启SoVITS训练": "SoVITS 훈련 활성화",
"终止SoVITS训练": "SoVITS 훈련 종료",
"SoVITS训练进程输出信息": "SoVITS 훈련 프로세스 출력 정보",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-GPT 훈련. 공유 용 모델 파일은 GPT_weights 하위에 출력됩니다.",
"总训练轮数total_epoch": "총 훈련 라운드 수 (total_epoch)",
"开启GPT训练": "GPT 훈련 활성화",
"终止GPT训练": "GPT 훈련 종료",
"GPT训练进程输出信息": "GPT 훈련 프로세스 출력 정보",
"1C-推理": "1C-추론",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "SoVITS_weights 및 GPT_weights에 저장된 훈련 완료된 모델 중 선택. 기본적으로 하나는 기본 모델이며 5초 Zero Shot TTS를 체험할 수 있습니다.",
"*GPT模型列表": "*GPT 모델 목록",
"*SoVITS模型列表": "*SoVITS 모델 목록",
"GPU卡号,只能填1个整数": "GPU 카드 번호, 1개의 정수만 입력 가능",
"刷新模型路径": "모델 경로 새로 고침",
"是否开启TTS推理WebUI": "TTS 추론 WebUI 활성화 여부",
"TTS推理WebUI进程输出信息": "TTS 추론 WebUI 프로세스 출력 정보",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-음성 변환",
"施工中,请静候佳音": "공사 중입니다. 기다려주십시오.",
"参考音频在3~10秒范围外请更换": "참고 오디오가 3~10초 범위를 벗어났습니다. 다른 것으로 바꾸십시오!",
"请上传3~10秒内参考音频超过会报错": "3~10초 이내의 참고 오디오를 업로드하십시오. 초과하면 오류가 발생합니다!",
"TTS推理进程已开启": "TTS 추론 프로세스가 열렸습니다",
"TTS推理进程已关闭": "TTS 추론 프로세스가 닫혔습니다",
"打标工具WebUI已开启": "주석 도구 WebUI가 열렸습니다",
"打标工具WebUI已关闭": "주석 도구 WebUI가 닫혔습니다",
"*请填写需要合成的目标文本。中英混合选中文,日英混合选日文,中日混合暂不支持,非目标语言文本自动遗弃。": "*합성할 대상 텍스트를 입력하십시오. 중국어와 영어를 혼합하면 중국어를 선택하고 일본어와 영어를 혼합하면 일본어를 선택하십시오. 중국어와 일본어를 혼합하는 것은 아직 지원되지 않으며 대상 언어가 아닌 텍스트는 자동으로 버려집니다.",
"*请填写需要合成的目标文本": "*합성할 대상 텍스트를 입력하십시오",
"ASR任务开启%s": "ASR 작업 시작: %s",
"GPT训练完成": "GPT 훈련 완료",
"GPT训练开始%s": "GPT 훈련 시작: %s",
"SSL提取进程执行中": "SSL 추출 프로세스 실행 중",
"SSL提取进程结束": "SSL 추출 프로세스 종료",
"SoVITS训练完成": "SoVITS 훈련 완료",
"SoVITS训练开始%s": "SoVITS 훈련 시작: %s",
"一键三连中途报错": "일괄 처리 중 오류 발생",
"一键三连进程结束": "일괄 처리 프로세스 종료",
"中文": "중국어",
"凑50字一切": "50자를 채우십시오",
"凑五句一切": "다섯 문장을 채우십시오",
"切分后文本": "분리된 텍스트",
"切割执行中": "분리 진행 중",
"切割结束": "분리 종료",
"参考音频的文本": "참고 오디오의 텍스트",
"参考音频的语种": "참고 오디오의 언어",
"合成语音": "합성 음성",
"后续将支持混合语种编码文本输入。": "향후 혼합 언어 코딩 텍스트 입력을 지원할 예정입니다.",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "이미 진행 중인 ASR 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "이미 진행 중인 GPT 훈련 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "이미 진행 중인 SSL 추출 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "이미 진행 중인 SoVITS 훈련 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "이미 진행 중인 일괄 처리 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "이미 진행 중인 분리 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "이미 진행 중인 텍스트 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "이미 진행 중인 의미 토큰 추출 작업이 있습니다. 다음 작업을 시작하려면 먼저 종료하십시오.",
"已终止ASR进程": "ASR 프로세스 종료됨",
"已终止GPT训练": "GPT 훈련 종료됨",
"已终止SoVITS训练": "SoVITS 훈련 종료됨",
"已终止所有1a进程": "모든 1a 프로세스 종료됨",
"已终止所有1b进程": "모든 1b 프로세스 종료됨",
"已终止所有一键三连进程": "모든 일괄 처리 프로세스 종료됨",
"已终止所有切割进程": "모든 분리 프로세스 종료됨",
"已终止所有语义token进程": "모든 의미 토큰 프로세스 종료됨",
"按中文句号。切": "중국어 문장으로 분리하십시오.",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "텍스트 분리 도구. 너무 긴 텍스트는 합성 결과가 항상 좋지 않을 수 있으므로 너무 길면 먼저 분리하는 것이 좋습니다. 합성은 텍스트 줄 바꿈을 기준으로 분리되어 다시 조합됩니다.",
"文本进程执行中": "텍스트 프로세스 실행 중",
"文本进程结束": "텍스트 프로세스 종료",
"日文": "일본어",
"英文": "영어",
"语义token提取进程执行中": "의미 토큰 추출 프로세스 실행 중",
"语义token提取进程结束": "의미 토큰 추출 프로세스 종료",
"请上传参考音频": "참고 오디오를 업로드하십시오",
"输入路径不存在": "입력 경로가 존재하지 않습니다",
"输入路径存在但既不是文件也不是文件夹": "입력 경로가 파일이나 폴더가 아닙니다",
"输出的语音": "출력 음성",
"进度1a-done": "진행: 1a-done",
"进度1a-done, 1b-ing": "진행: 1a-done, 1b-ing",
"进度1a-ing": "진행: 1a-ing",
"进度1a1b-done": "진행: 1a1b-done",
"进度1a1b-done, 1cing": "진행: 1a1b-done, 1cing",
"进度all-done": "진행: all-done",
"需要合成的切分前文本": "합성해야 할 분할 전 텍스트",
"需要合成的文本": "합성해야 할 텍스트",
"需要合成的语种": "합성해야 할 언어",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": ">=3이면 harvest 음고 인식 결과에 중앙값 필터를 사용하며, 값은 필터 반경이며 사용하면 소리를 약하게 할 수 있습니다",
"A模型权重": "A 모델 가중치",
"A模型路径": "A 모델 경로",
"B模型路径": "B 모델 경로",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\음성 오디오+주석\\요네즈 켄시\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0 곡선 파일, 선택 사항, 한 줄에 하나의 음높이, 기본 F0 및 음높이 변화를 대체함",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\음성 오디오 + 주석\\Miyuki Kenshi\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0 곡선 파일, 선택 사항, 한 줄에 하나의 음고, 기본 F0 및 음조 대신 사용",
"Index Rate": "인덱스 비율",
"Onnx导出": "Onnx 내보내기",
"Onnx输出路径": "Onnx 출력 경로",
"RVC模型路径": "RVC 모델 경로",
"ckpt处理": "ckpt 처리",
"harvest进程数": "harvest 프로세스 수",
"index文件路径不可包含中文": "인덱스 파일 경로에는 중국어를 포함할 수 없습니다.",
"pth文件路径不可包含中文": "pth 파일 경로에는 중국어를 포함할 수 없습니다.",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpe 카드 번호 구성: '-'로 구분하여 입력된 다른 프로세스 카드 번호, 예를 들어 0-0-1은 카드 0에서 2개의 프로세스를 실행하고 카드 1에서 1개의 프로세스를 실행",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "step1: 실험 설정을 작성합니다. 실험 데이터는 logs 아래에 있으며, 각 실험마다 하나의 폴더가 있습니다. 실험 이름 경로를 수동으로 입력해야 하며, 이 안에는 실험 설정, 로그, 훈련으로 얻은 모델 파일이 포함되어 있습니다.",
"index文件路径不可包含中文": "인덱스 파일 경로에는 중국어를 포함할 수 없습니다",
"pth文件路径不可包含中文": "pth 파일 경로에는 중국어를 포함할 수 없습니다",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpe 카드 번호 구성: 각 입력에 사용되는 다른 프로세스 카드를 -로 구분하여 입력하십시오. 예: 0-0-1은 카드 0에서 2개의 프로세스를 실행하고 카드 1에서 1개의 프로세스를 실행합니다",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "step1: 실험 구성 입력. 실험 데이터는 logs 하위에 있으며 각 실험에 대한 폴더가 있어야합니다. 실험 이름 경로를 수동으로 입력해야하며 실험 구성, 로그, 훈련된 모델 파일이 포함되어 있습니다.",
"step1:正在处理数据": "step1: 데이터 처리 중",
"step2:正在提取音高&正在提取特征": "step2: 음높이 추출 및 특성 추출 중",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "step2a: 훈련 폴더 아래 모든 오디오로 디코딩 가능한 파일을 자동으로 순회하고 슬라이스 정규화를 진행하여, 실험 디렉토리 아래에 2개의 wav 폴더를 생성합니다; 현재는 단일 사용자 훈련만 지원합니다.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "step2b: CPU를 사용해 음높이를 추출합니다(모델이 음높이를 포함하는 경우), GPU를 사용해 특성을 추출합니다(카드 번호 선택)",
"step3: 填写训练设置, 开始训练模型和索引": "step3: 훈련 설정을 작성하고, 모델 및 인덱스 훈련을 시작합니다",
"step2:正在提取音高&正在提取特征": "step2: 음고 추출 및 특징 추출 중",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "step2a: 자동으로 훈련 폴더에서 오디오로 디코딩할 수 있는 모든 파일을 반복하고 슬라이스 정규화를 수행하여 실험 디렉토리에 2 개의 wav 폴더를 생성합니다. 현재 단일 훈련만 지원됩니다.",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "step2b: CPU로 음고 추출(모델이 음고를 지원하는 경우), GPU로 특징 추출(카드 번호 선택)",
"step3: 填写训练设置, 开始训练模型和索引": "step3: 훈련 설정 입력, 모델 및 인덱스 훈련 시작",
"step3a:正在训练模型": "step3a: 모델 훈련 중",
"一键训练": "원키 트레이닝",
"也可批量输入音频文件, 二选一, 优先读文件夹": "대량으로 오디오 파일 입력도 가능, 둘 중 하나 선택, 폴더 우선 읽기",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "인간 목소리와 반주 분리 대량 처리, UVR5 모델 사용. <br>올바른 폴더 경로 예: E:\\codes\\py39\\vits_vc_gpu\\백로서화 테스트 케이스(파일 탐색기 주소창에서 복사하면 됨). <br>모델은 세 가지 유형으로 나뉩니다: <br>1. 인간 목소리 보존: 하모니가 없는 오디오를 선택, 주요 인간 목소리를 HP5보다 더 잘 보존. 내장된 HP2와 HP3 모델, HP3는 약간의 반주를 놓칠 수 있지만 HP2보다는 인간 목소리를 조금 더 잘 보존합니다. <br>2. 오직 주요 인간 목소리 보존: 하모니가 있는 오디오를 선택, 주요 인간 목소리가 약간 약해질 수 있음. 내장된 HP5 모델 하나; <br>3. 울림 제거, 지연 제거 모델(by FoxJoy)<br>(1)MDX-Net(onnx_dereverb): 양채널 울림에 대해서는 최선의 선택, 단채널 울림 제거 불가능;<br>(234)DeEcho: 지연 효과 제거. Aggressive가 Normal보다 더 철저하게 제거하며, DeReverb는 추가로 울림 제거, 단일 채널 울림 제거 가능하지만 고주파 중심의 판형 울림은 완전히 제거하지 못함.<br>울림/지연 제거 시 참고:<br>1. DeEcho-DeReverb 모델의 처리 시간은 다른 두 DeEcho 모델의 거의 2배임<br>2. MDX-Net-Dereverb 모델은 상당히 느림;<br>3. 개인적으로 추천하는 가장 깨끗한 구성은 MDX-Net 다음에 DeEcho-Aggressive 사용.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "-로 구분하여 입력한 카드 번호, 예를 들어 0-1-2는 카드0, 카드1, 카드2 사용",
"伴奏人声分离&去混响&去回声": "반주 및 인간 목소리 분리 & 울림 제거 & 에코 제거",
"使用模型采样率": "모델 샘플링 레이트 사용",
"使用设备采样率": "장치 샘플링 레이트 사용",
"一键训练": "일괄 훈련",
"也可批量输入音频文件, 二选一, 优先读文件夹": "오디오 파일을 일괄로 입력할 수도 있습니다. 둘 중 하나를 선택하고 폴더를 읽기를 우선합니다.",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "-로 구분하여 입력에 사용되는 카드 번호를 지정하십시오. 예 : 0-1-2는 카드 0, 1 및 2를 사용합니다",
"伴奏人声分离&去混响&去回声": "반주 및 보컬 분리 & 리버브 제거 & 에코 제거",
"使用模型采样率": "모델 샘플링 속도 사용",
"使用设备采样率": "기기 샘플링 속도 사용",
"保存名": "저장 이름",
"保存的文件名, 默认空为和源文件同名": "저장된 파일 이름, 기본값은 원본 파일과 동일",
"保存的模型名不带后缀": "저장된 모델 이름은 접미사 없음",
"保存频率save_every_epoch": "저장 빈도 save_every_epoch",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "청결한 자음과 숨소리를 보호하고, 전자음의 찢어짐과 같은 아티팩트를 방지하며, 0.5까지 끌어올리면 보호가 활성화되지 않으며, 낮추면 보호 강도는 증가하지만 인덱싱 효과는 감소할 수 있음",
"保存的文件名, 默认空为和源文件同名": "저장할 파일 이름, 기본적으로 공백은 원본 파일과 동일한 이름입니다",
"保存的模型名不带后缀": "저장할 모델 이름에는 확장자가 없습니다",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "클리어 자음 및 숨소를 보호하여 전자 음향 찢김과 같은 아티팩트를 방지하려면 0.5로 설정하되, 보호 강도를 높이려면 0.5로 당기지 않고 낮추면 인덱스 효과가 감소할 수 있습니다",
"修改": "수정",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "모델 정보 수정(오직 weights 폴더에서 추출된 소형 모델 파일만 지원)",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "모델 정보 수정 (weights 폴더에서 추출된 작은 모델 파일만 지원됨)",
"停止音频转换": "오디오 변환 중지",
"全流程结束!": "전체 과정 완료!",
"刷新音色列表和索引路径": "음색 목록 및 인덱스 경로 새로고침",
"全流程结束!": "전체 프로세스 완료!",
"刷新音色列表和索引路径": "음색 목록 및 인덱스 경로 새로 고침",
"加载模型": "모델 로드",
"加载预训练底模D路径": "사전 훈련된 베이스 모델 D 경로 로드",
"加载预训练底模G路径": "사전 훈련된 베이스 모델 G 경로 로드",
"加载预训练底模D路径": "사전 훈련된 기본 모델 D 경로 로드",
"加载预训练底模G路径": "사전 훈련된 기본 모델 G 경로 로드",
"单次推理": "단일 추론",
"卸载音色省显存": "음색 언로드로 메모리 절약",
"变调(整数, 半音数量, 升八度12降八度-12)": "변조(정수, 반음 수, 옥타브 상승 12, 옥타브 하강 -12)",
"后处理重采样至最终采样率0为不进行重采样": "후처리로 최종 샘플링 레이트까지 리샘플링, 0은 리샘플링하지 않음",
"卸载音色省显存": "음색 언로드 및 GPU 메모리 절약",
"变调(整数, 半音数量, 升八度12降八度-12)": "음높이 변경(정수, 반음 수, 올림 높이 12 내림 높이 -12)",
"后处理重采样至最终采样率0为不进行重采样": "후 처리를 통한 최종 샘플링률 재샘플링, 0은 재샘플링 미실행",
"否": "아니오",
"启用相位声码器": "위상 보코더 활성화",
"启用相位声码器": "페이즈 보코더 사용",
"响应阈值": "응답 임계값",
"响度因子": "소리 크기 인자",
"响度因子": "음량 요소",
"处理数据": "데이터 처리",
"导出Onnx模型": "Onnx 모델 내보내기",
"导出文件格式": "파일 형식 내보내기",
"常见问题解答": "자주 묻는 질문 답변",
"导出文件格式": "내보내기 파일 형식",
"常见问题解答": "자주 묻는 질문 해결",
"常规设置": "일반 설정",
"开始音频转换": "오디오 변환 시작",
"很遗憾您这没有能用的显卡来支持您训练": "유감스럽게도 훈련을 지원할 수 있는 그래픽 카드가 없습니다",
"性能设置": "성능 설정",
"总训练轮数total_epoch": "총 훈련 회차 total_epoch",
"批量推理": "대량 추론",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "대량 변환, 변환할 오디오 폴더 입력, 또는 여러 오디오 파일 업로드, 지정된 폴더(기본값 opt)에 변환된 오디오 출력.",
"指定输出主人声文件夹": "주인공 목소리 출력 폴더 지정",
"指定输出文件夹": "출력 파일 폴더 지정",
"指定输出非主人声文件夹": "비주인공 목소리 출력 폴더 지정",
"批量推理": "일괄 추론",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "일괄 변환, 변환 대기 중인 오디오 폴더를 입력하거나 여러 오디오 파일을 업로드하고 지정된 폴더(opt 기본값)에 변환된 오디오를 출력합니다.",
"指定输出主人声文件夹": "지정된 주인 목소리 출력 폴더",
"指定输出文件夹": "지정된 출력 폴더",
"指定输出非主人声文件夹": "지정된 비주인 목소리 출력 폴더",
"推理时间(ms):": "추론 시간(ms):",
"推理音色": "추론 음색",
"提取": "추출",
"提取音高和处理数据使用的CPU进程数": "음높이 추출 및 데이터 처리에 사용되는 CPU 프로세스 수",
"提取音高和处理数据使用的CPU进程数": "음높이 추출 및 데이터 처리에 사용되는 CPU 프로세스 수 추출",
"是": "예",
"是否仅保存最新的ckpt文件以节省硬盘空间": "디스크 공간을 절약하기 위해 가장 최신의 ckpt 파일만 저장할지 여부",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "매 저장 시점마다 최종 작은 모델을 weights 폴더에 저장할지 여부",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "모든 훈련 세트를 VRAM에 캐시할지 여부. 10분 미만의 작은 데이터는 훈련 속도를 높이기 위해 캐시할 수 있으나, 큰 데이터는 VRAM을 초과하여 큰 속도 향상을 기대할 수 없음.",
"显卡信息": "그래픽 카드 정보",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "이 소프트웨어는 MIT 라이선스로 오픈 소스이며, 작성자는 소프트웨어에 대한 어떠한 제어도 가지지 않으며, 소프트웨어 사용자 및 소프트웨어에서 내보낸 소리를 전파하는 사용자는 모든 책임을 져야 함. <br>이 조항을 인정하지 않는 경우, 소프트웨어 패키지 내의 어떠한 코드나 파일도 사용하거나 인용할 수 없음. 자세한 내용은 루트 디렉토리의 <b>LICENSE</b>를 참조.",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "모든 훈련 세트를 GPU 메모리에 캐시할지 여부. 10분 미만의 소량 데이터는 훈련 속도를 높이기 위해 캐시할 수 있지만, 대량 데이터를 캐시하면 메모리가 터지고 속도가 크게 향상되지 않을 수 있습니다.",
"查看": "보기",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "모델 정보 보기(오직 weights 폴더에서 추출된 작은 모델 파일만 지원)",
"检索特征占比": "특징 검색 비율",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "모델 정보보기(작은 모델 파일로 추출된 weights 폴더에서만 지원)",
"检索特征占比": "특징 비율 검색",
"模型": "모델",
"模型推理": "모델 추론",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "모델 추출(로그 폴더 아래 대용량 모델 경로 입력), 중간에 훈련을 중단하고 싶은 경우나 작은 파일 모델을 자동으로 저장하지 않은 경우, 또는 중간 모델을 테스트하고 싶은 경우에 적합",
"模型是否带音高指导": "모델이 음높이 지도를 포함하는지 여부",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "모델이 음높이 지도를 포함하는지 여부(노래에는 필수, 말하기에는 선택적)",
"模型是否带音高指导,1是0否": "모델이 음높이 지도를 포함하는지 여부, 1은 '예', 0은 '아니오'",
"模型版本型号": "모델 버전 및 모델",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "모델 추출(로그 폴더에 대형 파일 모델 경로 입력), 반 훈련하고 싶지 않거나 모델이 자동으로 작은 파일 모델로 추출되지 않았거나 중간 모델을 테스트하려는 경우에 사용",
"模型是否带音高指导": "모델에 음높이 안내가 있는지 여부",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "모델에 음높이 안내가 있는지 여부(노래에는 필수, 음성은 선택 사항)",
"模型是否带音高指导,1是0否": "모델에 음높이 안내가 있는지 여부, 1이면 있음 0이면 없음",
"模型版本型号": "모델 버전 및 모델 번호",
"模型融合, 可用于测试音色融合": "모델 통합, 음색 통합 테스트에 사용 가능",
"模型路径": "모델 경로",
"每张显卡的batch_size": "각 GPU의 batch_size",
"淡入淡出长度": "페이드 인/아웃 길이",
"版本": "버전",
"特征提取": "특징 추출",
"特征检索库文件路径,为空则使用下拉的选择结果": "특징 검색 라이브러리 파일 경로, 비어 있으면 드롭다운 선택 결과 사용",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "남성에서 여성으로 전환 시 +12키 추천, 여성에서 남성으로 전환 시 -12키 추천, 음역대 폭발로 음색 왜곡이 발생할 경우 적절한 음역대로 조정 가능.",
"目标采样率": "목표 샘플링 비율",
"算法延迟(ms):": "알고리즘 지연(ms):",
"自动检测index路径,下拉式选择(dropdown)": "index 경로 자동 감지, 드롭다운 선택",
"融合": "통합",
"特征提取": "특 추출",
"特征检索库文件路径,为空则使用下拉的选择结果": "특 검색 라이브러리 파일 경로, 비어 있으면 드롭다운 선택 결과 사용",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "남성을 여성으로 추천 +12키, 여성을 남성으로 추천 -12키, 음역 폭발로 음색이 왜곡되면 적절한 음역으로 직접 조절 가능",
"目标采样率": "목표 샘플링",
"算法延迟(ms):": "알고리즘 지연 시간(ms):",
"自动检测index路径,下拉式选择(dropdown)": "자동으로 index 경로 감지, 드롭다운 선택",
"融合": "합",
"要改的模型信息": "수정할 모델 정보",
"要置入的模型信息": "삽입할 모델 정보",
"训练": "훈련",
"训练模型": "모델 훈련",
"训练特征索引": "특징 인덱스 훈련",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "훈련이 완료되었습니다. 콘솔 훈련 로그나 실험 폴더 내의 train.log를 확인하세요.",
"请指定说话人id": "화자 id를 지정해주세요.",
"请选择index文件": "index 파일을 선택해주세요.",
"请选择pth文件": "pth 파일을 선택해주세요.",
"请选择说话人id": "화자 id를 선택해주세요.",
"训练特征索引": "특 인덱스 훈련",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "훈련 종료, 콘솔 훈련 로그 또는 실험 폴더의 train.log를 확인할 수 있습니다",
"请指定说话人id": "화자 ID 지정",
"请选择index文件": "index 파일 선택",
"请选择pth文件": "pth 파일 선택",
"请选择说话人id": "화자 ID 선택",
"转换": "변환",
"输入实验名": "실험명을 입력하세요.",
"输入待处理音频文件夹路径": "처리할 오디오 파일 폴더 경로를 입력하세요.",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "처리할 오디오 파일 폴더 경로를 입력하세요(파일 관리자의 주소 표시줄에서 복사하세요).",
"输入待处理音频文件路径(默认是正确格式示例)": "처리할 오디오 파일 경로를 입력하세요(기본값은 올바른 형식의 예시입니다).",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "원본 볼륨 엔벨로프와 출력 볼륨 엔벨로프의 혼합 비율을 입력하세요. 1에 가까울수록 출력 엔벨로프를 더 많이 사용합니다.",
"输入监听": "모니터링 입력",
"输入训练文件夹路径": "학습시킬 파일 폴더의 경로를 입력하세요.",
"输入实验名": "실험명 입력",
"输入待处理音频文件夹路径": "처리 대기 중인 오디오 폴더 경로 입력",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "처리 대기 중인 오디오 폴더 경로 입력(파일 관리자 주소 표시 줄에서 복사하면 됨)",
"输入待处理音频文件路径(默认是正确格式示例)": "처리 대기 중인 오디오 파일 경로 입력(기본적으로 올바른 형식의 예제)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "소스 음량 에너벌롭을 입력하여 출력 음량 에너벌롭 합성 비율을 대체하면 1에 가까울수록 출력 에너벌롭 사용",
"输入监听": "입력 모니터링",
"输入训练文件夹路径": "훈련 폴더 경로 입력",
"输入设备": "입력 장치",
"输入降噪": "입력 노이즈 감소",
"输入降噪": "노이즈 감소 입력",
"输出信息": "출력 정보",
"输出变声": "음성 변환 출력",
"输出变声": "음성 출력",
"输出设备": "출력 장치",
"输出降噪": "출력 노이즈 감소",
"输出音频(右下角三个点,点了可以下载)": "오디오 출력(오른쪽 하단 세 개의 점, 클릭하면 다운로드 가능)",
"选择.index文件": ".index 파일 선택",
"选择.pth文件": ".pth 파일 선택",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "음고 추출 알고리즘을 선택하세요. 노래 입력 시 pm으로 속도를 높일 수 있으며, harvest는 저음이 좋지만 매우 느리고, crepe는 효과가 좋지만 GPU를 많이 사용합니다.",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "음고 추출 알고리즘을 선택하세요. 노래 입력 시 pm으로 속도를 높일 수 있고, harvest는 저음이 좋지만 매우 느리며, crepe는 효과가 좋지만 GPU를 많이 사용하고, rmvpe는 가장 좋은 효과를 내면서 GPU를 적게 사용합니다.",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "음고 추출 알고리즘 선택: 노래 입력 시 pm으로 속도를 높일 수 있으며, 고품질 음성이지만 CPU가 낮을 때는 dio로 속도를 높일 수 있고, harvest는 품질이 더 좋지만 느리며, rmvpe는 최고의 효과를 내면서 CPU/GPU를 적게 사용합니다.",
"采样率:": "샘플링 레이트:",
"输出降噪": "노이즈 감소 출력",
"输出音频(右下角三个点,点了可以下载)": "출력 오디오(우하단 세 점, 클릭하면 다운로드 가능)",
"选择.index文件": "index 파일 선택",
"选择.pth文件": "pth 파일 선택",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "음높이 추출 알고리즘 선택, 노래 입력에 pm 사용 가능, harvest는 저음이 좋지만 매우 느림, crepe 효과는 좋지만 GPU 사용",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "음높이 추출 알고리즘 선택, 노래 입력에 pm 사용 가능, harvest는 저음이 좋지만 매우 느림, crepe 효과는 좋지만 GPU 사용, rmvpe 효과가 가장 좋으며 약간의 GPU 사용",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "음높이 추출 알고리즘 선택: 노래 입력에 pm 사용 가능, 고품질 음성이지만 CPU가 낮음, dio 사용 가능, harvest 품질이 더 좋지만 느림, rmvpe 효과가 최고이며 CPU/GPU 약간 사용",
"采样率:": "샘플링:",
"采样长度": "샘플링 길이",
"重载设备列表": "장치 목록 리로드",
"重载设备列表": "장치 목록 다시로드",
"音调设置": "음조 설정",
"音频设备(请使用同种类驱动)": "오디오 장치(동일한 유형의 드라이버를 사용해주세요)",
"音高算法": "음고 알고리즘",
"额外推理时长": "추가적인 추론 시간"
"音频设备(请使用同种类驱动)": "오디오 장치(동일한 유형의 드라이버 사용 권장)",
"音高算法": "음높이 알고리즘",
"额外推理时长": "추가 추론 시간"
}

93
i18n/locale/pt_BR.json Normal file
View File

@ -0,0 +1,93 @@
{
"很遗憾您这没有能用的显卡来支持您训练": "Infelizmente, você não possui uma placa de vídeo funcional para suportar seu treinamento",
"UVR5已开启": "UVR5 está ativado",
"UVR5已关闭": "UVR5 está desativado",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "Este software é de código aberto sob a licença MIT. O autor não tem controle sobre o software. Aqueles que usam o software e difundem os sons exportados pelo software são totalmente responsáveis. <br>Se você não concorda com esta cláusula, não pode usar ou citar nenhum código e arquivo dentro do pacote de software. Consulte o diretório raiz <b>LICENSE</b> para mais detalhes.<br><br> Traduzido por Rafael Godoy Ebert",
"0-前置数据集获取工具": "0- Ferramenta de aquisição de conjunto de dados pré-frontal",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0A-UVR5 separação de voz e acompanhamento instrumental & ferramenta para remover reverberação e atraso",
"是否开启UVR5-WebUI": "Se deseja ativar a UVR5-WEBUI",
"UVR5进程输出信息": "Informações de saída do processo UVR5",
"0b-语音切分工具": "0b- Ferramenta de corte de voz",
"音频自动切分输入路径,可文件可文件夹": "Caminho de entrada automático de corte de áudio, pode ser um arquivo ou uma pasta",
"切分后的子音频的输出根目录": "Diretório raiz de saída do sub-áudio após o corte",
"threshold:音量小于这个值视作静音的备选切割点": "Limiar: O volume menor que este valor é considerado como um ponto de corte mudo alternativo",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length: O comprimento mínimo de cada parágrafo, se o primeiro for muito curto, conecte-o continuamente aos próximos até ultrapassar este valor",
"min_interval:最短切割间隔": "min_interval: O intervalo de corte mínimo",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "HOP_SIZE: Como calcular a curva de volume, quanto menor a precisão, maior a quantidade de cálculos (não significa que quanto maior a precisão, melhor o efeito)",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept: Depois de cortar, por quanto tempo no máximo o silêncio é mantido",
"开启语音切割": "Ativar corte de voz",
"终止语音切割": "Encerrar corte de voz",
"max:归一化后最大值多少": "MAX: Qual é o valor máximo após a normalização?",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix: Em que proporção o áudio normalizado é misturado de volta",
"切割使用的进程数": "Número de processos para corte",
"语音切割进程输出信息": "Informações de saída do processo de corte de voz",
"0c-中文批量离线ASR工具": "0c- Ferramenta chinesa de ASR offline em lote",
"开启离线批量ASR": "Ativar ASR offline em lote",
"终止ASR进程": "Encerrar processo ASR",
"批量ASR(中文only)输入文件夹路径": "Caminho da pasta de entrada para ASR em lote (apenas chinês)",
"ASR进程输出信息": "Informações de saída do processo ASR",
"0d-语音文本校对标注工具": "0d- Ferramenta de correção e marcação de texto de voz",
"是否开启打标WebUI": "Se deseja abrir o webui de marcação",
"打标数据标注文件路径": "Caminho do arquivo de marcação de dados de marcação",
"打标工具进程输出信息": "Informações de saída do processo da ferramenta de marcação",
"1-GPT-SoVITS-TTS": "1-GPT-SOVITS-TTS",
"*实验/模型名": "*Nome do experimento/modelo",
"显卡信息": "Informações da placa de vídeo",
"预训练的SoVITS-G模型路径": "Caminho do modelo SoVITS-G pre-train",
"预训练的SoVITS-D模型路径": "Caminho do modelo SoVITS-D pre-train",
"预训练的GPT模型路径": "Caminho do modelo GPT pre-train",
"1A-训练集格式化工具": "1A-Ferramenta de formatação de conjunto de dados de treinamento",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "Logs de saída/deve haver arquivos e pastas começando com 23456 no diretório do nome do experimento",
"*文本标注文件": "*Arquivo de marcação de texto",
"*训练集音频文件目录": "*Diretório de arquivos de áudio do conjunto de treinamento",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "Diretório de arquivos de áudio do conjunto de treinamento. Concatene o nome do arquivo correspondente à forma de onda no arquivo de lista",
"1Aa-文本内容": "1AA-Conteúdo do texto",
"GPU卡号以-分割,每个卡号一个进程": "Número da placa de vídeo dividido por-, cada número de placa é um processo",
"预训练的中文BERT模型路径": "Caminho do modelo BERT chinês pre-train",
"开启文本获取": "Ativar obtenção de texto",
"终止文本获取进程": "Encerrar processo de obtenção de texto",
"文本进程输出信息": "Informações de saída do processo de texto",
"1Ab-SSL自监督特征提取": "1AB-Extração de características auto-supervisionadas SSL",
"预训练的SSL模型路径": "Caminho do modelo SSL pre-train",
"开启SSL提取": "Ativar extração SSL",
"终止SSL提取进程": "Encerrar processo de extração SSL",
"SSL进程输出信息": "Informações de saída do processo SSL",
"1Ac-语义token提取": "1AC-Extração de token semântico",
"开启语义token提取": "Ativar extração de token semântico",
"终止语义token提取进程": "Encerrar processo de extração de token semântico",
"语义token提取进程输出信息": "Informações de saída do processo de extração de token semântico",
"1Aabc-训练集格式化一键三连": "1AABC-Formatação de conjunto de treinamento em um clique",
"开启一键三连": "Ativar um clique",
"终止一键三连": "Encerrar um clique",
"一键三连进程输出信息": "Informações de saída do processo de um clique",
"1B-微调训练": "1B-Treinamento de ajuste fino",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1ba-Treinamento SoVITS. O arquivo de modelo para compartilhamento é gerado em SOVITS_WEIGHTS",
"每张显卡的batch_size": "Tamanho do lote de cada placa de vídeo",
"总训练轮数total_epoch不建议太高": "Total de epoch de treinamento, não é recomendável um valor muito alto",
"文本模块学习率权重": "Weight da taxa de aprendizado do módulo de texto",
"保存频率save_every_epoch": "Frequência de salvamento save_every_epoch",
"是否仅保存最新的ckpt文件以节省硬盘空间": "Se deve salvar apenas o último arquivo CKPT para economizar espaço em disco",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "Se deve salvar o modelo pequeno final na pasta Weights em cada ponto de salvamento de tempo",
"开启SoVITS训练": "Ativar treinamento SoVITS",
"终止SoVITS训练": "Encerrar treinamento SoVITS",
"SoVITS训练进程输出信息": "Informações de saída do processo de treinamento SoVITS",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1BB-Treinamento GPT. O arquivo de modelo para compartilhamento é gerado em GPT_WEIGHTS",
"总训练轮数total_epoch": "Total de epoch de treinamento",
"开启GPT训练": "Ativar treinamento GPT",
"终止GPT训练": "Encerrar treinamento GPT",
"GPT训练进程输出信息": "Informações de saída do processo de treinamento GPT",
"1C-推理": "1C-raciocínio",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "Selecione os modelos armazenados em Sovits_weights e GPT_WEIGHTS. O padrão é o modelo inferior, experiência para 5 segundos de Zero Shot TTS",
"*GPT模型列表": "*Lista de modelos GPT",
"*SoVITS模型列表": "*Lista de modelos Sovits",
"GPU卡号,只能填1个整数": "Número da placa de vídeo, só é possível preencher com um número inteiro",
"刷新模型路径": "Atualizar caminho do modelo",
"是否开启TTS推理WebUI": "Se deseja ativar o webui de raciocínio TTS",
"TTS推理WebUI进程输出信息": "Informações de saída do processo webui de raciocínio TTS",
"2-GPT-SoVITS-变声": "2-gpt-sovits-mudança de voz",
"施工中,请静候佳音": "Em construção, por favor, aguarde por um bom som",
"TTS推理进程已开启": "O processo de inferência TTS foi iniciado",
"TTS推理进程已关闭": "O processo de inferência TTS foi desativado",
"打标工具WebUI已开启": "A ferramenta de marcação WebUI está ativada",
"打标工具WebUI已关闭": "A ferramenta de marcação WebUI foi desativado"
}

View File

@ -1,135 +1,287 @@
{
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": ">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音",
"A模型权重": "A模型权重",
"A模型路径": "A模型路径",
"B模型路径": "B模型路径",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调",
"Index Rate": "Index Rate",
"Onnx导出": "Onnx导出",
"Onnx输出路径": "Onnx输出路径",
"RVC模型路径": "RVC模型路径",
"ckpt处理": "ckpt处理",
"harvest进程数": "harvest进程数",
"index文件路径不可包含中文": "index文件路径不可包含中文",
"pth文件路径不可包含中文": "pth文件路径不可包含中文",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ",
"step1:正在处理数据": "step1:正在处理数据",
"step2:正在提取音高&正在提取特征": "step2:正在提取音高&正在提取特征",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)",
"step3: 填写训练设置, 开始训练模型和索引": "step3: 填写训练设置, 开始训练模型和索引",
"step3a:正在训练模型": "step3a:正在训练模型",
"一键训练": "一键训练",
"也可批量输入音频文件, 二选一, 优先读文件夹": "也可批量输入音频文件, 二选一, 优先读文件夹",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2",
"伴奏人声分离&去混响&去回声": "伴奏人声分离&去混响&去回声",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "保存名",
"保存的文件名, 默认空为和源文件同名": "保存的文件名, 默认空为和源文件同名",
"保存的模型名不带后缀": "保存的模型名不带后缀",
"保存频率save_every_epoch": "保存频率save_every_epoch",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果",
"修改": "修改",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "修改模型信息(仅支持weights文件夹下提取的小模型文件)",
"停止音频转换": "停止音频转换",
"全流程结束!": "全流程结束!",
"刷新音色列表和索引路径": "刷新音色列表和索引路径",
"加载模型": "加载模型",
"加载预训练底模D路径": "加载预训练底模D路径",
"加载预训练底模G路径": "加载预训练底模G路径",
"单次推理": "单次推理",
"卸载音色省显存": "卸载音色省显存",
"变调(整数, 半音数量, 升八度12降八度-12)": "变调(整数, 半音数量, 升八度12降八度-12)",
"后处理重采样至最终采样率0为不进行重采样": "后处理重采样至最终采样率0为不进行重采样",
"否": "否",
"启用相位声码器": "启用相位声码器",
"响应阈值": "响应阈值",
"响度因子": "响度因子",
"处理数据": "处理数据",
"导出Onnx模型": "导出Onnx模型",
"导出文件格式": "导出文件格式",
"常见问题解答": "常见问题解答",
"常规设置": "常规设置",
"开始音频转换": "开始音频转换",
"很遗憾您这没有能用的显卡来支持您训练": "很遗憾您这没有能用的显卡来支持您训练",
"性能设置": "性能设置",
"总训练轮数total_epoch": "总训练轮数total_epoch",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ",
"指定输出主人声文件夹": "指定输出主人声文件夹",
"指定输出文件夹": "指定输出文件夹",
"指定输出非主人声文件夹": "指定输出非主人声文件夹",
"推理时间(ms):": "推理时间(ms):",
"推理音色": "推理音色",
"提取": "提取",
"提取音高和处理数据使用的CPU进程数": "提取音高和处理数据使用的CPU进程数",
"是": "是",
"是否仅保存最新的ckpt文件以节省硬盘空间": "是否仅保存最新的ckpt文件以节省硬盘空间",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "是否在每次保存时间点将最终小模型保存至weights文件夹",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速",
"显卡信息": "显卡信息",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.",
"查看": "查看",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "查看模型信息(仅支持weights文件夹下提取的小模型文件)",
"检索特征占比": "检索特征占比",
"模型": "模型",
"模型推理": "模型推理",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况",
"模型是否带音高指导": "模型是否带音高指导",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "模型是否带音高指导(唱歌一定要, 语音可以不要)",
"模型是否带音高指导,1是0否": "模型是否带音高指导,1是0否",
"模型版本型号": "模型版本型号",
"模型融合, 可用于测试音色融合": "模型融合, 可用于测试音色融合",
"模型路径": "模型路径",
"每张显卡的batch_size": "每张显卡的batch_size",
"淡入淡出长度": "淡入淡出长度",
"版本": "版本",
"特征提取": "特征提取",
"特征检索库文件路径,为空则使用下拉的选择结果": "特征检索库文件路径,为空则使用下拉的选择结果",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ",
"目标采样率": "目标采样率",
"算法延迟(ms):": "算法延迟(ms):",
"自动检测index路径,下拉式选择(dropdown)": "自动检测index路径,下拉式选择(dropdown)",
"融合": "融合",
"要改的模型信息": "要改的模型信息",
"要置入的模型信息": "要置入的模型信息",
"训练": "训练",
"训练模型": "训练模型",
"训练特征索引": "训练特征索引",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
"请指定说话人id": "请指定说话人id",
"请选择index文件": "请选择index文件",
"请选择pth文件": "请选择pth文件",
"请选择说话人id": "请选择说话人id",
"转换": "转换",
"输入实验名": "输入实验名",
"输入待处理音频文件夹路径": "输入待处理音频文件夹路径",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)",
"输入待处理音频文件路径(默认是正确格式示例)": "输入待处理音频文件路径(默认是正确格式示例)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络",
"输入监听": "输入监听",
"输入训练文件夹路径": "输入训练文件夹路径",
"输入设备": "输入设备",
"输入降噪": "输入降噪",
"输出信息": "输出信息",
"输出变声": "输出变声",
"输出设备": "输出设备",
"输出降噪": "输出降噪",
"输出音频(右下角三个点,点了可以下载)": "输出音频(右下角三个点,点了可以下载)",
"选择.index文件": "选择.index文件",
"选择.pth文件": "选择.pth文件",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU",
"采样率:": "采样率:",
"采样长度": "采样长度",
"重载设备列表": "重载设备列表",
"音调设置": "音调设置",
"音频设备(请使用同种类驱动)": "音频设备(请使用同种类驱动)",
"音高算法": "音高算法",
"额外推理时长": "额外推理时长"
"很遗憾您这没有能用的显卡来支持您训练": "很遗憾您这没有能用的显卡来支持您训练",
"UVR5已开启": "UVR5已开启",
"UVR5已关闭": "UVR5已关闭",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.",
"0-前置数据集获取工具": "0-前置数据集获取工具",
"0a-UVR5人声伴奏分离&去混响去延迟工具": "0a-UVR5人声伴奏分离&去混响去延迟工具",
"是否开启UVR5-WebUI": "是否开启UVR5-WebUI",
"UVR5进程输出信息": "UVR5进程输出信息",
"0b-语音切分工具": "0b-语音切分工具",
".list标注文件的路径": ".list标注文件的路径",
"GPT模型列表": "GPT模型列表",
"SoVITS模型列表": "SoVITS模型列表",
"填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。": "填切割后音频所在目录!读取的音频文件完整路径=该目录-拼接-list文件里波形对应的文件名不是全路径。",
"音频自动切分输入路径,可文件可文件夹": "音频自动切分输入路径,可文件可文件夹",
"切分后的子音频的输出根目录": "切分后的子音频的输出根目录",
"怎么切": "怎么切",
"不切": "不切",
"凑四句一切": "凑四句一切",
"按英文句号.切": "按英文句号.切",
"threshold:音量小于这个值视作静音的备选切割点": "threshold:音量小于这个值视作静音的备选切割点",
"min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值": "min_length:每段最小多长,如果第一段太短一直和后面段连起来直到超过这个值",
"min_interval:最短切割间隔": "min_interval:最短切割间隔",
"hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)": "hop_size:怎么算音量曲线,越小精度越大计算量越高(不是精度越大效果越好)",
"max_sil_kept:切完后静音最多留多长": "max_sil_kept:切完后静音最多留多长",
"开启语音切割": "开启语音切割",
"终止语音切割": "终止语音切割",
"max:归一化后最大值多少": "max:归一化后最大值多少",
"alpha_mix:混多少比例归一化后音频进来": "alpha_mix:混多少比例归一化后音频进来",
"切割使用的进程数": "切割使用的进程数",
"语音切割进程输出信息": "语音切割进程输出信息",
"0c-中文批量离线ASR工具": "0c-中文批量离线ASR工具",
"开启离线批量ASR": "开启离线批量ASR",
"终止ASR进程": "终止ASR进程",
"批量ASR(中文only)输入文件夹路径": "批量ASR(中文only)输入文件夹路径",
"ASR进程输出信息": "ASR进程输出信息",
"0d-语音文本校对标注工具": "0d-语音文本校对标注工具",
"是否开启打标WebUI": "是否开启打标WebUI",
"打标数据标注文件路径": "打标数据标注文件路径",
"打标工具进程输出信息": "打标工具进程输出信息",
"1-GPT-SoVITS-TTS": "1-GPT-SoVITS-TTS",
"*实验/模型名": "*实验/模型名",
"显卡信息": "显卡信息",
"预训练的SoVITS-G模型路径": "预训练的SoVITS-G模型路径",
"预训练的SoVITS-D模型路径": "预训练的SoVITS-D模型路径",
"预训练的GPT模型路径": "预训练的GPT模型路径",
"1A-训练集格式化工具": "1A-训练集格式化工具",
"输出logs/实验名目录下应有23456开头的文件和文件夹": "输出logs/实验名目录下应有23456开头的文件和文件夹",
"*文本标注文件": "*文本标注文件",
"*训练集音频文件目录": "*训练集音频文件目录",
"训练集音频文件目录 拼接 list文件里波形对应的文件名。": "训练集音频文件目录 拼接 list文件里波形对应的文件名。",
"1Aa-文本内容": "1Aa-文本内容",
"GPU卡号以-分割,每个卡号一个进程": "GPU卡号以-分割,每个卡号一个进程",
"预训练的中文BERT模型路径": "预训练的中文BERT模型路径",
"开启文本获取": "开启文本获取",
"终止文本获取进程": "终止文本获取进程",
"文本进程输出信息": "文本进程输出信息",
"1Ab-SSL自监督特征提取": "1Ab-SSL自监督特征提取",
"预训练的SSL模型路径": "预训练的SSL模型路径",
"开启SSL提取": "开启SSL提取",
"终止SSL提取进程": "终止SSL提取进程",
"SSL进程输出信息": "SSL进程输出信息",
"1Ac-语义token提取": "1Ac-语义token提取",
"开启语义token提取": "开启语义token提取",
"终止语义token提取进程": "终止语义token提取进程",
"语义token提取进程输出信息": "语义token提取进程输出信息",
"1Aabc-训练集格式化一键三连": "1Aabc-训练集格式化一键三连",
"开启一键三连": "开启一键三连",
"终止一键三连": "终止一键三连",
"一键三连进程输出信息": "一键三连进程输出信息",
"1B-微调训练": "1B-微调训练",
"1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。": "1Ba-SoVITS训练。用于分享的模型文件输出在SoVITS_weights下。",
"每张显卡的batch_size": "每张显卡的batch_size",
"总训练轮数total_epoch不建议太高": "总训练轮数total_epoch不建议太高",
"文本模块学习率权重": "文本模块学习率权重",
"保存频率save_every_epoch": "保存频率save_every_epoch",
"是否仅保存最新的ckpt文件以节省硬盘空间": "是否仅保存最新的ckpt文件以节省硬盘空间",
"是否在每次保存时间点将最终小模型保存至weights文件夹": "是否在每次保存时间点将最终小模型保存至weights文件夹",
"开启SoVITS训练": "开启SoVITS训练",
"终止SoVITS训练": "终止SoVITS训练",
"SoVITS训练进程输出信息": "SoVITS训练进程输出信息",
"1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。": "1Bb-GPT训练。用于分享的模型文件输出在GPT_weights下。",
"总训练轮数total_epoch": "总训练轮数total_epoch",
"开启GPT训练": "开启GPT训练",
"终止GPT训练": "终止GPT训练",
"GPT训练进程输出信息": "GPT训练进程输出信息",
"1C-推理": "1C-推理",
"选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。": "选择训练完存放在SoVITS_weights和GPT_weights下的模型。默认的一个是底模体验5秒Zero Shot TTS用。",
"*GPT模型列表": "*GPT模型列表",
"*SoVITS模型列表": "*SoVITS模型列表",
"GPU卡号,只能填1个整数": "GPU卡号,只能填1个整数",
"刷新模型路径": "刷新模型路径",
"是否开启TTS推理WebUI": "是否开启TTS推理WebUI",
"TTS推理WebUI进程输出信息": "TTS推理WebUI进程输出信息",
"2-GPT-SoVITS-变声": "2-GPT-SoVITS-变声",
"施工中,请静候佳音": "施工中,请静候佳音",
"参考音频在3~10秒范围外请更换": "参考音频在3~10秒范围外请更换",
"请上传3~10秒内参考音频超过会报错": "请上传3~10秒内参考音频超过会报错",
"TTS推理进程已开启": "TTS推理进程已开启",
"TTS推理进程已关闭": "TTS推理进程已关闭",
"打标工具WebUI已开启": "打标工具WebUI已开启",
"打标工具WebUI已关闭": "打标工具WebUI已关闭",
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.": "本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. 如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录LICENSE.",
"*请上传并填写参考信息": "*请上传并填写参考信息",
"*请填写需要合成的目标文本。中英混合选中文,日英混合选日文,中日混合暂不支持,非目标语言文本自动遗弃。": "*请填写需要合成的目标文本。中英混合选中文,日英混合选日文,中日混合暂不支持,非目标语言文本自动遗弃。",
"ASR任务开启%s": "ASR任务开启%s",
"GPT训练完成": "GPT训练完成",
"GPT训练开始%s": "GPT训练开始%s",
"SSL提取进程执行中": "SSL提取进程执行中",
"SSL提取进程结束": "SSL提取进程结束",
"SoVITS训练完成": "SoVITS训练完成",
"SoVITS训练开始%s": "SoVITS训练开始%s",
"一键三连中途报错": "一键三连中途报错",
"一键三连进程结束": "一键三连进程结束",
"中文": "中文",
"凑50字一切": "凑50字一切",
"凑五句一切": "凑五句一切",
"切分后文本": "切分后文本",
"切割执行中": "切割执行中",
"切割结束": "切割结束",
"参考音频的文本": "参考音频的文本",
"参考音频的语种": "参考音频的语种",
"合成语音": "合成语音",
"后续将支持混合语种编码文本输入。": "后续将支持混合语种编码文本输入。",
"已有正在进行的ASR任务需先终止才能开启下一次任务": "已有正在进行的ASR任务需先终止才能开启下一次任务",
"已有正在进行的GPT训练任务需先终止才能开启下一次任务": "已有正在进行的GPT训练任务需先终止才能开启下一次任务",
"已有正在进行的SSL提取任务需先终止才能开启下一次任务": "已有正在进行的SSL提取任务需先终止才能开启下一次任务",
"已有正在进行的SoVITS训练任务需先终止才能开启下一次任务": "已有正在进行的SoVITS训练任务需先终止才能开启下一次任务",
"已有正在进行的一键三连任务,需先终止才能开启下一次任务": "已有正在进行的一键三连任务,需先终止才能开启下一次任务",
"已有正在进行的切割任务,需先终止才能开启下一次任务": "已有正在进行的切割任务,需先终止才能开启下一次任务",
"已有正在进行的文本任务,需先终止才能开启下一次任务": "已有正在进行的文本任务,需先终止才能开启下一次任务",
"已有正在进行的语义token提取任务需先终止才能开启下一次任务": "已有正在进行的语义token提取任务需先终止才能开启下一次任务",
"已终止ASR进程": "已终止ASR进程",
"已终止GPT训练": "已终止GPT训练",
"已终止SoVITS训练": "已终止SoVITS训练",
"已终止所有1a进程": "已终止所有1a进程",
"已终止所有1b进程": "已终止所有1b进程",
"已终止所有一键三连进程": "已终止所有一键三连进程",
"已终止所有切割进程": "已终止所有切割进程",
"已终止所有语义token进程": "已终止所有语义token进程",
"按中文句号。切": "按中文句号。切",
"文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。": "文本切分工具。太长的文本合成出来效果不一定好,所以太长建议先切。合成会根据文本的换行分开合成再拼起来。",
"文本进程执行中": "文本进程执行中",
"文本进程结束": "文本进程结束",
"日文": "日文",
"英文": "英文",
"语义token提取进程执行中": "语义token提取进程执行中",
"语义token提取进程结束": "语义token提取进程结束",
"请上传参考音频": "请上传参考音频",
"输入路径不存在": "输入路径不存在",
"输入路径存在但既不是文件也不是文件夹": "输入路径存在但既不是文件也不是文件夹",
"输出的语音": "输出的语音",
"进度1a-done": "进度1a-done",
"进度1a-done, 1b-ing": "进度1a-done, 1b-ing",
"进度1a-ing": "进度1a-ing",
"进度1a1b-done": "进度1a1b-done",
"进度1a1b-done, 1cing": "进度1a1b-done, 1cing",
"进度all-done": "进度all-done",
"需要合成的切分前文本": "需要合成的切分前文本",
"需要合成的文本": "需要合成的文本",
"需要合成的语种": "需要合成的语种",
">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音": ">=3则使用对harvest音高识别的结果使用中值滤波数值为滤波半径使用可以削弱哑音",
"A模型权重": "A模型权重",
"A模型路径": "A模型路径",
"B模型路径": "B模型路径",
"E:\\语音音频+标注\\米津玄师\\src": "E:\\语音音频+标注\\米津玄师\\src",
"F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调": "F0曲线文件, 可选, 一行一个音高, 代替默认F0及升降调",
"Index Rate": "Index Rate",
"Onnx导出": "Onnx导出",
"Onnx输出路径": "Onnx输出路径",
"RVC模型路径": "RVC模型路径",
"ckpt处理": "ckpt处理",
"harvest进程数": "harvest进程数",
"index文件路径不可包含中文": "index文件路径不可包含中文",
"pth文件路径不可包含中文": "pth文件路径不可包含中文",
"rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程": "rmvpe卡号配置以-分隔输入使用的不同进程卡号,例如0-0-1使用在卡0上跑2个进程并在卡1上跑1个进程",
"step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ": "step1: 填写实验配置. 实验数据放在logs下, 每个实验一个文件夹, 需手工输入实验名路径, 内含实验配置, 日志, 训练得到的模型文件. ",
"step1:正在处理数据": "step1:正在处理数据",
"step2:正在提取音高&正在提取特征": "step2:正在提取音高&正在提取特征",
"step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ": "step2a: 自动遍历训练文件夹下所有可解码成音频的文件并进行切片归一化, 在实验目录下生成2个wav文件夹; 暂时只支持单人训练. ",
"step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)": "step2b: 使用CPU提取音高(如果模型带音高), 使用GPU提取特征(选择卡号)",
"step3: 填写训练设置, 开始训练模型和索引": "step3: 填写训练设置, 开始训练模型和索引",
"step3a:正在训练模型": "step3a:正在训练模型",
"一键训练": "一键训练",
"也可批量输入音频文件, 二选一, 优先读文件夹": "也可批量输入音频文件, 二选一, 优先读文件夹",
"人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。": "人声伴奏分离批量处理, 使用UVR5模型。 <br>合格的文件夹路径格式举例: E:\\codes\\py39\\vits_vc_gpu\\白鹭霜华测试样例(去文件管理器地址栏拷就行了)。 <br>模型分为三类: <br>1、保留人声不带和声的音频选这个对主人声保留比HP5更好。内置HP2和HP3两个模型HP3可能轻微漏伴奏但对主人声保留比HP2稍微好一丁点 <br>2、仅保留主人声带和声的音频选这个对主人声可能有削弱。内置HP5一个模型 <br> 3、去混响、去延迟模型by FoxJoy<br>(1)MDX-Net(onnx_dereverb):对于双通道混响是最好的选择,不能去除单通道混响;<br>&emsp;(234)DeEcho:去除延迟效果。Aggressive比Normal去除得更彻底DeReverb额外去除混响可去除单声道混响但是对高频重的板式混响去不干净。<br>去混响/去延迟,附:<br>1、DeEcho-DeReverb模型的耗时是另外2个DeEcho模型的接近2倍<br>2、MDX-Net-Dereverb模型挺慢的<br>3、个人推荐的最干净的配置是先MDX-Net再DeEcho-Aggressive。",
"以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2": "以-分隔输入使用的卡号, 例如 0-1-2 使用卡0和卡1和卡2",
"伴奏人声分离&去混响&去回声": "伴奏人声分离&去混响&去回声",
"使用模型采样率": "使用模型采样率",
"使用设备采样率": "使用设备采样率",
"保存名": "保存名",
"保存的文件名, 默认空为和源文件同名": "保存的文件名, 默认空为和源文件同名",
"保存的模型名不带后缀": "保存的模型名不带后缀",
"保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果": "保护清辅音和呼吸声防止电音撕裂等artifact拉满0.5不开启,调低加大保护力度但可能降低索引效果",
"修改": "修改",
"修改模型信息(仅支持weights文件夹下提取的小模型文件)": "修改模型信息(仅支持weights文件夹下提取的小模型文件)",
"停止音频转换": "停止音频转换",
"全流程结束!": "全流程结束!",
"刷新音色列表和索引路径": "刷新音色列表和索引路径",
"加载模型": "加载模型",
"加载预训练底模D路径": "加载预训练底模D路径",
"加载预训练底模G路径": "加载预训练底模G路径",
"单次推理": "单次推理",
"卸载音色省显存": "卸载音色省显存",
"变调(整数, 半音数量, 升八度12降八度-12)": "变调(整数, 半音数量, 升八度12降八度-12)",
"后处理重采样至最终采样率0为不进行重采样": "后处理重采样至最终采样率0为不进行重采样",
"否": "否",
"启用相位声码器": "启用相位声码器",
"响应阈值": "响应阈值",
"响度因子": "响度因子",
"处理数据": "处理数据",
"导出Onnx模型": "导出Onnx模型",
"导出文件格式": "导出文件格式",
"常见问题解答": "常见问题解答",
"常规设置": "常规设置",
"开始音频转换": "开始音频转换",
"性能设置": "性能设置",
"批量推理": "批量推理",
"批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ": "批量转换, 输入待转换音频文件夹, 或上传多个音频文件, 在指定文件夹(默认opt)下输出转换的音频. ",
"指定输出主人声文件夹": "指定输出主人声文件夹",
"指定输出文件夹": "指定输出文件夹",
"指定输出非主人声文件夹": "指定输出非主人声文件夹",
"推理时间(ms):": "推理时间(ms):",
"推理音色": "推理音色",
"提取": "提取",
"提取音高和处理数据使用的CPU进程数": "提取音高和处理数据使用的CPU进程数",
"是": "是",
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速": "是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速",
"查看": "查看",
"查看模型信息(仅支持weights文件夹下提取的小模型文件)": "查看模型信息(仅支持weights文件夹下提取的小模型文件)",
"检索特征占比": "检索特征占比",
"模型": "模型",
"模型推理": "模型推理",
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况": "模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况",
"模型是否带音高指导": "模型是否带音高指导",
"模型是否带音高指导(唱歌一定要, 语音可以不要)": "模型是否带音高指导(唱歌一定要, 语音可以不要)",
"模型是否带音高指导,1是0否": "模型是否带音高指导,1是0否",
"模型版本型号": "模型版本型号",
"模型融合, 可用于测试音色融合": "模型融合, 可用于测试音色融合",
"模型路径": "模型路径",
"淡入淡出长度": "淡入淡出长度",
"版本": "版本",
"特征提取": "特征提取",
"特征检索库文件路径,为空则使用下拉的选择结果": "特征检索库文件路径,为空则使用下拉的选择结果",
"男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ": "男转女推荐+12key, 女转男推荐-12key, 如果音域爆炸导致音色失真也可以自己调整到合适音域. ",
"目标采样率": "目标采样率",
"算法延迟(ms):": "算法延迟(ms):",
"自动检测index路径,下拉式选择(dropdown)": "自动检测index路径,下拉式选择(dropdown)",
"融合": "融合",
"要改的模型信息": "要改的模型信息",
"要置入的模型信息": "要置入的模型信息",
"训练": "训练",
"训练模型": "训练模型",
"训练特征索引": "训练特征索引",
"训练结束, 您可查看控制台训练日志或实验文件夹下的train.log": "训练结束, 您可查看控制台训练日志或实验文件夹下的train.log",
"请指定说话人id": "请指定说话人id",
"请选择index文件": "请选择index文件",
"请选择pth文件": "请选择pth文件",
"请选择说话人id": "请选择说话人id",
"转换": "转换",
"输入实验名": "输入实验名",
"输入待处理音频文件夹路径": "输入待处理音频文件夹路径",
"输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)": "输入待处理音频文件夹路径(去文件管理器地址栏拷就行了)",
"输入待处理音频文件路径(默认是正确格式示例)": "输入待处理音频文件路径(默认是正确格式示例)",
"输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络": "输入源音量包络替换输出音量包络融合比例越靠近1越使用输出包络",
"输入监听": "输入监听",
"输入训练文件夹路径": "输入训练文件夹路径",
"输入设备": "输入设备",
"输入降噪": "输入降噪",
"输出信息": "输出信息",
"输出变声": "输出变声",
"输出设备": "输出设备",
"输出降噪": "输出降噪",
"输出音频(右下角三个点,点了可以下载)": "输出音频(右下角三个点,点了可以下载)",
"选择.index文件": "选择.index文件",
"选择.pth文件": "选择.pth文件",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU",
"选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU": "选择音高提取算法,输入歌声可用pm提速,harvest低音好但巨慢无比,crepe效果好但吃GPU,rmvpe效果最好且微吃GPU",
"选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU": "选择音高提取算法:输入歌声可用pm提速,高质量语音但CPU差可用dio提速,harvest质量更好但慢,rmvpe效果最好且微吃CPU/GPU",
"采样率:": "采样率:",
"采样长度": "采样长度",
"重载设备列表": "重载设备列表",
"音调设置": "音调设置",
"音频设备(请使用同种类驱动)": "音频设备(请使用同种类驱动)",
"音高算法": "音高算法",
"额外推理时长": "额外推理时长"
}

View File

@ -1,21 +1,27 @@
numpy
scipy
tensorboard
librosa==0.9.2
numba==0.56.4
pytorch-lightning
gradio==3.14.0
ffmpeg-python
onnxruntime
tqdm
funasr
cn2an
pypinyin
pyopenjtalk
g2p_en
torchaudio
modelscope
sentencepiece
transformers
chardet
PyYAML
numpy
scipy
tensorboard
librosa==0.9.2
numba==0.56.4
pytorch-lightning
gradio==3.38.0
gradio_client==0.8.1
ffmpeg-python
onnxruntime
tqdm
funasr==1.0.0
cn2an
pypinyin
pyopenjtalk
g2p_en
torchaudio
modelscope==1.10.0
sentencepiece
transformers
chardet
PyYAML
psutil
jieba_fast
jieba
LangSegment
Faster_Whisper

31
tools/asr/config.py Normal file
View File

@ -0,0 +1,31 @@
import os
def check_fw_local_models():
'''
启动时检查本地是否有 Faster Whisper 模型.
'''
model_size_list = [
"tiny", "tiny.en",
"base", "base.en",
"small", "small.en",
"medium", "medium.en",
"large", "large-v1",
"large-v2", "large-v3"]
for i, size in enumerate(model_size_list):
if os.path.exists(f'tools/asr/models/faster-whisper-{size}'):
model_size_list[i] = size + '-local'
return model_size_list
asr_dict = {
"达摩 ASR (中文)": {
'lang': ['zh'],
'size': ['large'],
'path': 'funasr_asr.py',
},
"Faster Whisper (多语种)": {
'lang': ['auto', 'zh', 'en', 'ja'],
'size': check_fw_local_models(),
'path': 'fasterwhisper_asr.py'
}
}

View File

@ -0,0 +1,107 @@
import argparse
import os
os.environ["HF_ENDPOINT"]="https://hf-mirror.com"
import traceback
import requests
from glob import glob
from faster_whisper import WhisperModel
from tqdm import tqdm
from tools.asr.config import check_fw_local_models
from tools.asr.funasr_asr import only_asr
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
language_code_list = [
"af", "am", "ar", "as", "az",
"ba", "be", "bg", "bn", "bo",
"br", "bs", "ca", "cs", "cy",
"da", "de", "el", "en", "es",
"et", "eu", "fa", "fi", "fo",
"fr", "gl", "gu", "ha", "haw",
"he", "hi", "hr", "ht", "hu",
"hy", "id", "is", "it", "ja",
"jw", "ka", "kk", "km", "kn",
"ko", "la", "lb", "ln", "lo",
"lt", "lv", "mg", "mi", "mk",
"ml", "mn", "mr", "ms", "mt",
"my", "ne", "nl", "nn", "no",
"oc", "pa", "pl", "ps", "pt",
"ro", "ru", "sa", "sd", "si",
"sk", "sl", "sn", "so", "sq",
"sr", "su", "sv", "sw", "ta",
"te", "tg", "th", "tk", "tl",
"tr", "tt", "uk", "ur", "uz",
"vi", "yi", "yo", "zh", "yue",
"auto"]
def execute_asr(input_folder, output_folder, model_size, language,precision):
if '-local' in model_size:
model_size = model_size[:-6]
model_path = f'tools/asr/models/faster-whisper-{model_size}'
else:
model_path = model_size
if language == 'auto':
language = None #不设置语种由模型自动输出概率最高的语种
print("loading faster whisper model:",model_size,model_path)
try:
model = WhisperModel(model_path, device="cuda", compute_type=precision)
except:
return print(traceback.format_exc())
output = []
output_file_name = os.path.basename(input_folder)
output_file_path = os.path.abspath(f'{output_folder}/{output_file_name}.list')
if not os.path.exists(output_folder):
os.makedirs(output_folder)
for file in tqdm(glob(os.path.join(input_folder, '**/*.wav'), recursive=True)):
try:
segments, info = model.transcribe(
audio = file,
beam_size = 5,
vad_filter = True,
vad_parameters = dict(min_silence_duration_ms=700),
language = language)
text = ''
if info.language == "zh":
print("检测为中文文本,转funasr处理")
text = only_asr(file)
if text == '':
for segment in segments:
text += segment.text
output.append(f"{file}|{output_file_name}|{info.language.upper()}|{text}")
except:
return print(traceback.format_exc())
with open(output_file_path, "w", encoding="utf-8") as f:
f.write("\n".join(output))
print(f"ASR 任务完成->标注文件路径: {output_file_path}\n")
return output_file_path
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input_folder", type=str, required=True,
help="Path to the folder containing WAV files.")
parser.add_argument("-o", "--output_folder", type=str, required=True,
help="Output folder to store transcriptions.")
parser.add_argument("-s", "--model_size", type=str, default='large-v3',
choices=check_fw_local_models(),
help="Model Size of Faster Whisper")
parser.add_argument("-l", "--language", type=str, default='ja',
choices=language_code_list,
help="Language of the audio files.")
parser.add_argument("-p", "--precision", type=str, default='float16', choices=['float16','float32'],
help="fp16 or fp32")
cmd = parser.parse_args()
output_file_path = execute_asr(
input_folder = cmd.input_folder,
output_folder = cmd.output_folder,
model_size = cmd.model_size,
language = cmd.language,
precision = cmd.precision,
)

76
tools/asr/funasr_asr.py Normal file
View File

@ -0,0 +1,76 @@
# -*- coding:utf-8 -*-
import argparse
import os
import traceback
from tqdm import tqdm
from funasr import AutoModel
path_asr = 'tools/asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch'
path_vad = 'tools/asr/models/speech_fsmn_vad_zh-cn-16k-common-pytorch'
path_punc = 'tools/asr/models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch'
path_asr = path_asr if os.path.exists(path_asr) else "iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"
path_vad = path_vad if os.path.exists(path_vad) else "iic/speech_fsmn_vad_zh-cn-16k-common-pytorch"
path_punc = path_punc if os.path.exists(path_punc) else "iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch"
model = AutoModel(
model = path_asr,
model_revision = "v2.0.4",
vad_model = path_vad,
vad_model_revision = "v2.0.4",
punc_model = path_punc,
punc_model_revision = "v2.0.4",
)
def only_asr(input_file):
try:
text = model.generate(input=input_file)[0]["text"]
except:
text = ''
print(traceback.format_exc())
return text
def execute_asr(input_folder, output_folder, model_size, language):
input_file_names = os.listdir(input_folder)
input_file_names.sort()
output = []
output_file_name = os.path.basename(input_folder)
for name in tqdm(input_file_names):
try:
text = model.generate(input="%s/%s"%(input_folder, name))[0]["text"]
output.append(f"{input_folder}/{name}|{output_file_name}|{language.upper()}|{text}")
except:
print(traceback.format_exc())
output_folder = output_folder or "output/asr_opt"
os.makedirs(output_folder, exist_ok=True)
output_file_path = os.path.abspath(f'{output_folder}/{output_file_name}.list')
with open(output_file_path, "w", encoding="utf-8") as f:
f.write("\n".join(output))
print(f"ASR 任务完成->标注文件路径: {output_file_path}\n")
return output_file_path
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input_folder", type=str, required=True,
help="Path to the folder containing WAV files.")
parser.add_argument("-o", "--output_folder", type=str, required=True,
help="Output folder to store transcriptions.")
parser.add_argument("-s", "--model_size", type=str, default='large',
help="Model Size of FunASR is Large")
parser.add_argument("-l", "--language", type=str, default='zh', choices=['zh'],
help="Language of the audio files.")
parser.add_argument("-p", "--precision", type=str, default='float16', choices=['float16','float32'],
help="fp16 or fp32")#还没接入
cmd = parser.parse_args()
execute_asr(
input_folder = cmd.input_folder,
output_folder = cmd.output_folder,
model_size = cmd.model_size,
language = cmd.language,
)

2
tools/asr/models/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -1,27 +0,0 @@
# -*- coding:utf-8 -*-
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
import sys,os,traceback
dir=sys.argv[1]
# opt_name=dir.split("\\")[-1].split("/")[-1]
opt_name=os.path.basename(dir)
inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='tools/damo_asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch',
vad_model='tools/damo_asr/models/speech_fsmn_vad_zh-cn-16k-common-pytorch',
punc_model='tools/damo_asr/models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch',
)
opt=[]
for name in os.listdir(dir):
try:
text = inference_pipeline(audio_in="%s/%s"%(dir,name))["text"]
opt.append("%s/%s|%s|ZH|%s"%(dir,name,opt_name,text))
except:
print(traceback.format_exc())
opt_dir="output/asr_opt"
os.makedirs(opt_dir,exist_ok=True)
with open("%s/%s.list"%(opt_dir,opt_name),"w",encoding="utf-8")as f:f.write("\n".join(opt))

View File

@ -1,3 +1,4 @@
import platform,os,traceback
import ffmpeg
import numpy as np
@ -7,15 +8,24 @@ def load_audio(file, sr):
# https://github.com/openai/whisper/blob/main/whisper/audio.py#L26
# This launches a subprocess to decode audio while down-mixing and resampling as necessary.
# Requires the ffmpeg CLI and `ffmpeg-python` package to be installed.
file = (
file.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
) # 防止小白拷路径头尾带了空格和"和回车
file = clean_path(file) # 防止小白拷路径头尾带了空格和"和回车
if os.path.exists(file) == False:
raise RuntimeError(
"You input a wrong audio path that does not exists, please fix it!"
)
out, _ = (
ffmpeg.input(file, threads=0)
.output("-", format="f32le", acodec="pcm_f32le", ac=1, ar=sr)
.run(cmd=["ffmpeg", "-nostdin"], capture_stdout=True, capture_stderr=True)
)
except Exception as e:
traceback.print_exc()
raise RuntimeError(f"Failed to load audio: {e}")
return np.frombuffer(out, np.float32).flatten()
def clean_path(path_str):
if platform.system() == 'Windows':
path_str = path_str.replace('/', '\\')
return path_str.strip(" ").strip('"').strip("\n").strip('"').strip(" ")

View File

@ -11,7 +11,7 @@ def slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_
if os.path.isfile(inp):
input=[inp]
elif os.path.isdir(inp):
input=["%s/%s"%(inp,name)for name in sorted(list(os.listdir(inp)))]
input=[os.path.join(inp, name) for name in sorted(list(os.listdir(inp)))]
else:
return "输入路径存在但既不是文件也不是文件夹"
slicer = Slicer(
@ -35,7 +35,7 @@ def slice(inp,opt_root,threshold,min_length,min_interval,hop_size,max_sil_kept,_
if(tmp_max>1):chunk/=tmp_max
chunk = (chunk / tmp_max * (_max * alpha)) + (1 - alpha) * chunk
wavfile.write(
"%s/%s_%s_%s.wav" % (opt_root, name, start, end),
"%s/%s_%010d_%010d.wav" % (opt_root, name, start, end),
32000,
# chunk.astype(np.float32),
(chunk * 32767).astype(np.int16),

View File

@ -79,6 +79,7 @@ def b_change_index(index, batch):
def b_next_index(index, batch):
b_save_file()
if (index + batch) <= g_max_json_index:
return index + batch , *b_change_index(index + batch, batch)
else:
@ -86,6 +87,7 @@ def b_next_index(index, batch):
def b_previous_index(index, batch):
b_save_file()
if (index - batch) >= 0:
return index - batch , *b_change_index(index - batch, batch)
else:
@ -108,6 +110,7 @@ def b_submit_change(*text_list):
def b_delete_audio(*checkbox_list):
global g_data_json, g_index, g_max_json_index
b_save_file()
change = False
for i, checkbox in reversed(list(enumerate(checkbox_list))):
if g_index + i < len(g_data_json):
@ -119,8 +122,8 @@ def b_delete_audio(*checkbox_list):
if g_index > g_max_json_index:
g_index = g_max_json_index
g_index = g_index if g_index >= 0 else 0
# if change:
# b_save_file()
if change:
b_save_file()
# return gr.Slider(value=g_index, maximum=(g_max_json_index if g_max_json_index>=0 else 0)), *b_change_index(g_index, g_batch)
return {"value":g_index,"__type__":"update","maximum":(g_max_json_index if g_max_json_index>=0 else 0)},*b_change_index(g_index, g_batch)
@ -170,6 +173,7 @@ def b_audio_split(audio_breakpoint, *checkbox_list):
def b_merge_audio(interval_r, *checkbox_list):
global g_data_json , g_max_json_index
b_save_file()
checked_index = []
audios_path = []
audios_text = []
@ -294,6 +298,7 @@ def set_global(load_json, load_list, json_key_text, json_key_path, batch):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('--load_json', default="None", help='source file, like demo.json')
parser.add_argument('--is_share', default="False", help='whether webui is_share=True')
parser.add_argument('--load_list', default="None", help='source file, like demo.list')
parser.add_argument('--webui_port_subfix', default=9871, help='source file, like demo.list')
parser.add_argument('--json_key_text', default="text", help='the text key name in json, Default: text')
@ -488,5 +493,6 @@ if __name__ == "__main__":
server_name="0.0.0.0",
inbrowser=True,
quiet=True,
share=eval(args.is_share),
server_port=int(args.webui_port_subfix)
)

View File

@ -43,8 +43,8 @@ def wave_to_spectrogram(
wave_left = np.asfortranarray(wave[0])
wave_right = np.asfortranarray(wave[1])
spec_left = librosa.stft(wave_left, n_fft, hop_length=hop_length)
spec_right = librosa.stft(wave_right, n_fft, hop_length=hop_length)
spec_left = librosa.stft(wave_left, n_fft=n_fft, hop_length=hop_length)
spec_right = librosa.stft(wave_right, n_fft=n_fft, hop_length=hop_length)
spec = np.asfortranarray([spec_left, spec_right])
@ -78,7 +78,7 @@ def wave_to_spectrogram_mt(
kwargs={"y": wave_left, "n_fft": n_fft, "hop_length": hop_length},
)
thread.start()
spec_right = librosa.stft(wave_right, n_fft, hop_length=hop_length)
spec_right = librosa.stft(wave_right, n_fft=n_fft, hop_length=hop_length)
thread.join()
spec = np.asfortranarray([spec_left, spec_right])
@ -230,27 +230,31 @@ def cache_or_load(mix_path, inst_path, mp):
if d == len(mp.param["band"]): # high-end band
X_wave[d], _ = librosa.load(
mix_path, bp["sr"], False, dtype=np.float32, res_type=bp["res_type"]
mix_path,
sr = bp["sr"],
mono = False,
dtype = np.float32,
res_type = bp["res_type"]
)
y_wave[d], _ = librosa.load(
inst_path,
bp["sr"],
False,
dtype=np.float32,
res_type=bp["res_type"],
sr = bp["sr"],
mono = False,
dtype = np.float32,
res_type = bp["res_type"],
)
else: # lower bands
X_wave[d] = librosa.resample(
X_wave[d + 1],
mp.param["band"][d + 1]["sr"],
bp["sr"],
res_type=bp["res_type"],
orig_sr = mp.param["band"][d + 1]["sr"],
target_sr = bp["sr"],
res_type = bp["res_type"],
)
y_wave[d] = librosa.resample(
y_wave[d + 1],
mp.param["band"][d + 1]["sr"],
bp["sr"],
res_type=bp["res_type"],
orig_sr = mp.param["band"][d + 1]["sr"],
target_sr = bp["sr"],
res_type = bp["res_type"],
)
X_wave[d], y_wave[d] = align_wave_head_and_tail(X_wave[d], y_wave[d])
@ -401,9 +405,9 @@ def cmb_spectrogram_to_wave(spec_m, mp, extra_bins_h=None, extra_bins=None):
mp.param["mid_side_b2"],
mp.param["reverse"],
),
bp["sr"],
sr,
res_type="sinc_fastest",
orig_sr = bp["sr"],
target_sr = sr,
res_type = "sinc_fastest",
)
else: # mid
spec_s = fft_hp_filter(spec_s, bp["hpf_start"], bp["hpf_stop"] - 1)
@ -418,8 +422,8 @@ def cmb_spectrogram_to_wave(spec_m, mp, extra_bins_h=None, extra_bins=None):
mp.param["reverse"],
),
)
# wave = librosa.core.resample(wave2, bp['sr'], sr, res_type="sinc_fastest")
wave = librosa.core.resample(wave2, bp["sr"], sr, res_type="scipy")
# wave = librosa.core.resample(wave2, orig_sr=bp['sr'], target_sr=sr, res_type="sinc_fastest")
wave = librosa.core.resample(wave2, orig_sr=bp["sr"], target_sr=sr, res_type="scipy")
return wave.T
@ -506,8 +510,8 @@ def ensembling(a, specs):
def stft(wave, nfft, hl):
wave_left = np.asfortranarray(wave[0])
wave_right = np.asfortranarray(wave[1])
spec_left = librosa.stft(wave_left, nfft, hop_length=hl)
spec_right = librosa.stft(wave_right, nfft, hop_length=hl)
spec_left = librosa.stft(wave_left, n_fft=nfft, hop_length=hl)
spec_right = librosa.stft(wave_right, n_fft=nfft, hop_length=hl)
spec = np.asfortranarray([spec_left, spec_right])
return spec
@ -569,10 +573,10 @@ if __name__ == "__main__":
if d == len(mp.param["band"]): # high-end band
wave[d], _ = librosa.load(
args.input[i],
bp["sr"],
False,
dtype=np.float32,
res_type=bp["res_type"],
sr = bp["sr"],
mono = False,
dtype = np.float32,
res_type = bp["res_type"],
)
if len(wave[d].shape) == 1: # mono to stereo
@ -580,9 +584,9 @@ if __name__ == "__main__":
else: # lower bands
wave[d] = librosa.resample(
wave[d + 1],
mp.param["band"][d + 1]["sr"],
bp["sr"],
res_type=bp["res_type"],
orig_sr = mp.param["band"][d + 1]["sr"],
target_sr = bp["sr"],
res_type = bp["res_type"],
)
spec[d] = wave_to_spectrogram(

View File

@ -24,7 +24,7 @@ def make_padding(width, cropsize, offset):
def inference(X_spec, device, model, aggressiveness, data):
"""
data dic configs
data : dic configs
"""
def _execute(

View File

@ -239,7 +239,7 @@ class Predictor:
class MDXNetDereverb:
def __init__(self, chunks, device):
def __init__(self, chunks):
self.onnx = "%s/uvr5_weights/onnx_dereverb_By_FoxJoy"%os.path.dirname(os.path.abspath(__file__))
self.shifts = 10 # 'Predict with randomised equivariant stabilisation'
self.mixing = "min_mag" # ['default','min_mag','max_mag']
@ -250,7 +250,7 @@ class MDXNetDereverb:
self.n_fft = 6144
self.denoise = True
self.pred = Predictor(self)
self.device = device
self.device = cpu
def _path_audio_(self, input, vocal_root, others_root, format, is_hp3=False):
self.pred.prediction(input, vocal_root, others_root, format)

View File

@ -61,19 +61,19 @@ class AudioPre:
_,
) = librosa.core.load( # 理论上librosa读取可能对某些音频有bug应该上ffmpeg读取但是太麻烦了弃坑
music_file,
bp["sr"],
False,
dtype=np.float32,
res_type=bp["res_type"],
sr = bp["sr"],
mono = False,
dtype = np.float32,
res_type = bp["res_type"],
)
if X_wave[d].ndim == 1:
X_wave[d] = np.asfortranarray([X_wave[d], X_wave[d]])
else: # lower bands
X_wave[d] = librosa.core.resample(
X_wave[d + 1],
self.mp.param["band"][d + 1]["sr"],
bp["sr"],
res_type=bp["res_type"],
orig_sr = self.mp.param["band"][d + 1]["sr"],
target_sr = bp["sr"],
res_type = bp["res_type"],
)
# Stft of wave source
X_spec_s[d] = spec_utils.wave_to_spectrogram_mt(
@ -110,6 +110,9 @@ class AudioPre:
y_spec_m = pred * X_phase
v_spec_m = X_spec_m - y_spec_m
if is_hp3 == True:
ins_root,vocal_root = vocal_root,ins_root
if ins_root is not None:
if self.data["high_end_process"].startswith("mirroring"):
input_high_end_ = spec_utils.mirroring(
@ -242,19 +245,19 @@ class AudioPreDeEcho:
_,
) = librosa.core.load( # 理论上librosa读取可能对某些音频有bug应该上ffmpeg读取但是太麻烦了弃坑
music_file,
bp["sr"],
False,
dtype=np.float32,
res_type=bp["res_type"],
sr = bp["sr"],
mono = False,
dtype = np.float32,
res_type = bp["res_type"],
)
if X_wave[d].ndim == 1:
X_wave[d] = np.asfortranarray([X_wave[d], X_wave[d]])
else: # lower bands
X_wave[d] = librosa.core.resample(
X_wave[d + 1],
self.mp.param["band"][d + 1]["sr"],
bp["sr"],
res_type=bp["res_type"],
orig_sr = self.mp.param["band"][d + 1]["sr"],
target_sr = bp["sr"],
res_type = bp["res_type"],
)
# Stft of wave source
X_spec_s[d] = spec_utils.wave_to_spectrogram_mt(

View File

@ -5,7 +5,8 @@ from tools.i18n.i18n import I18nAuto
i18n = I18nAuto()
logger = logging.getLogger(__name__)
import ffmpeg
import librosa,ffmpeg
import soundfile as sf
import torch
import sys
from mdxnet import MDXNetDereverb
@ -18,8 +19,9 @@ for name in os.listdir(weight_uvr5_root):
uvr5_names.append(name.replace(".pth", ""))
device=sys.argv[1]
is_half=sys.argv[2]
is_half=eval(sys.argv[2])
webui_port_uvr5=int(sys.argv[3])
is_share=eval(sys.argv[4])
def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format0):
infos = []
@ -31,25 +33,24 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
save_root_ins = (
save_root_ins.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
)
is_hp3 = "HP3" in model_name
if model_name == "onnx_dereverb_By_FoxJoy":
pre_fun = MDXNetDereverb(15, device)
pre_fun = MDXNetDereverb(15)
else:
func = AudioPre if "DeEcho" not in model_name else AudioPreDeEcho
pre_fun = func(
agg=int(agg),
model_path=os.path.join(
weight_uvr5_root, model_name + ".pth"
),
model_path=os.path.join(weight_uvr5_root, model_name + ".pth"),
device=device,
is_half=is_half,
)
is_hp3 = "HP3" in model_name
if inp_root != "":
paths = [os.path.join(inp_root, name) for name in os.listdir(inp_root)]
else:
paths = [path.name for path in paths]
for path in paths:
inp_path = os.path.join(inp_root, path)
if(os.path.isfile(inp_path)==False):continue
need_reformat = 1
done = 0
try:
@ -60,7 +61,7 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
):
need_reformat = 0
pre_fun._path_audio_(
inp_path, save_root_ins, save_root_vocal, format0, is_hp3=is_hp3
inp_path, save_root_ins, save_root_vocal, format0,is_hp3
)
done = 1
except:
@ -79,23 +80,15 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
try:
if done == 0:
pre_fun._path_audio_(
inp_path, save_root_ins, save_root_vocal, format0
inp_path, save_root_ins, save_root_vocal, format0,is_hp3
)
infos.append("%s->Success" % (os.path.basename(inp_path)))
yield "\n".join(infos)
except:
try:
if done == 0:
pre_fun._path_audio_(
inp_path, save_root_ins, save_root_vocal, format0
)
infos.append("%s->Success" % (os.path.basename(inp_path)))
yield "\n".join(infos)
except:
infos.append(
"%s->%s" % (os.path.basename(inp_path), traceback.format_exc())
)
yield "\n".join(infos)
infos.append(
"%s->%s" % (os.path.basename(inp_path), traceback.format_exc())
)
yield "\n".join(infos)
except:
infos.append(traceback.format_exc())
yield "\n".join(infos)
@ -109,16 +102,15 @@ def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format
del pre_fun
except:
traceback.print_exc()
print("clean_empty_cache")
if torch.cuda.is_available():
torch.cuda.empty_cache()
logger.info("Executed torch.cuda.empty_cache()")
yield "\n".join(infos)
with gr.Blocks(title="RVC WebUI") as app:
with gr.Blocks(title="UVR5 WebUI") as app:
gr.Markdown(
value=
"本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>."
i18n("本软件以MIT协议开源, 作者不对软件具备任何控制力, 使用软件者、传播软件导出的声音者自负全责. <br>如不认可该条款, 则不能使用或引用软件包内任何代码和文件. 详见根目录<b>LICENSE</b>.")
)
with gr.Tabs():
with gr.TabItem(i18n("伴奏人声分离&去混响&去回声")):
@ -143,7 +135,7 @@ with gr.Blocks(title="RVC WebUI") as app:
minimum=0,
maximum=20,
step=1,
label="人声提取激进程度",
label=i18n("人声提取激进程度"),
value=10,
interactive=True,
visible=False, # 先不开放调整
@ -179,6 +171,7 @@ with gr.Blocks(title="RVC WebUI") as app:
app.queue(concurrency_count=511, max_size=1022).launch(
server_name="0.0.0.0",
inbrowser=True,
server_port=9873,
share=is_share,
server_port=webui_port_uvr5,
quiet=True,
)
)

1563
webui.py

File diff suppressed because it is too large Load Diff