Skip to content

Commit

Permalink
use seek_step var to judge if it is continuous when detect_silence
Browse files Browse the repository at this point in the history
Signed-off-by: KarlZheng <zhengkarl@gmail.com>
  • Loading branch information
KarlZheng committed Mar 22, 2018
1 parent 0f920bb commit 5042cd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydub/silence.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def detect_silence(audio_segment, min_silence_len=1000, silence_thresh=-16, seek
current_range_start = prev_i

for silence_start_i in silence_starts:
continuous = (silence_start_i == prev_i + 1)
continuous = (silence_start_i == prev_i + seek_step)

# sometimes two small blips are enough for one particular slice to be
# non-silent, despite the silence all running together. Just combine
Expand Down

0 comments on commit 5042cd0

Please sign in to comment.