Page 1 of 1

Voice-Activated VOX Audio Recording?

Posted: Sat 03 Mar 2018, 00:00
by johnywhy
any way to do this on puppy?

thx

Posted: Sat 03 Mar 2018, 00:34
by ally

Posted: Sat 03 Mar 2018, 00:56
by johnywhy
thx, ally!!

but that's not what i mean :)

i mean an audio-recorder that only records when it senses sounds, and stops recording when there are no sounds.

thx!

Posted: Sat 03 Mar 2018, 06:18
by watchdog
Audacity can do that.

Posted: Sat 03 Mar 2018, 06:38
by johnywhy
watchdog wrote:Audacity can do that.
thx, watchdog!

unfortunately, Audacity is a a very fat dog. Eats too much RAM and disk space, and performance is not great on low-resource machines, in my experience. Also, as a multi-track recorder, it's really overkill for simple mono voice-recording.

Audacity is 55 MB compared with Bacon at under 5k. I just need Bacon with sound-activation.

Posted: Sat 03 Mar 2018, 07:04
by johnywhy

Posted: Sat 03 Mar 2018, 07:28
by drunkjedi
On this page a Python script is given to do that job.
http://mocha.freeshell.org/audio.html

Posted: Sat 03 Mar 2018, 07:49
by Moat
Not sure, but does mcenaw's Precord have this capability?

(Having difficulty linking on this smartphone... :? But it's here on the forum - somewhere...)

Bob

Posted: Sat 03 Mar 2018, 08:20
by johnywhy
Moat wrote:does mcenaw's Precord have this capability?
thx, i tried it. Doesn't appear to, tho'.
drunkjedi wrote:On this page a Python script is given to do that job.
http://mocha.freeshell.org/audio.html
thx, will check it out!

Posted: Wed 25 Apr 2018, 22:09
by wiak
https://github.com/russinnes/py-vox-recorder
drunkjedi wrote:On this page a Python script is given to do that job.
http://mocha.freeshell.org/audio.html
Actually, on that mocha.freeshell.org site there is a simple commandline using sox that includes sound activated recording thresholds. Here is the complete script including the relevant sox rec commands:

Code: Select all

#!/bin/bash
#source http://www.sis-germany.de/index.php?page=Thread&threadID=1444

NAME=`date +%m-%d-%Y_%H-%M-%S`

#choose a method below, either the decibel or % of level method
#also choose number of channels, sample rate, encoding, etc..
#you need to find a level that works for your hardware

#rec -c 1 -r 22050 $NAME.wav silence 1 0 -22d -1 00:00:05 -22d
#rec -c 1 -r 22050 $NAME.wav silence 1 0 8% -1 00:00:05 8%
rec -c 1 -r 22050 $NAME.mp3 silence 1 0 8% -1 00:00:05 8%
#rec -c 1 -r 22050 $NAME.mp3 silence 1 0 25% -1 00:00:05 25%

#uncomment appropriate line below for normalizing when finished

#echo "Normalize..."
#sox $NAME.wav $NAME-norm.wav gain -n -1
#sox $NAME.mp3 $NAME-norm.mp3 gain -n -1

#uncomment appropriate line below for a spectral graph if desired

#echo "Calculating Spectrogram..."
#sox $NAME.wav -n spectrogram -x 1024 -y 768 -z 100 -t "$NAME.wav" -c '' -o $NAME.png
#sox $NAME.mp3 -n spectrogram -x 1024 -y 768 -z 100 -t "$NAME.mp3" -c '' -o $NAME.png
#echo "Done."
Apparently it was found elsewhere on some German-language site.

Also on unix stackexchange:

https://unix.stackexchange.com/question ... s-detected

wiak