joeweiss / birdnetlib

A python api for BirdNET-Lite and BirdNET-Analyzer
https://joeweiss.github.io/birdnetlib/
Apache License 2.0
41 stars 14 forks source link

Add WAV buffer support #76

Closed elementechemlyn closed 1 year ago

elementechemlyn commented 1 year ago

This Pull Request implements a RecordingBuffer class. RecordingBuffer is a version of Recording that accepts a buffer of WAV data rather than the path to a file on disk.

Code that is common to both RecordingBuffer and Recording as been moved to a RecordingBase class.

An example of how to use RecordingBuffer to implement a simple server capable for processing a stream of WAV data is included:

examples/simple_tcp_server.py

joeweiss commented 1 year ago

@elementechemlyn This looks great!

I forgot to mention. The library is going from GPLv3 to Apache 2. Just wanted your sign-off that the license change is ok with you since this PR will land before the license change.

Apologies for not mentioning that before you sent the PR.

elementechemlyn commented 1 year ago

@elementechemlyn This looks great!

I forgot to mention. The library is going from GPLv3 to Apache 2. Just wanted your sign-off that the license change is ok with you since this PR will land before the license change.

Apologies for not mentioning that before you sent the PR.

No problem - fine by me.