Can someone customize the Label Export function for me?
Or better yet, write a plugin for that purpose?
But let me start from the beginning.
I’m developing an audio book player with a special function I call “Voice Prompt”.
The idea is to play back the spoken title of the current chapter on a button press at any time while “reading” that chapter.
To do that, I need to know where that spoken titel is in the file.
One easy way I found to do it is with Audacity, specifically with Labels, as follows:
1: Select the audio section corresponding to the spoken title
2: Create makers (Ctrl + B)
3: Export Labels
Example for a file called Chap. 18.mp3:
The built in Label Export function exports at text file containing the start and stop time (and name if present) of the label(s) into a file called after the Label Track Name, by default Label Track.txt. It looks like this:
What I would like to have is a function or a plugin that does just a little more then that. I would like that:
the exported file be called after the audio track name (audio file name)
the exported file extension be .vp (not .txt)
the exported file be created in the same folder like the audio file
And if possible, that:
the data be structured as name:value pairs (like in a .ini file)
A file called Chapt. 18.vp would look like this for the example above:
If it was possible to make a Nyquist plugin for that custom function, it would be top.
I could then share it with different editors to “capture” and document spoken titles.
The reason I’m asking is because we have thousands of chapters and such a plugin would greatly simplify the work.
I hope I’m posting at the right place. If not, kindly let me know better…
I think the easiest way would be to directly modify Audacity’s source code. Unfortunately, this would require anyone wanting to use the feature to use the modified version of Audacity. It will also mean freezing that custom version of Audacity (or updating the source code and recompiling). It would also require quite a bit of programming and testing time. Time is money and this does not look like something that a programmer would take on for free.
I have done similar modifications for a number of people and businesses. It’s not cheap and, for businesses, getting someone knowledgeable to test my modifications is not always easy.
Yes, that is one option. I’m using AutoIt for this king of things. Here is an example of what I did: http://www.muxson.com/winloud.
But that would mean to (1) Export the Labels from Audacity, (2) Load the text file in another piece of software that will (if done cleverly) format the data and export it under the (3) desired name (which need to be entered or acquired somehow).
So yes, it terms of programming effort, it is probably the easiest. In term of operations, I’m not sure…
I was actually thinking of firing Audacity from my script (since it is possible to open Audacity and pass an audio file as argument in a command line) and capturing the exported file automatically but I’m not sure how easy that is…
I agree with you, modifying the source code is one option as well. Probably more involved then I think.
Finding a programmer to do it and then doing all the debugging is quite some work. And difficult to maintain.
That would be rather a one-off edit and live-with-it…
A plugin would be a better strategy. Is that possible at all? And would someone be willing to do it?
It would be possible to make a plug-in that adds the audio track name to the label.
This would require running the plug-in “effect” to create the label, rather than the usual “Ctrl + B” (though note that an effect plug-in can have a custom keyboard shortcut).
The file extension is hard coded into the Audacity code, so that would require modifying the source code and building your custom version from the modified code.
If a “.vp” file is just a plain text file with a different file extension, surely it’s not hard to modify that manually? Or can the receiving application be persuaded to accept a .txt file?
The exported folder is whatever you select in the export dialog. Plug-ins do not have access to that.
The data structure of a label file is as you see in the label text file. It has the label text, the start time and the end time (only). Modifying the data structure would require modifying the Audacity source code.
Hey. I am not familiar with editing and creating plugins. Could you please provide indepth details or show step by step how you got the label export to work which adds names of the audio file to the labels name too?
Thank you very much.