Spaces:
Running
on
A10G
Running
on
A10G
Update audio.py
Browse files
audio.py
CHANGED
@@ -61,7 +61,7 @@ def gen_audio(subtitles, tmpdir):
|
|
61 |
# tts.save(audio_path)
|
62 |
ms_tts_gen(text, audio_path)
|
63 |
|
64 |
-
audio_segment = AudioSegment.
|
65 |
|
66 |
new_audio_path = os.path.join(temp_audio_path, f'subtitle_{i}_adjusted.wav')
|
67 |
audio_segment.export(new_audio_path, format="wav")
|
|
|
61 |
# tts.save(audio_path)
|
62 |
ms_tts_gen(text, audio_path)
|
63 |
|
64 |
+
audio_segment = AudioSegment.from_wav(audio_path)
|
65 |
|
66 |
new_audio_path = os.path.join(temp_audio_path, f'subtitle_{i}_adjusted.wav')
|
67 |
audio_segment.export(new_audio_path, format="wav")
|