I'm trying to mark each paragraph of transcripted text with timestamps of when/where it occurs in the audio.
emacs are getting me close.
mplayer, in the terminal, outputs a stream of suitable time info; eg. (command and sample log)
mplayer au-file 1>event.log 2>&1 A: 0.8 (00.7) of 3207.0 (53:27.0) 0.1% [J A: 0.9 (00.9) of 3207.0 (53:27.0) 0.1% [J A: 1.0 (01.0) of 3207.0 (53:27.0) 0.1% [J
Certain un-bound keys (eg,
F12) can be used to flag an event in the log-- specifically for the start of a paragraph.
xdotool key --window $termID F12 A: 3.1 (03.0) of 3207.0 (53:27.0) 0.1% [J No bind found for key 'F12'. A: 3.2 (03.2) of 3207.0 (53:27.0) 0.1% [J A: 3.3 (03.3) of 3207.0 (53:27.0) 0.1% [J
The above works fine. The next thing it needs is line numbers to be injected into
event.log. I will probably use
emacs to trigger both these events from within
emacs, by binding a key to read the current
point position and appending it to the log.
Yes, your guessed it, I have a problem. It seems that
mplayer is keeping a stream pointer (or something?) because when it writes its next line it overwrites text I've appended. I don't know what is going on, but none of my added lines appar in the final log... I've used
echo $number >>events.log.
I've watched the log via
tail -f events.log and it shows one of my lines occasionally, so they must be getting there...
Is there some way around this?
Either by some
fu to the log, or an entirely different method, eg. some tool which does exactly this, in real time.. I've looked at subtitling tools and audio-video editors, but they seem to be too clunky.. I'm open to any ideas.