Duplicate sentences with large-v3
Hi,
I see duplicate sentences when using large-v3, the issue can be reproduced no matter I set condition_on_previous_text to True or False, any suggestion on how to fix it?
Here's the codes
```
def transcribe_audio(audio_file, beam_size=5, vad_filter=True):
"""Transcribe audio using Faster-Whisper"""
print(f"Transcribing: {audio_file}")
start_time = time.time() # 新增:记录开始时间
segments, info = whisper_model.transcribe(
audio_file,
beam_size=5,
language=LANGUAGE,
vad_filter=True,
word_timestamps=True,
condition_on_previous_text=False,
vad_parameters=dict(min_silence_duration_ms=200),
)
segments = list(segments)
transcribe_time = time.time() - start_time # 新增:计算耗时
print(f"Language: {info.language} (probability: {info.language_probability:.2f})")
print(f"Segments: {len(segments)}")
print(f"Transcription time: {transcribe_time:.2f}s") # 新增:打印耗时
return segments, info, transcribe_time # 修改:返回值增加 transcribe_time
```
The segments output
```
TRANSCRIPTION WITH SPEAKER DIARIZATION
================================================================================
[18.62s -> 22.83s] SPEAKER_2
莫子缓缓地说道
[23.52s -> 25.68s] SPEAKER_4
恒济原将继续
[26.90s -> 29.32s] SPEAKER_4
宇宙是一台机器
[29.32s -> 33.40s] SPEAKER_4
我造出了这台机器
[33.98s -> 36.84s] SPEAKER_4
恒纪元将继续
[38.22s -> 40.82s] SPEAKER_4
宇宙是一台机器
[40.82s -> 45.02s] SPEAKER_4
我造出了这台机器
```
It is not caused by speaker diarization as I print the segments before invoking speaker diarization
关闭于 2026-01-14 0 条评论