Spaces:
Running
Running
kevinwang676
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -227,7 +227,7 @@ def convert(start_time, song_name_src, song_name_ref, src_audio, ref_audio, chec
|
|
227 |
else:
|
228 |
src_audio_orig = AudioSegment.from_file(src_audio)
|
229 |
if len(src_audio_orig) > 45000:
|
230 |
-
segment =
|
231 |
segment.export("segment.wav", format="wav")
|
232 |
multi_channel_audio = AudioSegment.from_file("segment.wav", format="wav")
|
233 |
mono_audio = multi_channel_audio.set_channels(1)
|
|
|
227 |
else:
|
228 |
src_audio_orig = AudioSegment.from_file(src_audio)
|
229 |
if len(src_audio_orig) > 45000:
|
230 |
+
segment = src_audio_orig[0:45000]
|
231 |
segment.export("segment.wav", format="wav")
|
232 |
multi_channel_audio = AudioSegment.from_file("segment.wav", format="wav")
|
233 |
mono_audio = multi_channel_audio.set_channels(1)
|