This commit is contained in:
erogol 2020-03-27 14:17:03 +01:00
parent d5efe040f7
commit a678d684a2
1 changed files with 2 additions and 1 deletions

View File

@ -278,8 +278,9 @@ class AudioProcessor(object):
if pad_sides == 1: if pad_sides == 1:
return 0, pad return 0, pad
else: else:
return pad // 2, pad // 2 + pad % 2Processing ### return pad // 2, pad // 2 + pad % 2
### Audio Processing ###
def find_endpoint(self, wav, threshold_db=-40, min_silence_sec=0.8): def find_endpoint(self, wav, threshold_db=-40, min_silence_sec=0.8):
window_length = int(self.sample_rate * min_silence_sec) window_length = int(self.sample_rate * min_silence_sec)
hop_length = int(window_length / 4) hop_length = int(window_length / 4)