IPB

Welcome Guest ( Log In | Register )

Commandline audio analysis utility?
sheh
post Nov 4 2012, 18:37
Post #1





Group: Members
Posts: 89
Joined: 3-November 04
Member No.: 17971



Can anyone suggest a utility that takes an audio file as input, and can output to a text/CSV file various data (RMS, peaks, dominant frequencies, etc.) per each N ms of the input, for both time and frequency domains?

Windows is my main target, but *nix as well.

It seems SoX has a few features in this direction, but not flexible enough (e.g., data per N ms, frequency domain resolution).
Go to the top of the page
+Quote Post
 
Start new topic
Replies
chi
post Nov 5 2012, 01:47
Post #2





Group: Members
Posts: 45
Joined: 27-November 11
Member No.: 95439



QUOTE (sheh @ Nov 4 2012, 19:37) *
It seems SoX has a few features in this direction, but not flexible enough (e.g., data per N ms, frequency domain resolution).


For the time-domain values, you could use something like this:
CODE
sox input.wav -n trim 0 0.012 stats : restart
(change 0.012 s = 12 ms into the desired block length). You are right, however, regarding the frequency domain; there is not much support for that.
Go to the top of the page
+Quote Post
sheh
post Nov 5 2012, 20:03
Post #3





Group: Members
Posts: 89
Joined: 3-November 04
Member No.: 17971



It won't be efficient, executing it thousands of times.
Go to the top of the page
+Quote Post
chi
post Nov 5 2012, 22:38
Post #4





Group: Members
Posts: 45
Joined: 27-November 11
Member No.: 95439



QUOTE (sheh @ Nov 5 2012, 21:03) *
It won't be efficient, executing it thousands of times.


CODE
$ soxi data.wav

Input File     : 'data.wav'
Channels       : 2
Sample Rate    : 44100
Precision      : 16-bit
Duration       : 01:12:00.91 = 190551984 samples = 324068 CDDA sectors
File Size      : 762M
Bit Rate       : 1.41M
Sample Encoding: 16-bit Signed Integer PCM

$ time (sox data.wav -n trim 0 0.055 stats : restart 2>&1 | wc)
1256737 5733870 45242573

real    0m23.383s
user    0m20.849s
sys    0m5.960s
$


So thatís less than half a minute for 78562 blocks. For a block length of 0.009 seconds (480101 blocks), it takes four minutes. The processor is a 1 GHz AMD 4850e, nothing extreme.
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th November 2014 - 03:50