Skip to content

Instantly share code, notes, and snippets.

@drsm79
Last active December 8, 2023 00:13
Show Gist options
  • Save drsm79/046d0dec6c7f9b92e5719e94b7871a8d to your computer and use it in GitHub Desktop.
Save drsm79/046d0dec6c7f9b92e5719e94b7871a8d to your computer and use it in GitHub Desktop.
Grandpa helpful command lines

Grandpa helpful command lines

Using ffmpeg, ffmpeg-normalize & ffprobe to manage samples for Grandpa per the manual.

Convert an audio file to the right wav format

ffmpeg -i my_audio.wav -acodec pcm_s16le -ac 1 -ar 16000 P1.wav

Normalise your audio

ffmpeg-normalize P*.wav -ext wav -f 

List & check the format of the wav files

You want to see output like Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s for all of your files.

for i in `ls *.wav`
do
ffprobe -hide_banner  -i $i|grep Audio
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment