Increase Audio Speed for Podcasts and Audio books
I listen to hours upon hours of podcasts and audiobooks every month. This is primary accomplished by listening while I am doing other tasks such as exercising. I have found this to be a highly effective way to accomplish two things at once. I get to walk, run, and move my body while also stimulating my brain. Win-win.
The issue I have though is most podcasts and audiobooks can drag on. I prefer to get to the point. This is especially frustrating when listening to a slow speaking narrator while running at a high cadence. I frequently find myself slowing down to match the rhythm of the speaker. To combat this, I usually listen to spoken audio at 1.5-1.7x speed.
I find the accelerated speed does not detract from my understanding of the content. Additionally, I am able to work through content more efficiently and make the most of my time.
This is all well and good when I am listening to content on my phone as most apps (Audible, Spotify, Google Podcasts, VLC, etc) have the ability to increase the speed built into the app. However, I recently started using a Garmin watch that can play audio and it does not have the ability to speed-up audio. The ability to not have a phone on me while I run is a game changer and I am not willing to go back to carrying one. I needed to find a way to speed up the audio played from my phone and sox came the rescue.
Here is a little script I wrote that takes a directory full of mp3 files and increases the speed by 1.7x:
#!/bin/bash
DIR=$1
OIFS="$IFS"
IFS=$'\n'
echo $1
OUT="$1/adjusted"
mkdir -p $OUT
for file in $(find $1 -type f -name "*.mp3")
do
echo "Working on ${file} ..."
sox $file "$OUT/$file" tempo 1.7
done
IFS="$OIFS"
The main command that does the work is this one:
sox $file "$OUT/$file" tempo 1.7
This tells sox to take the input file (in my case an mp3), increase the tempo by a factor of 1.7 and write the result out to a new mp3 file. If bash is not your thing, the rest of the script adds the ability to make a directory for the new faster files and loops through a primary directory looking for files to make faster.
There are dozens of well written articles floating around the internet discussing the ins and outs of sox if your situation is different. My hope with this one is to provide a complete example of how to do this and add batch processing.