Merge branch 'dev' of github.com:litagin02/Style-Bert-VITS2
This commit is contained in:
@@ -105,6 +105,8 @@ def merge_style_usual(
|
||||
new_config = config_a.copy()
|
||||
new_config["data"]["num_styles"] = len(new_style2id)
|
||||
new_config["data"]["style2id"] = new_style2id
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
new_config["model_name"] = output_name
|
||||
save_config(new_config, output_name)
|
||||
|
||||
@@ -160,6 +162,8 @@ def merge_style_add_diff(
|
||||
new_config = config_a.copy()
|
||||
new_config["data"]["num_styles"] = len(new_style2id)
|
||||
new_config["data"]["style2id"] = new_style2id
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
new_config["model_name"] = output_name
|
||||
save_config(new_config, output_name)
|
||||
|
||||
@@ -219,6 +223,8 @@ def merge_style_weighted_sum(
|
||||
new_config = config_a.copy()
|
||||
new_config["data"]["num_styles"] = len(new_style2id)
|
||||
new_config["data"]["style2id"] = new_style2id
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
new_config["model_name"] = output_name
|
||||
save_config(new_config, output_name)
|
||||
|
||||
@@ -268,6 +274,8 @@ def merge_style_add_null(
|
||||
new_config = config_a.copy()
|
||||
new_config["data"]["num_styles"] = len(new_style2id)
|
||||
new_config["data"]["style2id"] = new_style2id
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
new_config["model_name"] = output_name
|
||||
save_config(new_config, output_name)
|
||||
|
||||
@@ -362,6 +370,8 @@ def merge_models_usual(
|
||||
new_config["model_name"] = output_name
|
||||
new_config["data"]["num_styles"] = 1
|
||||
new_config["data"]["style2id"] = {DEFAULT_STYLE: 0}
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
save_config(new_config, output_name)
|
||||
|
||||
neutral_vector_a = style_vectors_a[0]
|
||||
@@ -444,6 +454,8 @@ def merge_models_add_diff(
|
||||
new_config["model_name"] = output_name
|
||||
new_config["data"]["num_styles"] = 1
|
||||
new_config["data"]["style2id"] = {DEFAULT_STYLE: 0}
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
with open(assets_root / output_name / "config.json", "w", encoding="utf-8") as f:
|
||||
json.dump(new_config, f, indent=2, ensure_ascii=False)
|
||||
|
||||
@@ -519,6 +531,8 @@ def merge_models_weighted_sum(
|
||||
new_config["model_name"] = output_name
|
||||
new_config["data"]["num_styles"] = 1
|
||||
new_config["data"]["style2id"] = {DEFAULT_STYLE: 0}
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
with open(assets_root / output_name / "config.json", "w", encoding="utf-8") as f:
|
||||
json.dump(new_config, f, indent=2, ensure_ascii=False)
|
||||
|
||||
@@ -595,6 +609,8 @@ def merge_models_add_null(
|
||||
new_config["model_name"] = output_name
|
||||
new_config["data"]["num_styles"] = 1
|
||||
new_config["data"]["style2id"] = {DEFAULT_STYLE: 0}
|
||||
if new_config["data"]["n_speakers"] == 1:
|
||||
new_config["data"]["spk2id"] = { output_name : 0}
|
||||
with open(assets_root / output_name / "config.json", "w", encoding="utf-8") as f:
|
||||
json.dump(new_config, f, indent=2, ensure_ascii=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user