Summary
Follow up on #47 by adding array-based acoustic APIs to birdnetR.
The file-based encoding API was added in #47, but the array-based APIs were intentionally deferred to keep scope narrow.
Motivation
The underlying Python birdnet package exposes both:
predict_arrays()
encode_arrays()
In birdnetR, array-based support should be added as a coherent pair rather than exposing only one of them. This keeps the acoustic API symmetric across input modalities:
- file input:
predict(), encode()
- array input:
predict_arrays(), encode_arrays()
Proposed scope
- add
predict_arrays() for birdnet_model_acoustic
- add
encode_arrays() for birdnet_model_acoustic
- define and document the R input contract for in-memory audio arrays and sample rates
- add tests for R-to-Python conversion and result handling
- update documentation and pkgdown reference
Notes
Potential design questions to resolve:
- preferred R input structure for audio arrays plus sample rate
- validation rules for array shape and type
- whether helper utilities are needed for user-friendly construction of array inputs
Summary
Follow up on #47 by adding array-based acoustic APIs to
birdnetR.The file-based encoding API was added in #47, but the array-based APIs were intentionally deferred to keep scope narrow.
Motivation
The underlying Python
birdnetpackage exposes both:predict_arrays()encode_arrays()In
birdnetR, array-based support should be added as a coherent pair rather than exposing only one of them. This keeps the acoustic API symmetric across input modalities:predict(),encode()predict_arrays(),encode_arrays()Proposed scope
predict_arrays()forbirdnet_model_acousticencode_arrays()forbirdnet_model_acousticNotes
Potential design questions to resolve: