Scripting with Audacity

Help for Audacity 2.x.x on GNU/Linux.

ImageThis forum is for Audacity 2.x.x on GNU/Linux and Unix-like operating systems.
Please state which version of Linux you are using, the exact three-section version number of Audacity from Help > About Audacity... and whether you installed your distribution's release or daily version of Audacity 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 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.

Scripting with Audacity

Permanent link to this post Posted 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
TenLeftFingers
 
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Permanent link to this post Posted 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.
Trebor
 
Posts: 3770
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: Scripting with Audacity

Permanent link to this post Posted 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)
steve
Site Admin
 
Posts: 44458
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Scripting with Audacity

Permanent link to this post Posted 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.
TenLeftFingers
 
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Permanent link to this post Posted 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)
steve
Site Admin
 
Posts: 44458
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Scripting with Audacity

Permanent link to this post Posted 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
Trebor
 
Posts: 3770
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows Vista

Re: Scripting with Audacity

Permanent link to this post Posted 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?
TenLeftFingers
 
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Permanent link to this post Posted 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)
steve
Site Admin
 
Posts: 44458
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Scripting with Audacity

Permanent link to this post Posted 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)
}
TenLeftFingers
 
Posts: 12
Joined: Wed Sep 15, 2010 5:24 pm
Operating System: Please select

Re: Scripting with Audacity

Permanent link to this post Posted 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)
steve
Site Admin
 
Posts: 44458
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Next

Return to GNU/Linux and Unix-like



Who is online

Users browsing this forum: No registered users and 2 guests