Murga-Projects Forums
Transcribe.lua - Printable Version

+- Murga-Projects Forums (
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: Transcribe.lua (/showthread.php?tid=401)

Transcribe.lua - jpjacobs - 12-28-2010 11:55 AM

Well, another thing I'm working on: a transcription application for murgaLua.

Recently I've had the task to transcribe interviews (on audio file) to text, and I took it as an opportunity to toy around a little more with murgaLua.

While I initially tried to use the proteAudio library that comes with murgaLua, it couldn't cope with the requirements (pause, seek, slow audio, ...) so I interfaced my app to vlc via it's RC interface. In 2 ways even: via LuaSocket, and via io.popen and mkfifo (because it initially seemed that the socket solution was too slow). Any way, it's trivial to extend this to whatever audio application with whatever interface, as you'll see in the sources.

It's not yet finished, but it's usable.

Things on my wishlist for now:
  • some easy to switch highlighting for talkers, events, signs, pauses, ...
  • hotkeys for inserting timestamps, events, ...
  • Word autocompletion (like in Openoffice)
  • timestamps
  • exporting to html (to later import in openoffice)

Any comments, suggestions, critics, ... are welcome!



PS: Given the complexity (and in lesser degree the differences with the C++ version) of the FLTK bindings, I think it would be good to have some sort of a "best practices" guide for programming an interface, also taking into account pollution of the global namespace, the neat tricks we can pull off using tables and metatables in Lua, ... Maybe we should make an attempt at this at the Wiki?

Right I forgot about the keybindings (though they are easily extracted from the sources):
  • Ctrl-O open file
  • Ctrl-Shift-O open audio file
  • Ctrl-Space toggle audio pause
  • Ctlr-L 10 seconds back
  • Ctrl-M 10 seconds forward

RE: Transcribe.lua - mikshaw - 12-29-2010 06:02 AM

Crash when you cancel the file open dialog.

local filename=fltk.fl_file_chooser("Open transcript","*.txt","transcript.txt",0)
local test =,"r")

You're testing to see if filename can be read, but not testing first if filename has been set.

local filename=fltk.fl_file_chooser("Open transcript","*.txt","transcript.txt",0)
if not filename then return end
local test =,"r")

RE: Transcribe.lua - jpjacobs - 12-29-2010 08:38 AM

Thanks! Good catch! I've fixed it in the attachment to the original post.

RE: Transcribe.lua - dvw86 - 12-30-2010 12:15 AM

I find this very interesting. I've done this before with FFmpeg and it worked so-so. I never really finished it. I like the idea of using VLC though. This may work with my little project as well.