gpt4 book ai didi

audio - 将大量 wav 文件拆分为小部分

转载 作者:行者123 更新时间:2023-12-03 01:48:22 24 4
gpt4 key购买 nike

我有大量 wav 文件(超过 50 000 个),我需要将每个 wav 文件拆分为 10 秒长的部分。几乎不可能一一做到,所以我的问题是:有没有办法在 ffmpeg 或例如在 sox 中做到这一点?我是业余爱好者,所以我需要确切的指示。如果可以的话,请像写假人一样写:)...(我是 Windows 7 用户)

Here is my try with sox

谢谢!

最佳答案

几天前我有完全相同的任务。我更喜欢在 Linux 操作系统机器上做,但我必须在 Windows 机器上做一些演示,所以我使用 SoX 编写了这个批处理文件:

@ECHO OFF

rem Author: PetarF, 2017-07-01, v0.1
rem
rem Example of how to do batch processing with SoX on MS-Windows.
rem In this example, for every .wav file in folder the splited .wav file ends up in a folder called as original file without extension
rem In my case, this file has to be run as administrator
rem
rem USAGE:
rem Place this file in the same folder as sox.exe (& rename it as appropriate).
rem Place .wav files that has to be splited in same folder as sox.exe

ECHO Split started
cd %~dp0
for %%A in (*.wav) do (
mkdir %%~nA
sox %%A %%~nA/%%~nA_.wav trim 0 10 : newfile : restart
echo Created folder %%~nA with splited files
)
echo SoX has splited files...
pause

关于audio - 将大量 wav 文件拆分为小部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41808251/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com