Scripting with Audacity

Help for Audacity 2.x.x on GNU/Linux.
Forum rules
ImageThis forum is for Audacity 2.x.x on GNU/Linux.
Please state:
  • which version of Linux you are using,
  • the exact three-section version number of Audacity from Help menu > About Audacity,
  • whether you installed your distribution's release, PPA version, or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade (see 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.
TenLeftFingers
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Scripting with Audacity

Post by TenLeftFingers » Wed Jul 12, 2017 11:51 am

Hi folks,

I've read on the Audacity website that if I build Audacity myself and obtain the right plugins, scripting is possible. I would love to be able to get a binary that's ready to go if anyone has such a thing for Ubuntu (16.04).

We work on a podcast and part of my workflow involves receiving recordings from various remote parties (we do a triple-ender, sometimes more). Performing the same operations repeatedly takes a lot of time; mostly while waiting for the operations to complete so I can go on to the next effect. Compression, noise reduction (using the first second of silence we record) and noise gate are very rote activities very suited to scripting.

Would the team consider making such a build available?

Thanks,
TLF

Trebor
Posts: 4505
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: Scripting with Audacity

Post by Trebor » Wed Jul 12, 2017 12:32 pm

TenLeftFingers wrote:... Performing the same operations repeatedly takes a lot of time; mostly while waiting for the operations to complete so I can go on to the next effect. Compression, noise reduction (using the first second of silence we record) and noise gate are very rote activities very suited to scripting.
Audacity does have a batch-processing option called chains.

Another free multi-platform audio-processing-program called SoX is designed for batch-processing.
Last edited by Trebor on Wed Jul 12, 2017 12:34 pm, edited 1 time in total.

steve
Site Admin
Posts: 47250
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Scripting with Audacity

Post by steve » Wed Jul 12, 2017 12:32 pm

Audacity has a built-in feature called "Chains". It's not as powerful as full scripting, but much easier to use. See: http://manual.audacityteam.org/man/chai ... ation.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

TenLeftFingers
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Post by TenLeftFingers » Wed Jul 12, 2017 12:41 pm

Thanks Trebor & steve. This looks promising, but also looks like it only works on one selected track at a time. I want to be able to run this on a project and have it iterate through each track. This is where the real time saving would be and where I imagine scripting could shine. Is this possible with chains?

My subjective experience tells me that selecting multiple tracks for an effect (compression for example) does not give the same result as doing each one individually. Am I correct in this assessment? I'd love to be wrong.

steve
Site Admin
Posts: 47250
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Scripting with Audacity

Post by steve » Wed Jul 12, 2017 12:49 pm

A Chain can be applied to the current project, and will then be applied to all tracks in that project.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 4505
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: Scripting with Audacity

Post by Trebor » Wed Jul 12, 2017 12:58 pm

TenLeftFingers wrote: My subjective experience tells me that selecting multiple tracks for an effect (compression for example) does not give the same result as doing each one individually. Am I correct in this assessment? I'd love to be wrong.
If you don't have the streams in isolation, to process individually, Steve's LevelSpeech plugin is worth a try ...

Image

TenLeftFingers
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Post by TenLeftFingers » Wed Jul 12, 2017 1:42 pm

This looks great, thank you. Is it possible to automate the noise reduction? If for example, the beginning of every imported file had no speech for the first five seconds, which the noise could be sampled from?

steve
Site Admin
Posts: 47250
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Scripting with Audacity

Post by steve » Wed Jul 12, 2017 2:41 pm

Noise reduction works best when the noise profile comes from the specific track that you are cleaning, so no it's not a good effect to use in a script.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

TenLeftFingers
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Post by TenLeftFingers » Thu Jul 13, 2017 12:07 am

Right, and thanks. But if the script can work one track at a time it should be doable. But it sounds like it's not possible in this case to say:
For (track 0 - n){
PROFILE=[0:00-0:01]
NR( PROFILE)
}

steve
Site Admin
Posts: 47250
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: Scripting with Audacity

Post by steve » Thu Jul 13, 2017 12:37 am

No, Chains can't do that. When applied to the current project, all commands in the Chain are applied to each full track in the project.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply