From 89e2992d9ae8222e9f3d26c3daba01293b6c0fe7 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:28:51 +0200 Subject: [PATCH] Update 71-newfeatures.sh --- birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh b/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh index 90f0cc416..1e2905e90 100755 --- a/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh +++ b/birdnet-pi/rootfs/etc/cont-init.d/71-newfeatures.sh @@ -9,8 +9,8 @@ set -e bashio::log.info "Adding optional features" if bashio::config.true "BAT_MODEL_ENABLED"; then - bashio::log.warning "... adding bats model" - sed -i '/thread_queue_size/a if [[ "$MODEL" == *[Bb][Aa][Tt]* ]]; then python3 "$HOME/BirdNET-Pi/scripts/bat_wav_translate.py" "${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav"; fi' "$HOME"/BirdNET-Pi/scripts/birdnet_recording.sh + bashio::log.warning "... system will be modified to analyse bats!" + sed -i '/thread_queue_size/a\if [[ "$MODEL" == *"Bat"* ]]; then FFMPEG_PARAMS+="-vn -thread_queue_size 512 -i ${i} -map ${MAP_ID}:a:0 -t ${RECORDING_LENGTH} -acodec pcm_s16le -ac 2 file:${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav && python3 $HOME/BirdNET-Pi/scripts/bat_wav_translate.py ${RECS_DIR}/StreamData/$(date "+%F")-birdnet-RTSP_${RTSP_STREAMS_STARTED_COUNT}-$(date "+%H:%M:%S").wav"; fi' $HOME/*Pi/scripts/birdnet_recording.sh echo "... installing wav translator" cp /helpers/Bat_Model_BE_v1.py "$HOME"/BirdNET-Pi/scripts/bat_wav/translate.py chmod +x "$HOME"/BirdNET-Pi/scripts/bat_wav_translate.py