scripting: peak, RMS levels from command line?

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

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.

scripting: peak, RMS levels from command line?

Permanent link to this post Posted by jbeale » Sun Feb 11, 2018 1:05 am

I have Audacity v2.1.2 on Ubuntu 17.04 and it works OK.

I would like to get the kind of audio statistics that the "ACX Check" plugin displays (peak, RMS and noise floor) but under script control and entirely from the command line. http://wiki.audacityteam.org/wiki/Nyqui ... #ACX_Check

Is it possible? My LISP is a little rusty but I could probably rewrite the plugin as needed, if it was possible for it to write to stdout and there was an example of a plugin intended for command-line usage.

Or maybe there is an easier way to get such audio stats on command line outside of Audacity, something like SOX? Thanks for any suggestions!

-john
jbeale
 
Posts: 5
Joined: Sat Dec 30, 2017 11:46 pm
Operating System: Windows 10

Re: scripting: peak, RMS levels from command line?

Permanent link to this post Posted by steve » Sun Feb 11, 2018 2:02 am

Audacity does very little from the command line (other than launching the application).
There is an experimental scripting interface, but not really ready for prime-time, and it requires building Audacity from the source code.

SoX looks like a better option. See "stat" and "stats" in the documentation: http://sox.sourceforge.net/sox.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 46815
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: scripting: peak, RMS levels from command line?

Permanent link to this post Posted by jbeale » Sun Feb 11, 2018 3:38 am

I appreciate the response. I tried out sox myfile.mp3 -n channels 2 stats
and it looks good enough for what I want. Thanks again!

Code: Select all
sox ChB_2018-02-10_19-25-00.mp3 -n channels 2 stats

             Overall     Left      Right
DC offset  -0.000015 -0.000015 -0.000015
Min level  -0.233424 -0.233424 -0.224065
Max level   0.274835  0.274835  0.272619
Pk lev dB     -11.22    -11.22    -11.29
RMS lev dB    -38.64    -38.56    -38.73
RMS Pk dB     -20.53    -20.53    -20.78
RMS Tr dB     -48.95    -48.95    -48.57
Crest factor       -     23.27     23.55
Flat factor     0.00      0.00      0.00
Pk count           2         2         2
Bit-depth      27/29     27/29     27/29
Num samples    14.4M
Length s     300.000
Scale max   1.000000
Window s       0.050
jbeale
 
Posts: 5
Joined: Sat Dec 30, 2017 11:46 pm
Operating System: Windows 10


Return to GNU/Linux



Who is online

Users browsing this forum: Google [Bot] and 1 guest