Skip to content

Commit

Permalink
Remove duplicate code (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonlight authored Jul 18, 2023
1 parent 171d90d commit 687db31
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,6 @@ def add_word_timestamps(
# hack: truncate long words at sentence boundaries.
# a better segmentation algorithm based on VAD should be able to replace this.
if len(word_durations) > 0:
median_duration = np.median(word_durations)
max_duration = median_duration * 2
sentence_end_marks = ".。!!??"
# ensure words at sentence boundaries
# are not longer than twice the median word duration.
Expand Down

0 comments on commit 687db31

Please sign in to comment.