marquesafonso commited on
Commit
97b9ffc
·
verified ·
1 Parent(s): 80a188b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -26,6 +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_data(np.linspace(start, end, num=len(y[:end])), y[:end])
30
  return line,
31
 
 
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