Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-03-2015, 03:03 AM   #1
LQ Newbie
Registered: Jun 2015
Posts: 3

Rep: Reputation: Disabled
log/view microphone sound level to a file?

Hi there
Does anyone know if it is possible to log or output the current sound pressure level of an connected* microphone to the console or an file?

I dont need to record an sound file, just output the sound level without any calibration of the sound pressure scale. I am not aware of any linux tool that can do this.

*via pulseaudio
Old 06-03-2015, 03:58 AM   #2
LQ Newbie
Registered: Jun 2015
Posts: 5

Rep: Reputation: Disabled
More relevant features...

And while doing this, be able to replicate SLM (sound level meter) features such as impulse (35ms), fast (125 ms) and slow (1 s) integration intervals; RMS vs. peak readings; "A", "C" and other weighting schemes? Perhaps even optionally recording audio clips while a trigger volume level is exceeded, or timed sample clips such as one minute every hour? These all seem like candidates for the SOX "swiss army knife of sound" program.
Old 06-03-2015, 12:39 PM   #3
LQ Newbie
Registered: Jun 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Ok thank you, I have found this way to print some values.

arecord -r 48000 -qd 1 test.wav && sox test.wav -n stat

Samples read:             48000
Length (seconds):      1.000000
Scaled by:         2147483647.0
Maximum amplitude:     0.320313
Minimum amplitude:    -0.343750
Midline amplitude:    -0.011719
Mean    norm:          0.101320
Mean    amplitude:    -0.009666
RMS     amplitude:     0.119220
Maximum delta:         0.125000
Minimum delta:         0.000000
Mean    delta:         0.017759
RMS     delta:         0.022904
Rough   frequency:         1467
Volume adjustment:        2.909
I couldnt figure out how to pipe directly to sox and I am not sure what value fits most likely the input level meter in audacity. Once I find it I will loop the command and execute it every second and write every value to a file.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to divert sound from laptop speakers to a sound file without using a microphone ? lwv962 Linux - Newbie 5 09-01-2014 09:02 AM
virtual microphone: FILE ---> MICROPHONE ---> APPLICATION jamal_mohammadi Linux - Hardware 1 02-13-2011 04:10 PM
vsftpd and log files - can i up the log level to see login attempts? robr Linux - Newbie 3 04-04-2008 12:38 PM
microphone level unionjak Ubuntu 0 11-17-2005 10:56 AM
How do I view the default Apache access log file? johann519 Linux - General 2 05-10-2004 12:46 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration