marquesafonso commited on
Commit
5d9f56e
·
verified ·
1 Parent(s): 97b9ffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -26,8 +26,7 @@ def extract_waveform_animation(audio_file):
26
  def update(frame):
27
  start = frame * sr
28
  end = min(start + sr, len(y))
29
- line.set_xlim(start, end)
30
- line.set_data(np.linspace(start, end, num=len(y[:end])), y[:end])
31
  return line,
32
 
33
  # Create the animation
 
26
  def update(frame):
27
  start = frame * sr
28
  end = min(start + sr, len(y))
29
+ line.set_data(np.linspace(0, duration, num=len(y[:end])), y[:end])
 
30
  return line,
31
 
32
  # Create the animation