Skip to content

Instantly share code, notes, and snippets.

@yszheda
Created June 8, 2016 03:51
Show Gist options
  • Save yszheda/d3c53a3209b3edc92d7d5e1b267f0bb5 to your computer and use it in GitHub Desktop.
Save yszheda/d3c53a3209b3edc92d7d5e1b267f0bb5 to your computer and use it in GitHub Desktop.
Use lame to shrink sound file
#!/bin/bash
# Use lame to shrink sound file
SOUND=$1
FILE_NAME=`echo ${SOUND} | awk -F"/" '{print $NF}'`
TMP_FILE="/tmp/${FILE_NAME}"
lame -b 64 --resample 22.50 ${SOUND} ${TMP_FILE}
mv ${TMP_FILE} ${SOUND}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment