Audio transcription with vim and mocp

I experimented with audio recording of first article draft in last few days.

Recording on EeePC with Audacity went very well (allthough I was recording to slow SD card) after I remembered to to decrease quality to preserve disk space.

I was using microphone on cheap headphones for recording because it doesn't record typing on keyboard and laptop noise, as built-in mics do.

By default, Audacity records in stereo, and I recorded in stereo allthough there is just one microphone on headphones because left channel had higher gain (and thus, noise) than right. Other than that, channels appeared identical, so I decided to throw away noisy right channel and turn left channel to mono.

In the end, I exported from Audacity project to mp3 directly on EeePC because source files where too big for transfer over wifi :-)

After I transfered mp3 files to ThinkPad I was presented with a list of mp3 files to listen (5 parts, about 3 hour of material) and I knew I have to do something.

Quick.

So after a first 4 parts or so I ended up with setup like this:


audio-transcription.jpg


Small shell script and vim config you can do wonders:

#!/bin/sh

# moc(p) support for audio transcribing
#
# 2008-11-20 Dobrica Pavlinusic <dpavlin@rot13.org>

cmd="--toggle-pause"

if echo "x$1x" | grep '^x-*[0-9][0-9]*x$' > /dev/null ; then
cmd="--seek $1"
elif [ ! -z "$1" ] ; then
mocp --info | grep "^$1: " | sed 's/^.*: //'
exit
fi

mocp $cmd
mocp --info |\
egrep '^(State|File|Title|CurrentTime|TotalTime)' |\
egrep '^(State|File|Title|CurrentTime|TotalTime)' | sed 's/^[^:]*: *//' |\
osd_cat -p bottom -A center -s 3 -f neep-24 -O 2 -d 1 -l 5

exit

And insert following in ~/.vimrc:


" play-pause
noremap <esc>[33~ :silent execute "! play-toggle.sh &"<cr>:redraw!<cr>
" seek 5 sec backward
noremap <esc>[34~ :silent execute "! play-toggle.sh -5 &"<cr>:redraw!<cr>
" CurrentTime from mocp --info
noremap <esc>[29~ :r !play-toggle.sh CurrentTime<cr>