From 0b3f737e5b4cf25ad41c1a637204a30c20707871 Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 16 Jun 2026 15:49:39 +0000 Subject: [PATCH] Update speaker identification to use real names or roles instead of random names --- scraibe/tasks.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/scraibe/tasks.py b/scraibe/tasks.py index e9d88e2..610b186 100644 --- a/scraibe/tasks.py +++ b/scraibe/tasks.py @@ -328,13 +328,18 @@ def process_transcription_task( prompt = ( "Below is a transcript with speaker labels like 'SPEAKER 1', 'SPEAKER 2', etc. " - "Based on how they speak and the context, suggest realistic names for each speaker. " - "Do not add extra commentary. Output ONLY a mapping in this exact format, one per line:\n" - "SPEAKER 1: Suggested Name\n" - "SPEAKER 2: Suggested Name\n" - "SPEAKER 3: Suggested Name\n" - "\n" - "Transcript:\n" + "Based on the context and how each speaker talks, identify each speaker as: +" "- Their real name, if it is clearly mentioned or strongly implied, OR +" "- A concise role/position (e.g., Judge, Doctor, Manager, Interviewer, Client, Witness), " + "if their identity is not clear. +" "Do not invent random personal names. " + "Do not add extra commentary. Output ONLY a mapping in this exact format, one per line: +" "SPEAKER 1: Name or Role +" "SPEAKER 2: Name or Role +" "SPEAKER 3: Name or Role +" "\n" + "Transcript: +" + transcript_text )