Skip to content

Instantly share code, notes, and snippets.

@Mynuddin-dev
Last active August 24, 2022 04:32
Show Gist options
  • Save Mynuddin-dev/a5c62127191b4287d204bef783478058 to your computer and use it in GitHub Desktop.
Save Mynuddin-dev/a5c62127191b4287d204bef783478058 to your computer and use it in GitHub Desktop.
sample rate convert to 48k
#!/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