marquesafonso commited on
Commit
26e9031
·
verified ·
1 Parent(s): 80a9f21

retry fps issue 2

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def extract_waveform_animation(audio_file, window_seconds=5):
40
 
41
  total_frames = int(duration) * FPS
42
  ani = FuncAnimation(fig, update, frames=range(total_frames),
43
- init_func=init, interval=window_seconds, blit=False)
44
 
45
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile:
46
  ani.save(tmpfile.name, writer='ffmpeg', fps=FPS)
 
40
 
41
  total_frames = int(duration) * FPS
42
  ani = FuncAnimation(fig, update, frames=range(total_frames),
43
+ init_func=init, interval=window_seconds // FPS, blit=False)
44
 
45
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile:
46
  ani.save(tmpfile.name, writer='ffmpeg', fps=FPS)