This is a breaking release. The package API has been redesigned to align
with the upstream birdnet Python package (>=0.2.16,<0.3). Legacy entry points
are removed without a deprecation cycle.
The table below maps removed functions to their replacements:
| Removed | Replacement |
|---|---|
birdnet_model_tflite(...) |
load_birdnet(..., backend = "tf", library = "tflite") |
birdnet_model_protobuf(...) |
load_birdnet(..., backend = "pb") |
birdnet_model_meta(...) |
load_birdnet(type = "geo", ...) |
birdnet_model_custom(...) |
load_custom(...) |
predict_species_from_audio_file(model, ...) |
predict(model, files = ...) |
predict_species_at_location_and_time(model, ...) |
predict(model, latitude = ..., longitude = ..., ...) |
labels_path(model) |
get_species_list(model) |
read_labels(path) |
get_species_list(model) on a loaded model |
available_languages(version) |
supported_languages() |
get_top_prediction() |
Removed; use dplyr::slice_max() or birdnetTools |
- All legacy model loaders (
birdnet_model_tflite(),birdnet_model_protobuf(),birdnet_model_meta(),birdnet_model_custom()) are removed. Useload_birdnet()orload_custom()instead. load_model()has been renamed toload_birdnet()to distinguish it from the futureload_perch()loader (#45).predict_species_from_audio_file()andpredict_species_at_location_and_time()are removed. Usepredict()on a loaded model.labels_path()andread_labels()are removed. Useget_species_list(model)instead.available_languages()is removed. Usesupported_languages().get_top_prediction()is removed. Usedplyr::slice_max()or thebirdnetToolspackage for post-processing.- The
labelsargument inload_custom()is replaced byspecies_list. predict()for geo models now defaultsmin_confidenceto0.03to match the upstream Pythonbirdnetdefault.
encode()extracts embedding vectors from audio files using a BirdNET acoustic model. Results are wrapped in abirdnet_encodingS3 class and can be converted to a data frame viaas.data.frame(), where embeddings are stored as a list column (#47).load_perch()loads the Perch v2 acoustic model (CPU only). The returned model object is compatible with the existingpredict()andas.data.frame()workflows (#46). Device selection is not exposed, consistent withload_birdnet().load_birdnet()now supportstype,version,backend,library,precision, andlanguagearguments for flexible model loading.load_custom()gains advanced argumentsclassifier_typeandis_ravenfor custom model configurations.supported_model_configurations()returns all valid model configuration combinations.supported_languages()returns the set of supported language codes.get_species_list(model)retrieves the species list from a loaded model.write_predictions()saves prediction results directly from Python to CSV, Parquet, or NumPy format without crossing the R boundary.birdnet_version()returns the installed Python version, executable path, andbirdnetpackage version.predict()for acoustic models now exposes performance parametersn_producers,n_workers,batch_size,prefetch_ratio,speed,half_precision, andmax_audio_duration_min; these default toNULLso the Python backend defaults are used unless explicitly set.predict()for geo models now exposeshalf_precision, defaulting toNULLso the Python backend default is used unless explicitly set.
load_perch()internally hardcodes CPU for the upstream Python call; thedeviceargument is not exposed to users (#46).supported_model_configurations()documentation now explicitly notes that Perch v2 is excluded from the table and directs users toload_perch()(#46).supported_model_configurations()no longer advertises acoustic version"2"(Perch v2), which is not loadable viaload_birdnet()(#45).- Integer-like parameter validation (
top_k,bandpass_fmin, etc.) now silently accepts whole-number doubles (e.g.5) in addition to integer values (e.g.5L) (#45). as.data.frame()for acoustic and geo prediction objects now converts results via a Python dict helper that callsto_structured_array()and returns plain Python lists and numpy arrays, bypassingpandasentirely. This fixes corrupt data frames caused by Arrow-backedStringDtypecolumns introduced in pandas >= 2 when pyarrow is installed.
- Removes defunct and deprected functions
init_model()andinstall_birdnet(). - Includes some minor changes to take CRAN Reviewer comments into account.
- use
recticulate::py_require()to resolve python dependencies in an ephemeral virtual environment - refactors tests to use a hybrid approach of unit tests and mocking without the
birdnetpython package, and full integration tests that depend on thebirdnetpython package. Seetests/TEST_PLAN.mdfor more details. - initial CRAN release preparations
install_birdnet()is now a defunctioned. It is no longer needed to install thebirdnetpython package manually. The package will be installed automatically when you use it for the first time.
- updates
birdnetPython package to0.1.7. - Fixes #21: unable to initialize model
- Added a check if audio file is mono
- install the TensorFlow Metal Plugin for GPU support on Apple devices #25
- optionally use Apache Arrow to improve performance by reducing memory usage during data conversion and minimizing data copying between R and Python. #26
This update brings significant changes and improvements, including support for loading pre-existing and custom-trained models, aligning the package with birdnet 0.1.6.
- The
init_model()function is now deprecated and will be removed in the next version. Please use thebirdnet_model_*function family for model initialization. available_languages()update: A new argument has been added toavailable_languages()to specify the BirdNET version, making it more flexible for different model versions.- Renaming
get_labels_pathtolabels_path(). It now requires a model object as its first argument. predict_species()was renamed topredict_species_from_audio_file()predict_species_at_location_and_time()was changed to requirer a model object as first argument.
- Support for Custom Models: You can now load custom-trained models
- A new set of functions (
birdnet_model_*) to load pre-existing and custom-trained models. These functions offer a more flexible approach to model loading. See?birdnet_model_loadfor more details. - S3 Object-Oriented System: The models are now implemented as S3 classes, and most of the functionality related to these models is provided through methods. This update makes the API cleaner and more consistent, and allows for better extensibility in future versions.
Uses birdnet v0.1.6 under the hood to fix an issue when downloading models.
No new functionality has yet been implemented.
The update of birdnet to 0.1.1 brings:
- Add parameter 'chunk_overlap_s' to define overlapping between chunks
- Remove parameter 'file_splitting_duration_s' instead load files in 3s chunks
- Remove 'librosa' dependency
Other:
- check of the correct version of
birdnetis installed in the current virtual environment - expand vignette on how to use virtual environments
- initial release