A humble question from a total noob

Hi guys, I’ve read through a lot of different topics, but I have to admit I get more and more confused :confused: I was really hoping someone could point me in the right direction based on what I’m trying to achieve.

I have a lot of different audio-recordings that I want to organize, and I was wondering if it’s possible to semi-automate this process in the following way:

  1. I open a recording in Audacity
  2. I select a segment of the clip
  3. I press a hotkey and a prompt with the following fields should appear: (Name, Category, Description)
  4. When I’ve entered the data in the prompt-fields I want two things to happen:
  5. The selection should be exported as mp3, and the data I specified in the fields should be added to the ID3v1 Tag (e.g. in Title/Artist/Album, not important)
  6. The selection should be labeled with "Exported: " + Name (from the prompt)

This might be very complicated to achieve, but I would greatly appreciate any help on this! If it’s too complicated, I would also appreciate any suggestions on more realistic alternative methods on ways to decrease the amount of manual labour for this task :slight_smile:

You could add a custom shortcut (“key binding”) to the command “Export Selected Audio…”
See here for how to create custom shortcuts: https://manual.audacityteam.org/man/keyboard_preferences.html

Thank you, but I guess the tricky part of my question is regarding the prompt and the labeling. I need to somehow be able to specify (Name, Category, Description) for each clip I export, do you have any ideas on any ways of adressing that part and the labeling?

Unless you’ve turned it off, the metadata editor should open by default. See: Show Metadata Tags editor before export

I’m sorry for the late reply, I suddenly got swamped at work :dizzy_face: Thank you, you are correct, it popped up like you said :slightly_smiling_face: I realize I hadn’t really thought this through thoroughly enough before asking my initial question, but I think I know what kind of solution I’m looking to create now :slightly_smiling_face:

I’ve concluded that I need to find a scripable way to do this as there’s more I would like to do than what I initially stated.

First, I want to be able to specify custom fields/tags (e.g. different named categories to choose from for each specified label), so instead of adding this data to the file-meta I think it’s better to add this metadata to a separate text/json-file instead (containing all information I’d specify for each label), this way I won’t be limited by the available meta-fields for the filetype/format the sound-clips are exported in. I guess I’d need to create a custom window (with predefined categories to choose from) that pops up when a label is created.

Secondth, when the labels are exported I want to automatically perform some other operations on the files (e.g. changing the date modified of the exported files to the date of the source-file which they’re exported from).

I know how to make a gui-prompt/popup (where the meta for each label can be selected) in python, I also know how to change dates etc with python. After looking some more into it I think a combination of using mod-script-pipe (and perhaps pywinauto) might be the direction I’m leaning towards, but I was hoping you could give me another nudge :slightly_smiling_face:

If I’ve understood it correctly, when piping through python it isn’t really designed to be “interactive” with Audacity? I know that it’s possible (with mod-script-pipe) to take a project and export all labeled sections, but I’m not sure if it’s possible to somehow trigger a python-prompt directly from Audacity when creating a label?


I’m sorry if I still haven’t been able to convey my goal clearly enough, but to summarize; I have a lot of audio files with conversations about different topics. I want to split these into multiple smaller clips, and I want to specify tags and categories for each of the clips. When I’ve done this each audio-clip will have a textfile (sharing the same filename as the audio-clip files) with the tags/categories that I specified when creating the label(s). If I manage to find a way to do this, I could later create a custom python “browser” that makes it possible to easily search and browse all of my audio-clips based on their corresponding textfile.

Example:
Lets say I have an audio-file with a conversation covering topics of maths, politics, personal health etc. I’ll manually label each section and specify which tags and categories they belong to. When this is exported I will be left with several smaller clips, each with a corresponding textfile (containing information about each clip). This would make it so much easier to find specific parts of conversations that I’d like to revisit in the future.

I’m sorry about the “wall of text”, but I’d really like to find a solution that makes this possible. Any help would be immensely appreciated :slightly_smiling_face:

No it’s not. The “mos-script-pipe” module allows an external language to send commands to Audacity, but there’s no support for sending commands from Audacity to another app. I doubt that the latter would ever be added to Audacity as doing so would provide an easy way for bad actors to create malware plugins.

I think the closest that you can get to that in Audacity is to “Export Multiple” and select the option to use the label text as the file name.
See: https://manual.audacityteam.org/man/export_multiple.html

I see, that makes sense :slightly_smiling_face: Ok, I could label and export the different parts (by labels) and then go through the clips afterwards and specify/generate the metadata textfiles. That wouldn’t be hard to do, but doing it in two operations would be a lot more time consuming (as I’d have to listen to each clip twice).

Alternatively I could generate the metadata outside of Audacity (in a python-script where I also pass in the name of each label) for each time I create a label in Audacity. That way I could automatically link up the metadata to each file based on it’s label afterwards. But still, not being able to somehow add any logic inbetween the command in Audacity and the result of the command makes it a bit tricky to find a good solution. I mean, all I would need is that the label-command sends the labelname to the clipboard, that way my python-script could listen and trigger a prompt (separately, but still connected to the label through it’s name), thus solving all of my problems :sweat_smile:

Anyways, you pointing out the crux of the problem was very helpful. It’s definitely a nudge in the right direction, at least now I know where to start in trying to find a creative/hacky way to solve this. Thank you :slightly_smiling_face:

Some MP3 tagging software can automatically add id3 tags based on the file name. (I use EasyTag, but that seems to have become Linux only (though old versions are still available for Windows).

Your workflow would then be:

  1. “Export Multiple” from Audacity, based on labels.
  2. Batch process the files with a Metadata Editor.

(Alternatively, you could write a Python script to batch process the metadata, but that would be reinventing the wheel as applications to do this already exist.)

UPDATE: I found some old documentation for EasyTag here: https://web.archive.org/web/20120128004318/http://easytag.sourceforge.net/EasyTAG_Documentation.html

My initial post wasn’t really correct in regards to what I actually wanted, but I appreciate your suggestion :slight_smile: