marquesafonso commited on
Commit
bdb2fa6
·
verified ·
1 Parent(s): 55b818b

reset fps to 1 + change bg_color in fig

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def extract_waveform_animation(audio_file, window_seconds=5):
18
  first_window = y[:window_length]
19
  x_vals = np.linspace(0, duration, num=len(y))
20
  ax.set_axis_off()
21
- ax.set_facecolor("black")
22
 
23
  def init():
24
  ax.set_xlim(0, window_seconds)
@@ -43,7 +43,7 @@ def extract_waveform_animation(audio_file, window_seconds=5):
43
  init_func=init, interval=7, blit=False)
44
 
45
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile:
46
- ani.save(tmpfile.name, writer='ffmpeg', fps=30)
47
  video_path = tmpfile.name
48
 
49
  return video_path
 
18
  first_window = y[:window_length]
19
  x_vals = np.linspace(0, duration, num=len(y))
20
  ax.set_axis_off()
21
+ fig.set_facecolor("black")
22
 
23
  def init():
24
  ax.set_xlim(0, window_seconds)
 
43
  init_func=init, interval=7, blit=False)
44
 
45
  with tempfile.NamedTemporaryFile(delete=False, suffix='.mp4') as tmpfile:
46
+ ani.save(tmpfile.name, writer='ffmpeg', fps=1)
47
  video_path = tmpfile.name
48
 
49
  return video_path