音频文件格式必须得是wav而不能是WAV
miaowmint opened this issue · 2 comments
miaowmint commented
RT,
我用剪映转码后的wav文件默认后缀是WAV,运行切割的时候不报错也没输出,给我弄蒙了
最后看视频仔细对比才发现是后缀大小写的锅= =
txfs19260817 commented
https://github.com/AliceNavigator/Alice_split_toolset/blob/main/split.py#L35
这一行可以用.from_file
例如:
file_extension = os.path.splitext(wav_path)[-1][1:]
audio = AudioSegment.from_file(wav_path, file_extension)
opened PR: #5