Update app.py
Browse files
app.py
CHANGED
@@ -12,16 +12,14 @@ def extract_waveform_animation(audio_file, window_seconds=5):
|
|
12 |
duration = librosa.get_duration(y=y, sr=sr)
|
13 |
FPS = 1
|
14 |
fig, ax = plt.subplots()
|
15 |
-
line, = ax.plot([], [], lw=2)
|
16 |
window_length = int(window_seconds * sr)
|
17 |
|
18 |
# Initialize with first window
|
19 |
first_window = y[:window_length]
|
20 |
x_vals = np.linspace(0, duration, num=len(y))
|
21 |
ax.set_axis_off()
|
22 |
-
waveform_color =(0.0,0.129,0.894,1.0)
|
23 |
bg_color ="#00FFFF00"
|
24 |
-
ax.set_facecolor(waveform_color)
|
25 |
fig.set_facecolor(bg_color)
|
26 |
|
27 |
def init():
|
|
|
12 |
duration = librosa.get_duration(y=y, sr=sr)
|
13 |
FPS = 1
|
14 |
fig, ax = plt.subplots()
|
15 |
+
line, = ax.plot([], [], lw=2, color="#0021e4")
|
16 |
window_length = int(window_seconds * sr)
|
17 |
|
18 |
# Initialize with first window
|
19 |
first_window = y[:window_length]
|
20 |
x_vals = np.linspace(0, duration, num=len(y))
|
21 |
ax.set_axis_off()
|
|
|
22 |
bg_color ="#00FFFF00"
|
|
|
23 |
fig.set_facecolor(bg_color)
|
24 |
|
25 |
def init():
|