Hello, I’m trying to use Audacity’s mod-script-pip for rendering audio selections to an mp3 file (and metadata tag the file as well if possible).
I got mod-script-pip working, and am testing it by running the pipeclient.py file on my windows 10 cmd terminal; which lets me enter commands that effect my open Audacity window.
My starting off point is having a part of my track selected like so:
It will begin the process of rendering that selection; which opens this first window:
At this point my console says the command timed out and i can enter another command, is there some way to click the ‘save’ button and change parameters like quality for rendering?
Something called ‘MenuCommand’, which says ‘Executes a ‘menu command’, using the system that controls the Audacity menus’. I tried using that with a command like
MenuCommand: CommandName=Save
once the window is opened but my console just times out and nothing happens.
Is there a command or series of commands I could use to render the selection from my first pic into an mp3 file? I’m trying to do this completely programmatically with no user input, so im open to hearing any methods of selecting/clicking buttons in the popup windows when i try to render a selection, or skipping them alltogether.
(this is also my first attempt at scripting audacity in python, so any help is appreciated, thanks)
thanks steve, are you talking about exporting the file, then reimporting it?
Ultimately my goal is to render each selection from my track, so for pic1 i would have three different mp3 files for each of the three selections.
Maybe some way I could seperate each section into its own track and render those? I feel like there’s got to to be some way to run commands to press the buttons in the popup windows for exporting audio selections
Was able to render the individual selection. Is there some way i can see all the availaible flags for the export 2 command? I’m curious if there are quality options / any potential mp3 metadata options
I think this solves my question, i wanted to tag the mp3 file with stuff like title/year/album/artist but i dont think thats possible with export2, so i might just use a separate python3 library
The documentation: Scripting Reference - Audacity Manual
Third column (“Parameters”) lists the available arguments.
This documentation is generated from the Audacity code, so although the descriptions are terse, it should be accurate. (Let us know if you find any errors so they can be corrected.)
or, as you say, with the Scripting command
Help: Command=“string”
“Export2:” exports the selected audio. “Mode” is not a recognised parameter - it will be ignored.
Note that for formats that take settings (such as MP3), Export2 uses the format settings that were last used.
It is however possible to change that, using the SetPreference: command. For example, to set MP3 format to 128kbps CBR, you need two commands:
The “Reload” parameter is probably only needed once, on the last “SetPreference:” command.
To find valid Preference “Name=” arguments, look in Audacity’s configuration file “audacity.cfg” (see here for the location of “audacity.cfg”: Preferences - Audacity Manual)