ensure indices are integers
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def extract_waveform_animation(audio_file, window_seconds=5):
|
|
27 |
|
28 |
def update(frame):
|
29 |
# Get current window
|
30 |
-
start = frame * (sr
|
31 |
end = start + window_length
|
32 |
window = y[start:end]
|
33 |
|
|
|
27 |
|
28 |
def update(frame):
|
29 |
# Get current window
|
30 |
+
start = frame * (sr // FPS)
|
31 |
end = start + window_length
|
32 |
window = y[start:end]
|
33 |
|