Update app.py
Browse files
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.
|
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
|