czyoung commited on
Commit
699e931
·
verified ·
1 Parent(s): e1cef83

Update sonogram_utility.py

Browse files
Files changed (1) hide show
  1. sonogram_utility.py +1 -1
sonogram_utility.py CHANGED
@@ -126,7 +126,7 @@ def audioNormalize(waveform,sampleRate,stepSizeInSeconds = 2,dbThreshold = -50,d
126
  print("Waveform copy made")
127
  transform = torchaudio.transforms.AmplitudeToDB(stype="amplitude", top_db=80)
128
  currStart = 0
129
- currEnd = int(min(currStart + stepSizeInSeconds * sampleRate, len(copyWaveform_db[0])-1))
130
  done = False
131
  while(not done):
132
  copyWaveform_db = waveform[:,currStart:currEnd].clone().detach()
 
126
  print("Waveform copy made")
127
  transform = torchaudio.transforms.AmplitudeToDB(stype="amplitude", top_db=80)
128
  currStart = 0
129
+ currEnd = int(min(currStart + stepSizeInSeconds * sampleRate, len(copyWaveform[0])-1))
130
  done = False
131
  while(not done):
132
  copyWaveform_db = waveform[:,currStart:currEnd].clone().detach()