Last active
August 24, 2022 04:32
-
-
Save Mynuddin-dev/a5c62127191b4287d204bef783478058 to your computer and use it in GitHub Desktop.
sample rate convert to 48k
This file contains 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
#!/usr/bin/bash | |
files=$(ls *.wav) | |
for file in $files;do | |
filename=$(echo $file | cut -d "." -f 1) | |
sox "$file" -r 48000 $filename{48000}.wav | |
done | |
``` | |
#!/bin/bash | |
mkdir output | |
#shopt -s nocaseglob | |
for i in *.wav; | |
do | |
echo "$i" | |
ffmpeg -y -i "$i" -c:a pcm_s16le -ar 22050 "output/${i%.*}.wav"; | |
done | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment