Check multiple prompts
This commit is contained in:
@@ -363,7 +363,8 @@ def transcribe(
|
||||
for i, segment in enumerate(current_segments, start=len(all_segments)):
|
||||
if not segment['text'].strip():
|
||||
continue
|
||||
if len(all_prompts_segments) > 0 and all_prompts_segments[-1]['text'].strip() == segment['text'].strip():
|
||||
check_prompt_num = 1
|
||||
if any([prev['text'].strip() == segment['text'].strip() for prev in all_prompts_segments[-check_prompt_num:]]):
|
||||
continue
|
||||
all_prompts_tokens.extend(segment['tokens'])
|
||||
all_prompts_segments.append({"id": i, **segment})
|
||||
|
||||
Reference in New Issue
Block a user