Nachtzuster / BirdNET-Pi

A realtime acoustic bird classification system for the Raspberry Pi 5, 4B 3B+ 0W2 and more. Built on the TFLite version of BirdNET.
https://birdnetpi.com
Other
133 stars 20 forks source link

Audio analysis failing #208

Open justlen1 opened 2 days ago

justlen1 commented 2 days ago

I am running BirdNet on a Raspberry Pi 4. After several weeks of stable operation I recently ran the software updates. Since then it appears that the recording/analysis of audio fails on a random basis. Sometimes after a couple of hours, quite often within an hour. The log shows:

17:56:04---[server][INFO] LOADING TF LITE MODEL... 17:56:04---INFO: Created TensorFlow Lite XNNPACK delegate for CPU. 17:56:04---[server][INFO] LOADING DONE! 17:56:04---[birdnet_analysis][INFO] backlog is 0 17:56:04---[birdnet_analysis][INFO] backlog done 17:56:36---[birdnet_analysis][ERROR] no more notifications: restarting... 17:56:36---[birdnet_analysis][INFO] handle_reporting_queue done 17:56:40---[server][INFO] LOADING TF LITE MODEL... 17:56:40---INFO: Created TensorFlow Lite XNNPACK delegate for CPU. 17:56:40---[server][INFO] LOADING DONE! 17:56:40---[birdnet_analysis][INFO] backlog is 0 17:56:40---[birdnet_analysis][INFO] backlog done

Restarting the Recording Service seems to resolve the issue temporarily:

18:01:33---[birdnet_analysis][INFO] Analyzing BirdSongs/StreamData/2024-10-01-birdnet-RTSP_1-18:01:15.wav 18:01:33---[server][INFO] READING AUDIO DATA... 18:01:33---[server][INFO] READING DONE! READ 10 CHUNKS. 18:01:33---[server][INFO] ANALYZING AUDIO... 18:01:36---[server][INFO] DONE! Time 2.84 SECONDS 18:01:36---[server][INFO] 0.0;3.0-('Branta canadensis_Canada Goose', 0.12079563) 18:01:36---[server][INFO] 1.5;4.5-('Branta canadensis_Canada Goose', 0.3732961) 18:01:36---[server][INFO] 3.0;6.0-('Branta canadensis_Canada Goose', 0.34368142) 18:01:36---[server][INFO] 4.5;7.5-('Gavia immer_Common Loon', 0.15438817) 18:01:36---[server][INFO] 6.0;9.0-('Branta canadensis_Canada Goose', 0.112380795) 18:01:36---[server][INFO] 7.5;10.5-('Branta canadensis_Canada Goose', 0.05837626) 18:01:36---[server][INFO] 9.0;12.0-('Branta canadensis_Canada Goose', 0.032151874) 18:01:36---[server][INFO] 10.5;13.5-('Cygnus columbianus_Tundra Swan', 0.0765289) 18:01:36---[server][INFO] 12.0;15.0-('Glaucidium gnoma_Northern Pygmy-Owl', 0.24990916) 18:01:36---[server][INFO] 13.5;16.5-('Glaucidium gnoma_Northern Pygmy-Owl', 0.16708429)

alexbelgium commented 2 days ago

Hi, birdnet pi is super stable on a rpi4. You should start to check wfh your power supply, sd card, and stability of microphone (is it a rtsp from a camera or a true mix)

justlen1 commented 1 day ago

That's great info. I'm using RTSP and I thing the recording service doesn't recover gracefully if there's a hiccup in the stream. I may add a restart for the service to crontab.