Murga-Projects Forums

Full Version: Transcribe.lua
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!

Greetings,

Jan-Pieter

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?

Edit:
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
Crash when you cancel the file open dialog.

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

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

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

Thanks! Good catch! I've fixed it in the attachment to the original post.
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.
Reference URL's