added testing variable for RECORDING_LENGTH

This commit is contained in:
Patrick McGuire
2021-10-01 16:00:31 -04:00
parent bc60ab697c
commit c3db0bed44
4 changed files with 34 additions and 2 deletions
+11
View File
@@ -405,6 +405,17 @@ SYSTEMD_MOUNT=$(echo ${RECS_DIR#/} | tr / -).mount
## i.e, VENV is the virtual environment miniforge built for BirdNET.
VENV=${my_dir}/miniforge/envs/birdnet
################################################################################
#---------------------------------- Testing -----------------------------------#
#_____________These variables are for testing. Please don't touch______________#
#_______________them if you are not testing these features.____________________#
RECORDING_LENGTH=
EXTRACTION_LENGTH=
EOF
[ -d /etc/birdnet ] || sudo mkdir /etc/birdnet
sudo ln -sf ${my_dir}/birdnet.conf /etc/birdnet/birdnet.conf
+10
View File
@@ -233,3 +233,13 @@ SYSTEMD_MOUNT=$(echo ${RECS_DIR#/} | tr / -).mount
## i.e, VENV is the virtual environment miniforge built for BirdNET.
VENV=$(dirname ${my_dir})/miniforge/envs/birdnet
################################################################################
#---------------------------------- Testing -----------------------------------#
#_____________These variables are for testing. Please don't touch______________#
#_______________them if you are not testing these features.____________________#
RECORDING_LENGTH=
EXTRACTION_LENGTH=
+2 -2
View File
@@ -12,10 +12,10 @@ if pgrep arecord &> /dev/null ;then
echo "Recording"
else
if [ -z ${REC_CARD} ];then
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time 6\
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\
--use-strftime ${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-${STAMP}.wav
else
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time 6\
arecord -f S16_LE -c${CHANNELS} -r48000 -t wav --max-file-time ${RECORDING_LENGTH}\
-D "${REC_CARD}" --use-strftime \
${RECS_DIR}/%B-%Y/%d-%A/%F-birdnet-${STAMP}.wav
fi
+11
View File
@@ -426,6 +426,17 @@ SYSTEMD_MOUNT=$(echo ${RECS_DIR#/} | tr / -).mount
## i.e, VENV is the virtual environment miniforge built for BirdNET.
VENV=$(dirname ${my_dir})/miniforge/envs/birdnet
################################################################################
#---------------------------------- Testing -----------------------------------#
#_____________These variables are for testing. Please don't touch______________#
#_______________them if you are not testing these features.____________________#
RECORDING_LENGTH=
EXTRACTION_LENGTH=
EOF
[ -d /etc/birdnet ] || sudo mkdir /etc/birdnet
sudo ln -sf $(dirname ${my_dir})/birdnet.conf /etc/birdnet/birdnet.conf