From c3db0bed44f433b17e0539e5eb57ce7495a7cdf7 Mon Sep 17 00:00:00 2001 From: Patrick McGuire Date: Fri, 1 Oct 2021 16:00:31 -0400 Subject: [PATCH] added testing variable for RECORDING_LENGTH --- Birders_Guide_Installer.sh | 11 +++++++++++ birdnet.conf-defaults | 10 ++++++++++ scripts/birdnet_recording.sh | 4 ++-- scripts/install_config.sh | 11 +++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Birders_Guide_Installer.sh b/Birders_Guide_Installer.sh index e954ce5..c73bb76 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 04456ed..3b63ddc 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 0a67078..33ccd70 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 a104ea9..839a937 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