We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd6eee6 commit 0724fdeCopy full SHA for 0724fde
apps/common/util/common.py
@@ -150,6 +150,7 @@ def any_to_amr(any_path, amr_path):
150
raise NotImplementedError("Not support file type: {}".format(any_path))
151
audio = AudioSegment.from_file(any_path)
152
audio = audio.set_frame_rate(8000) # only support 8000
153
+ audio = audio.set_channels(1)
154
audio.export(amr_path, format="amr")
155
return audio.duration_seconds * 1000
156
@@ -165,6 +166,7 @@ def any_to_mp3(any_path, mp3_path):
165
166
sil_to_wav(any_path, any_path)
167
any_path = mp3_path
168
169
170
audio.export(mp3_path, format="mp3")
171
172
0 commit comments