Skip to content

Commit b282996

Browse files
committed
fix: remove audio channels
1 parent 0724fde commit b282996

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

apps/common/util/common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def any_to_amr(any_path, amr_path):
150150
raise NotImplementedError("Not support file type: {}".format(any_path))
151151
audio = AudioSegment.from_file(any_path)
152152
audio = audio.set_frame_rate(8000) # only support 8000
153-
audio = audio.set_channels(1)
154153
audio.export(amr_path, format="amr")
155154
return audio.duration_seconds * 1000
156155

@@ -166,7 +165,6 @@ def any_to_mp3(any_path, mp3_path):
166165
sil_to_wav(any_path, any_path)
167166
any_path = mp3_path
168167
audio = AudioSegment.from_file(any_path)
169-
audio = audio.set_channels(1)
170168
audio.export(mp3_path, format="mp3")
171169

172170

0 commit comments

Comments
 (0)