Skip to content

Commit 76d1fe6

Browse files
authored
Merge pull request #1168 from IAHispano/formatter/main
chore(format): run black on main
2 parents ff8e09f + 543e9ec commit 76d1fe6

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

tabs/realtime/realtime.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
custom_embedder_root_relative = os.path.relpath(custom_embedder_root, now_dir)
3030
model_root_relative = os.path.relpath(model_root, now_dir)
3131

32+
3233
def normalize_path(p):
3334
return os.path.normpath(p).replace("\\", "/").lower()
3435

36+
3537
MODEL_FOLDER = re.compile(r"^(?:model.{0,4}|mdl(?:s)?|weight.{0,4}|zip(?:s)?)$")
3638
INDEX_FOLDER = re.compile(r"^(?:ind.{0,4}|idx(?:s)?)$")
3739

@@ -205,6 +207,7 @@ def match_index(model_file_value):
205207

206208
return ""
207209

210+
208211
def extract_model_and_epoch(path):
209212
base_name = os.path.basename(path)
210213
match = re.match(r"(.+?)_(\d+)e_", base_name)
@@ -264,6 +267,7 @@ def refresh_embedders_folders():
264267
]
265268
return custom_embedders
266269

270+
267271
names = get_files("model")
268272
default_weight = names[0] if names else None
269273

@@ -274,6 +278,7 @@ def refresh_embedders_folders():
274278

275279
CONFIG_PATH = os.path.join(now_dir, "assets", "config.json")
276280

281+
277282
def save_realtime_settings(
278283
input_device, output_device, monitor_device, model_file, index_file
279284
):
@@ -966,8 +971,6 @@ def toggle_visible_embedder_custom(embedder_model):
966971
return {"visible": True, "__type__": "update"}
967972
return {"visible": False, "__type__": "update"}
968973

969-
970-
971974
refresh_devices_button.click(
972975
fn=refresh_devices,
973976
outputs=[input_audio_device, output_audio_device, monitor_output_device],
@@ -1126,4 +1129,4 @@ def refresh_all():
11261129
output_audio_device,
11271130
monitor_output_device,
11281131
],
1129-
)
1132+
)

tabs/train/train.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,10 @@ def train_tab():
524524
"Pitch extraction algorithm to use for the audio conversion. The default algorithm is rmvpe, which is recommended for most cases."
525525
),
526526
choices=[
527-
"crepe",
528-
"crepe-tiny",
529-
"rmvpe",
530-
#"fcpe"
527+
"crepe",
528+
"crepe-tiny",
529+
"rmvpe",
530+
# "fcpe"
531531
],
532532
value="rmvpe",
533533
interactive=True,
@@ -538,11 +538,11 @@ def train_tab():
538538
info=i18n("Model used for learning speaker embedding."),
539539
choices=[
540540
"contentvec",
541-
#"spin",
541+
# "spin",
542542
"spin-v2",
543-
#"chinese-hubert-base",
544-
#"japanese-hubert-base",
545-
#"korean-hubert-base",
543+
# "chinese-hubert-base",
544+
# "japanese-hubert-base",
545+
# "korean-hubert-base",
546546
"custom",
547547
],
548548
value="contentvec",

0 commit comments

Comments
 (0)