Page 1 of 2

Scripting with Audacity

Posted: Wed Jul 12, 2017 11:51 am
by TenLeftFingers
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

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 12:32 pm
by Trebor
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.

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 12:32 pm
by steve
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

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 12:41 pm
by TenLeftFingers
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.

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 12:49 pm
by steve
A Chain can be applied to the current project, and will then be applied to all tracks in that project.

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 12:58 pm
by Trebor
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

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 1:42 pm
by TenLeftFingers
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?

Re: Scripting with Audacity

Posted: Wed Jul 12, 2017 2:41 pm
by steve
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.

Re: Scripting with Audacity

Posted: Thu Jul 13, 2017 12:07 am
by TenLeftFingers
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)
}

Re: Scripting with Audacity

Posted: Thu Jul 13, 2017 12:37 am
by steve
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.