Spaces:
Runtime error
Runtime error
small fix
Browse files
app.py
CHANGED
@@ -24,6 +24,7 @@ def divide_into_30s_segments(audio_fpath):
|
|
24 |
segment_start_times = []
|
25 |
|
26 |
for i in range(n_full_segments + 1):
|
|
|
27 |
|
28 |
# Skip last segment if it is smaller than two seconds
|
29 |
is_last_segment = i == n_full_segments
|
@@ -34,7 +35,6 @@ def divide_into_30s_segments(audio_fpath):
|
|
34 |
else:
|
35 |
end = (i + 1) * 30
|
36 |
|
37 |
-
start = i * 30
|
38 |
segment_path = os.path.join("segmented_audios", f"segment_{i}.wav")
|
39 |
segment = sound.subclip(start, end)
|
40 |
segment.write_audiofile(segment_path)
|
|
|
24 |
segment_start_times = []
|
25 |
|
26 |
for i in range(n_full_segments + 1):
|
27 |
+
start = i * 30
|
28 |
|
29 |
# Skip last segment if it is smaller than two seconds
|
30 |
is_last_segment = i == n_full_segments
|
|
|
35 |
else:
|
36 |
end = (i + 1) * 30
|
37 |
|
|
|
38 |
segment_path = os.path.join("segmented_audios", f"segment_{i}.wav")
|
39 |
segment = sound.subclip(start, end)
|
40 |
segment.write_audiofile(segment_path)
|