Skip to content

A live bird collage card for your Home Assistant dashboard.

added testing variable for RECORDING_LENGTH

Patrick McGuirec3db0bed44f4
diff --git a/Birders_Guide_Installer.sh b/Birders_Guide_Installer.sh
index e954ce59..c73bb768 100755
--- a/Birders_Guide_Installer.sh
+++ b/Birders_Guide_Installer.sh
@@ -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
diff --git a/birdnet.conf-defaults b/birdnet.conf-defaults
index 04456ed2..3b63ddce 100644
--- a/birdnet.conf-defaults
+++ b/birdnet.conf-defaults
@@ -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=
diff --git a/scripts/birdnet_recording.sh b/scripts/birdnet_recording.sh
index 0a670784..33ccd70d 100755
--- a/scripts/birdnet_recording.sh
+++ b/scripts/birdnet_recording.sh
@@ -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
diff --git a/scripts/install_config.sh b/scripts/install_config.sh
index a104ea97..839a9371 100755
--- a/scripts/install_config.sh
+++ b/scripts/install_config.sh
@@ -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