Hi,
I'm not new to using Linux, my experience is using the command line for setting up headless servers i.e LAMP, NAS and Media Servers just for personal use. I have little experience with writing scripts but do have an understanding of them.
I have found a very good solution to record audio based on audio level input so it records when sound is inputted and doesn't record silence. The command is:
Code:
rec recording.wav silence 1 5 8% 1 0:00:01 8%
This detects the audio when there is more than 8% sound and records until it hears 1 second of silence.
I need it to record into date and time file formats which i have accomplished in this script. Although it's very very far from ideal and awfully dirty, it works but it's no good for a long term 24/7 solution.
Code:
#!/bin/bash
NAME=`date +%m-%d-%Y_%H-%M-%S`
rec $NAME.wav silence 1 5 8% 1 0:00:02 8%
~/voxrecord.sh
because rec exits when it has finished recording i need a solution to restart it and wait again for more audio, preferebly as a service?
The goal is to have all the recordings in a web interface to be played back as needed.
Can anyone help me get this system to wait-record-save-repeat?
Thanks