Update app.py
Browse files
app.py
CHANGED
|
@@ -26,6 +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.set_data(np.linspace(start, end, num=len(y[:end])), y[:end])
|
| 30 |
return line,
|
| 31 |
|
|
|
|
| 26 |
def update(frame):
|
| 27 |
start = frame * sr
|
| 28 |
end = min(start + sr, len(y))
|
| 29 |
+
line.set_xlim(start, end)
|
| 30 |
line.set_data(np.linspace(start, end, num=len(y[:end])), y[:end])
|
| 31 |
return line,
|
| 32 |
|