audacity command line access

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
bmende
Posts: 6
Joined: Wed Feb 05, 2014 9:40 pm
Operating System: Please select

audacity command line access

Post by bmende » Wed Feb 05, 2014 9:48 pm

Could someone please tell me how I can access audacity from the command line? My desired parameter is simply the file name to open and I would like the program to start playing automatically. Any help much appreciated!

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: audacity command line access

Post by Gale Andrews » Thu Feb 06, 2014 12:16 am

Audacity only has limited command-line support. The only current command-line functions are that you can open audio files or Audacity project files (including multiple files) by passing them as arguments, for example:

Code: Select all

$  audacity file1.aiff file2.wav file3.ogg 
The following options are also supported:

-help
display a brief list of command line options

-version
display the Audacity version number

-test
run "Benchmark" diagnostics tests

-blocksize
set the Audacity blocksize for writing files to disk of nnn bytes

You can't tell Audacity to play the file. Probably you want to write an autohotkey script or similar.

Or if you can compile Audacity, try http://manual.audacityteam.org/o/man/scripting.html .

If you just want an application to play a playlist of files then you probably want a simpler solution anyway.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: audacity command line access

Post by Gale Andrews » Thu Feb 06, 2014 12:17 am

If you want to vote for more command-line options (without need to run Audacity scripting) please say what you are interested in.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

bmende
Posts: 6
Joined: Wed Feb 05, 2014 9:40 pm
Operating System: Please select

Re: audacity command line access

Post by bmende » Thu Feb 06, 2014 1:46 am

Thanks much Gale. If more command line options could be added, I would vote for running in a minimized window, and one to start the audio without user click. Thanks again, Bruce

Gale Andrews wrote:If you want to vote for more command-line options (without need to run Audacity scripting) please say what you are interested in.


Gale

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: audacity command line access

Post by Gale Andrews » Thu Feb 06, 2014 3:22 pm

bmende wrote:If more command line options could be added, I would vote for running in a minimized window, and one to start the audio without user click.
OK I'll record your vote.

Thanks.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

rossmcm
Posts: 42
Joined: Sat Jul 31, 2010 5:18 am
Operating System: Windows 10

Re: audacity command line access

Post by rossmcm » Sat May 30, 2020 1:01 am

If this thread is still alive, my vote would be for access to the export functions:

Code: Select all

audacity MyProject /exportWAV "Backing Vocals Track"  /exportWAV "Lead Vocals Track"   
audacity MyProject /exportWAV *
where the tracks were referenced by their track name and the files were written to the current folder using the track name. Refinements could be allowing * to denote all tracks, or maybe supporting wildcard matches or regular expressions.

Also,

Code: Select all

audacity MyProject /exportWAV "Backing Vocals Track"  /exportWAV "Lead Vocals Track"   /exit
would allow Audacity to exit after all command-line operations had been carried out.

Post Reply