How to transcribe using Vim
From time to time I have to do some transcription jobs, and on top of being quite stressful, there are no many programs that help to get the job done. There are some I’ve tried such as Express Scribe, which has versions for the major platforms (OS, Linux and Windows, but the Linux one is out-of-date and discontinued as it seems) or F4, but I really miss having a top-notch Linux version since it’s the operating system I find myself using most of the time.
Basically, the way this programs work is as follows: they activate some global keybindings for the user to be able to pause and seek the audio or video, so you can work in the transcription in any other word processing software while you control the media file. That sounds like a nice idea, since you can take advantage of any other software you use (such as OpenOffice’s grammar check). Most of these programs include a text editor focused on the transcription process that, when starting a paragraph, insert the current time of the file you’re transcribing. Usually, they also enable the user to slow down the audio so you don’t have to stop so often, since usually you’ll type slower than the people speak… And during interviews people tend to speak really really fast.
But after a couple hours of trying I really missed the amazing text editting capabilities of Vim, the editor I use 99% of the time. So I started using it along with the global keybindings of the transcription programs.
No need to say that I didn’t manage to run those programs smoothly and without any headaches under Linux, so I started using VLC to play files. On the other hand, I found it really annoying to configure for doing any transcription with it, since the ideal “seek backwards and forwards” time is 3 seconds, but by default, in VLC this value is 10 seconds. On the other hand, the tempo scaling (slowing the audio while keeping the tune, so the speaker doesn’t end up talking as Darth Vader) capabilities of VLC are not as good as I’d like. After 10 minutes of configuring everything to my needs an idea came to my mind: “I’m sure the good-old Mplayer is capable of all this and more”. For those who still don’t know Mplayer, it’s a multi platform media player that has a command line and a graphical interface.
So I got prepared to get my hands dirty and started doing some research. This is what I found out:
To change the seek time of Mplayer to 3 seconds, add this to your ~/.mplayer/input.conf :
RIGHT seek 3<br /> LEFT seek -3
mplayer -af scaletempo file_to_reproduce
mplayer -af scaletempo -slave -input file=/tmp/mplayerfifo file_to_play
echo "pause" > /tmp/mplayerfifo
:! echo "pause" > /tmp/mplayerfifo
map <silent> <F2> :! echo seek -3 > /tmp/mplayerfifo<CR><CR><br /> map <silent> <F4> :! echo seek 3 > /tmp/mplayerfifo<CR><CR><br /> map <silent> <F3> :! echo pause > /tmp/mplayerfifo<CR><CR><br /> imap <silent> <F2> <Esc>:! echo seek -3 > /tmp/mplayerfifo<CR><CR>a<br /> imap <silent> <F4> <Esc>:! echo seek 3 > /tmp/mplayerfifo<CR><CR>a<br /> imap <silent> <F3> <Esc>:! echo pause > /tmp/mplayerfifo<CR><CR>a