Add Identify speakers option: AI infers names and replaces Speaker IDs in transcript
This commit is contained in:
@@ -135,6 +135,12 @@ def create_app():
|
||||
label="Task",
|
||||
)
|
||||
|
||||
identify_speakers = gr.Checkbox(
|
||||
label="Identify speakers (best effort using AI)",
|
||||
value=False,
|
||||
info="If enabled, AI will attempt to infer real names for speakers and replace Speaker 1/2/etc. in the transcript."
|
||||
)
|
||||
|
||||
with gr.Row():
|
||||
language_input = gr.Textbox(
|
||||
label="Language (optional)",
|
||||
@@ -188,6 +194,7 @@ def create_app():
|
||||
num_speakers,
|
||||
email_to_val,
|
||||
email_cc_val,
|
||||
identify_speakers_val,
|
||||
):
|
||||
if not audio:
|
||||
return "Please upload or record audio."
|
||||
@@ -225,6 +232,7 @@ def create_app():
|
||||
email_to=email_to_val,
|
||||
email_cc=email_cc_val or None,
|
||||
include_summary=(task == "transcript_and_summarize"),
|
||||
identify_speakers=bool(identify_speakers_val),
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error("Error enqueuing job: %s", e)
|
||||
@@ -247,6 +255,7 @@ def create_app():
|
||||
num_speakers_input,
|
||||
email_to,
|
||||
email_cc,
|
||||
identify_speakers,
|
||||
],
|
||||
outputs=[status_text],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user