fix: fix audio frame rate

This commit is contained in:
wxg0103 2024-12-23 10:30:13 +08:00 committed by wxg
parent a00af1e288
commit f9548dd7f2

View File

@ -179,6 +179,7 @@ def any_to_mp3(any_path, mp3_path):
sil_to_wav(any_path, any_path)
any_path = mp3_path
audio = AudioSegment.from_file(any_path)
audio = audio.set_frame_rate(16000)
audio.export(mp3_path, format="mp3")