Refactor: moved the module for extracting BERT features from text in each language to style_bert_vits2/text_processing/(language)/bert_feature.py

This commit is contained in:
tsukumi
2024-03-07 03:32:07 +00:00
parent c3c0dd8b32
commit 62919e904e
16 changed files with 172 additions and 101 deletions

3
app.py
View File

@@ -10,6 +10,7 @@ import gradio as gr
import torch
import yaml
from common.tts_model import ModelHolder
from style_bert_vits2.constants import (
DEFAULT_ASSIST_TEXT_WEIGHT,
DEFAULT_LENGTH,
@@ -25,11 +26,11 @@ from style_bert_vits2.constants import (
Languages,
)
from style_bert_vits2.logging import logger
from common.tts_model import ModelHolder
from style_bert_vits2.models.infer import InvalidToneError
from style_bert_vits2.text_processing.japanese.g2p_utils import g2kata_tone, kata_tone2phone_tone
from style_bert_vits2.text_processing.japanese.normalizer import normalize_text
# Get path settings
with open(os.path.join("configs", "paths.yml"), "r", encoding="utf-8") as f:
path_config: dict[str, str] = yaml.safe_load(f.read())