Skip to content

Instantly share code, notes, and snippets.

@jcopps
Created February 11, 2023 07:18
Show Gist options
  • Save jcopps/f238f0dcfa358cf8da63a5db6ab03080 to your computer and use it in GitHub Desktop.
Save jcopps/f238f0dcfa358cf8da63a5db6ab03080 to your computer and use it in GitHub Desktop.
Convert wav to PCM - 16K
for file in ./*; do
[ -f "$file" ] || continue
ffmpeg -i "$file" -f s16le -ar 16000 -acodec pcm_s16le "$file".raw
done
@jcopps
Copy link
Author

jcopps commented Feb 19, 2023

REVERSE
ffmpeg -f s16le -ar 16000 -ac 1 -i "$file" "$file".wav
for file in ./*; do
[ -f "$file" ] || continue
ffmpeg -f s16le -ar 16000 -ac 1 -i "$file" "$file".wav
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment