BirdNET-Analyzer
                                
                                 BirdNET-Analyzer copied to clipboard
                                
                                    BirdNET-Analyzer copied to clipboard
                            
                            
                            
                        Adding BirdWeather integration to allow for PUC data processing
          I'm very interested in the dedicated integration with BirdWeather as it's something I've been considering implementing myself.  Has any progress been made on this? Did you have any thoughts on how this should be implemented? Would you accept a pull request?
Originally posted by @PeteLawrence in https://github.com/kahst/BirdNET-Analyzer/issues/69#issuecomment-1616685218
Is this something we could implement? Meaning, if people have a BirdWeather ID, can they upload detection results to BirdWeather after analyzing the files from PUC SD cards.
What do people think would be the best way of doing this?
Yes this could work. we add a flag to upload results to birdweather automatically and people save their BirdWeather ID in dot environment for example.
There are few considerations for BirdWeather integration:
- Integration is based on soundscapes, which is a wav file uploaded to BirdWeather API.
- BirdNET analyzer would need to extract some length clip from analyzed file for submission, uploading hours long recordings would be pointless I think and could also pose a privacy risk.
 
- API submissions require start time and end time for each soundscape and time of actual detection, this has to be evaluated from recordings, I don't know if PUC recordings contain timestamp in a filename of in some external metadata
- BirdWeather API documentation is incomplete, it does not contain request needed to submit detections
- When I added BirdWeather integration to BirdNET-Go I reverse engineered API requests from BirdNET-Pi code. I notified Tim about documentation lacking some key requests but seems that they have ignored it.
 
As I'd love to see this work - I'm happy to offer whatever level of support is needed.
Thanks Tim, can you please take a look at the missing API doc? We probably also want some kind of filter to reduce the number of submissions to AWS S3, right?
API docs have been updated as requested.
Checking in on this, now that the API docs have been updated is this something that could be looked into / implemented? Happy to help/test.
I'm curious about the use case. (Not questioning, just genuinely curious!) I have several BirdWeather PUCs. When I record with them in the field I'll just let them upload to BirdWeather on their own and let BirdWeather run everything through BirdNET as it does.
I also have a few ARUs from Wildlife Acoustics. Often I'll just run the data through BirdNET running locally and do whatever I wish with the results.
I've also taken the files straight off the Wildlife Acoustics ARU and sent those files to BirdWeather for analysis, without it touching BirdNET locally at all since BirdWeather runs the recordings through BirdNET. (I did this with permission from BirdWeather as I'm not sure they want to be "BirdNET as a service" for loads of third-party devices.)
To do this, I mimicked the settings from the BirdWeather PUC as closely as possible, sent an API request to create a new station and fetch the credentials, then posted each of the soundscapes for analysis. BirdWeather then processed those files through BirdNET and created their own "detection" objects with the identification from the soundscapes that had detections. Those detections are then visible through the rest of the BirdWeather tools as if it had come from a BirdWeather PUC.
I think your last point is effectively what I'm looking to do, I have an owlsense recorder (though could do similar to your ARU) that I'd run through BirdNET-Analyzer, then upload to BirdWeather as if it were a PUC to display on the map.
But what is the point of uploading possibly days old detections to BirdWeather? Also BirdWeather does not allow dynamic location from anything else than PUC devices, I tried to supply coordinates with uploads from BirdNET-Go but they are silently ignored.
When I've uploaded soundscapes for analysis to BirdWeather the coordinates have been respected. (Lots of short soundscapes, each with their own coordinates.)
my thought on BirdWeather specifically was to use it just for the UI of looking back on a hike/trip/weekend. Filter to whatever date, find my "station" that is created, and view just for that station for those dates. I suppose then if someone used birdweather to look into that date range my station would pull in as well. My plans for the OwlSense are to use while camping.
Well I could add BirdWeather upload for my BirdNET-Go file analysis if people have BW token which allow dynamic location and this is useful.
We're happy to host detections, as Stefan mentioned, long-term soundscape storage on AWS is rather a bit more costly for us, so they would be subject to a purge schedule.
At present we only have (2) Station Types -- PUC and BirdNET-Pi. As Tomi mentioned, when uploading (pre-processed) detections, they won't 'honor' the location data, as they aren't PUC stations (which have built-in GPS), but instead BirdNET-Pi stations which are locked to a location.
What Tim was doing is using our full analysis workflow as if it was coming from a PUC -- where we use Lambda to run BirdNET on the soundscape, store the soundscape, and any detections. In that case, it will honor the locations. But it's obviously not 'free' for us, so if people did start analyzing TBs of historical soundscapes, we'd be out of business pretty quickly (as our only revenue stream is from the sale of PUCs).
I swear I'm not doing this on purpose, this is the 2nd time I've accidentally commented under my work account, so annoying!
In the case of my intended use, the sound files would be marked with a location coming from the device, as you set the location via a mobile app at the start of the recording period. Maybe there could be a 3rd station type that would honor the location data if present but require pre-processed detections, having gone through birdnet-analyzer from me locally? I don't imagine I'd be looking at these for much longer than a month or two, just nice to have a visual to send to family/friends when we get back and look at with my son.