Created
July 23, 2023 01:00
-
-
Save jimmsta/bfd0f61128e6b221342429c79ff811ab to your computer and use it in GitHub Desktop.
FreePBX sound file converter cmd script for a folder of wav files - requires ffmpeg in the path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setlocal | |
@echo off | |
############### | |
# version 2.0 | |
# resamples and converts audio files to mono, saves as intermediate wave | |
# then converts to ulaw. | |
# for FreePBX-based PBX software | |
# intended for Asterisk 19+ | |
############### | |
mkdir intermediates | |
mkdir ulaw | |
for %%f in (*.wav) do ( | |
ffmpeg -i "%%f" -ac 1 -ar 8000 "intermediates/%%~nf.wav" | |
) | |
echo press key to contine generating uLaw files | |
for %%f in (intermediates/*.wav) do ( | |
ffmpeg -i "%%f" -f mulaw "ulaw/%%~nf.ulaw" | |
) | |
echo Press any key to verify that files were generated | |
dir intermediates | |
dir ulaw | |
pause check that files have been generated and press any key to exit. | |
endlocal | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment