Bulk Convert Batch file for converting Ulaw to Alaw


: Gerard O'Rourke
: Michael Brophy
: Version 1.1

@echo off
cls

set confirm=N
echo ***************************
echo Audio ALAW Converting tool
echo ***************************
echo The sox.exe must be located in the current folder or on the OS PATH.
echo Download sox from http://sox.sourceforge.net/
echo ******************************************************************
echo. 
set /P confirm=Do you want to proceed and overwrite and convert existing.wav files from ulaw to alaw(Y/N)?

IF "%confirm%" == "Y" goto convert
IF "%confirm%" == "y" goto convert
goto noconvert


:convert
echo Converting files now.
echo please wait.....
echo.
FOR /R . %%i IN ("*.wav") DO (
sox "%%i" -r 8k -c 1 -e a-law "%%~pni-temp.wav"
move "%%~pni-temp.wav" "%%~pni.wav"
)

pause
exit

:noconvert
echo No converation took place
pause
exit
: Gerard O'Rourke
: Michael Brophy
: Version 1.1

@echo off
cls

set confirm=N
echo ***************************
echo Audio ALAW Converting tool
echo ***************************
echo The sox.exe must be located in the current folder or on the OS PATH.
echo Download sox from http://sox.sourceforge.net/
echo ******************************************************************
echo. 
set /P confirm=Do you want to proceed and overwrite and convert existing.wav files from ulaw to alaw(Y/N)?

IF "%confirm%" == "Y" goto convert
IF "%confirm%" == "y" goto convert
goto noconvert


:convert
echo Converting files now.
echo please wait.....
echo.
FOR /R . %%i IN ("*.wav") DO (
sox "%%i" -r 8k -c 1 -e a-law "%%~pni-alaw.wav"
)

pause
exit

:noconvert
echo No converation took place
pause
exit

sox-14.4.2-win32.zip

  • tech-notes/scripts/convert-ulaw-to-alaw.txt
  • Last modified: 2018/05/27 10:01
  • by 66.249.64.158