借助工具sox,可以批量将wav文件转为raw文件。
@echo off
set work_path=recordings
set raw_path=raw
SET mypath=%~dp0
mkdir %raw_path%
set log_file=extract_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%.log
echo ============ the start time is %TIME:~0,2:%%TIME:~3,2:%%TIME:~6,2%======================== > %log_file%
for %%w in (%work_path%\*.wav) do (
echo processing %mypath%%%w
C:\Users\dell\Desktop\sox.exe.lnk %mypath%%%w -b 16 -e signed-integer -c 1 -r 8k %mypath%%raw_path%\%%~nw.raw
)
pause