app: remove no-op w_phi slider
Browse files
app.py
CHANGED
|
@@ -212,7 +212,7 @@ def _resolve_g2p(g2p_choice, lang_choice):
|
|
| 212 |
OUTPUTS_NONE = (None, None, None, None, None) # 5 None for the non-status outputs
|
| 213 |
|
| 214 |
def run_alignment(audio_file, annotation_file, ckpt_upload, mode, lang,
|
| 215 |
-
pretrained_choice,
|
| 216 |
lang_choice="English (default)",
|
| 217 |
progress=gr.Progress(track_tqdm=True)):
|
| 218 |
if not audio_file or not annotation_file:
|
|
@@ -323,7 +323,7 @@ def run_alignment(audio_file, annotation_file, ckpt_upload, mode, lang,
|
|
| 323 |
pred_bound, _truth_bound, mapped_ph = main_predict(
|
| 324 |
wav=wav_path,
|
| 325 |
ckpt=ckpt_to_use,
|
| 326 |
-
w_phi=
|
| 327 |
language=language,
|
| 328 |
annotation=ann_ext,
|
| 329 |
)
|
|
@@ -480,8 +480,6 @@ with gr.Blocks(title="FALCON Forced Aligner", theme=gr.themes.Soft()) as demo:
|
|
| 480 |
)
|
| 481 |
ckpt_in = gr.File(label="Or upload a custom checkpoint (.pt) — overrides pretrained",
|
| 482 |
file_types=[".pt"], type="filepath")
|
| 483 |
-
wphi_in = gr.Slider(0.0, 1.0, value=0.5, step=0.01,
|
| 484 |
-
label="φ weight (acoustic ↔ linguistic)")
|
| 485 |
btn = gr.Button("Run Alignment", variant="primary")
|
| 486 |
status = gr.Textbox(label="Status", interactive=False)
|
| 487 |
|
|
@@ -510,7 +508,7 @@ with gr.Blocks(title="FALCON Forced Aligner", theme=gr.themes.Soft()) as demo:
|
|
| 510 |
|
| 511 |
btn.click(
|
| 512 |
fn=run_alignment,
|
| 513 |
-
inputs=[audio_in, ann_in, ckpt_in, mode_in, lang_in, pretrained_in,
|
| 514 |
g2p_in, lang_g2p_in],
|
| 515 |
outputs=[status, audio_out, img_panels,
|
| 516 |
tg_out, table_phn_out, table_orig_out],
|
|
|
|
| 212 |
OUTPUTS_NONE = (None, None, None, None, None) # 5 None for the non-status outputs
|
| 213 |
|
| 214 |
def run_alignment(audio_file, annotation_file, ckpt_upload, mode, lang,
|
| 215 |
+
pretrained_choice, g2p_choice="Auto (recommended)",
|
| 216 |
lang_choice="English (default)",
|
| 217 |
progress=gr.Progress(track_tqdm=True)):
|
| 218 |
if not audio_file or not annotation_file:
|
|
|
|
| 323 |
pred_bound, _truth_bound, mapped_ph = main_predict(
|
| 324 |
wav=wav_path,
|
| 325 |
ckpt=ckpt_to_use,
|
| 326 |
+
w_phi=0.5, # placeholder; the model uses its own learned w_phi at inference
|
| 327 |
language=language,
|
| 328 |
annotation=ann_ext,
|
| 329 |
)
|
|
|
|
| 480 |
)
|
| 481 |
ckpt_in = gr.File(label="Or upload a custom checkpoint (.pt) — overrides pretrained",
|
| 482 |
file_types=[".pt"], type="filepath")
|
|
|
|
|
|
|
| 483 |
btn = gr.Button("Run Alignment", variant="primary")
|
| 484 |
status = gr.Textbox(label="Status", interactive=False)
|
| 485 |
|
|
|
|
| 508 |
|
| 509 |
btn.click(
|
| 510 |
fn=run_alignment,
|
| 511 |
+
inputs=[audio_in, ann_in, ckpt_in, mode_in, lang_in, pretrained_in,
|
| 512 |
g2p_in, lang_g2p_in],
|
| 513 |
outputs=[status, audio_out, img_panels,
|
| 514 |
tg_out, table_phn_out, table_orig_out],
|