birdnet

August 21, 2026 Β· View on GitHub

CI codecov PyPI PyPI MIT Support our work

A Python library for identifying bird species by their sounds.

The library is geared towards providing a robust workflow for ecological data analysis in bioacoustic projects. While it covers essential functionalities, it doesn’t include all the features found in BirdNET-Analyzer, which is available here. Some features might only be available in the BirdNET Analyzer and not in this package.

Note

This project is under active development, so you might encounter changes that could affect your current workflow. We recommend checking for updates regularly.

The package is also available as an R package at: birdnetR.

Features

  • 🐦 Extract classification scores and embeddings from audio recordings β€” 6,522 species (V2.4) or 11,000+ (V3.0 preview)
  • πŸ“ Predict species presence for a given location and time β€” 6,522 species (V2.4) or 12,000+ (V3.0)
  • 🧠 Utilize your custom-trained acoustic models from BirdNET-Analyzer
  • βš™οΈ Support for both CPU and GPU execution (including multiple GPUs at the same time)
  • πŸš€ Multiprocessing support for fast batch analysis of large datasets
  • πŸ’Ύ Low memory footprint and small disk space requirements
  • 🎡 Support for various audio file formats (WAV, FLAC, OGG, MP3, etc.)
  • πŸ“Š Export results in various output file formats (CSV, Arrow table, Parquet, Numpy, etc.)
  • πŸ’» Cross-platform: Windows, macOS, and Linux
  • 🌍 Use multilingual species names (English, German, French, Spanish, etc.)
  • ⬇️ Auto-download of all official models
  • πŸ›œ Full offline usage using local (custom) model files

The library is optimized for a minimal memory footprint and maximum scalability, making it suitable for both edge devices and high-performance computing clusters.

Speed benchmarks

DeviceSpecsDiskOSReal-time factorTime to predict 1 h
Intel i7 8th Gen4 coresNVMeWindows50Γ—72 s
Ryzen 7 3800X8 coresNVMeLinux420Γ—8.5 s
Nvidia Titan RTX24 GB VRAMNVMeLinux2460Γ—1.5 s

For more detailed benchmarks, please refer to the documentation.

Installation

Instructions

TensorFlow is an optional dependency. The base package ships ONNX Runtime and LiteRT wherever they have wheels (everywhere but macOS x86_64 on Python 3.14 for ONNX Runtime; see the footnote for LiteRT), so it runs the V3.0 models out of the box; the TensorFlow-based backends come with the tf extra:

# Base: acoustic 3.0 + geo 3.0 via the onnx backend, 2.4 models via LiteRT
pip install birdnet --user

# TensorFlow: the tf (TFLite) and pb (ProtoBuf) backends, i.e. the 2.4 models with
# default settings, custom classifiers, Perch V2 and geo 3.0 tf
pip install birdnet[tf] --user

# TensorFlow with CUDA (Linux; NVIDIA driver and CUDA need to be installed in advance)
pip install birdnet[and-cuda] --user

# PyTorch backend for the 3.0 models (.pt models)
pip install birdnet[pt] --user
InstallRuntimesEnables
birdnetONNX Runtime, LiteRT*acoustic 3.0 and geo 3.0 (onnx); acoustic 2.4, custom 2.4 classifiers and geo 2.4 (tf with library="litert")
birdnet[tf]+ TensorFlowtf with the default TFLite interpreter and pb for all models: acoustic/geo 2.4, acoustic/geo 3.0, custom TFLite/ProtoBuf/Raven classifiers, Perch V2
birdnet[and-cuda]+ TensorFlow with CUDA (Linux)as [tf], plus GPU for the pb backends
birdnet[pt]+ PyTorchacoustic 3.0 and geo 3.0 (pt, CPU/GPU)
birdnet[onnx](compatibility alias)ONNX Runtime is part of the base install
birdnet[repro]exact pinned versions incl. TensorFlowreproducible results (Python 3.12, CPU)

* LiteRT (ai-edge-litert) is installed with the base package on Linux, macOS ARM64 and Windows x86_64 for Python 3.11–3.13 (no wheels elsewhere; on 3.14 add it with pip install ai-edge-litert). It runs the 2.4 .tflite models (acoustic 2.4, custom 2.4 classifiers, geo 2.4; pass library="litert" to birdnet.load(..)) and does not need TensorFlow. Without the tf extra, birdnet.load("acoustic", "2.4", "tf") raises a ValueError naming both options.

import birdnet

# base install
model_onnx = birdnet.load("acoustic", "3.0", "onnx")
predictions_onnx = model_onnx.predict("example/soundscape.wav")

model_litert = birdnet.load("acoustic", "2.4", "tf", library="litert")
predictions_litert = model_litert.predict("example/soundscape.wav")

# birdnet[tf]: the default TFLite interpreter
model_tflite = birdnet.load("acoustic", "2.4", "tf")
predictions_tflite = model_tflite.predict("example/soundscape.wav")

Platform support and Python versions

The TensorFlow-based backends (birdnet[tf]) are limited to the platforms and Python versions TensorFlow ships wheels for:

PlatformArchitectureProtoBuf-CPUProtoBuf-GPUTFLiteLiteRT
Linuxx86_643.11, 3.12, 3.133.11, 3.12, 3.133.11, 3.12, 3.133.11, 3.12, 3.13
ARM643.11, 3.12, 3.13/3.11, 3.12, 3.133.11, 3.12, 3.13
MacOSx86_643.11, 3.12/3.11, 3.12/
ARM643.11, 3.12, 3.13/3.11, 3.12, 3.133.11, 3.12, 3.13
Windowsx86_643.11, 3.12, 3.13/3.11, 3.12, 3.133.11, 3.12, 3.13
ARM64////

For details see the official TensorFlow documentation. The base install (onnx backend, pt extra) has no such restriction beyond ONNX Runtime's and PyTorch's own wheels (ONNX Runtime's last macOS x86_64 build is 1.23.2, with no Python 3.14 wheel).

Python 3.14

TensorFlow does not yet publish wheels for Python 3.14, so birdnet[tf] installs nothing extra there and the table above stops at 3.13. The base install works as everywhere else: the acoustic 3.0 and geo 3.0 models via onnx (or pt), and β€” after pip install ai-edge-litert β€” the acoustic 2.4 model, custom 2.4 classifiers and the geo 2.4 model via the tf backend on LiteRT (library="litert"). The TensorFlow-only paths β€” the pb backend, the tf backend with the default tflite interpreter, and the Perch model β€” raise a clear error on Python 3.14; to use them, install birdnet[tf] on Python 3.11–3.13.

If you encounter issues with audio file reading, please ensure that libsndfile is installed on your system.

  • Ubuntu/Debian: sudo apt-get install libsndfile1
  • macOS (using Homebrew): brew install libsndfile
  • Windows: Download and install the precompiled binaries from the official website, extract them and add the folder to path.

Supported operations, precisions and devices

V2.4

ModelAcousticAcousticAcousticGeoGeo
BackendTFLite/
LiteRT
ProtoBufProtoBuf
Raven*
TFLite/
LiteRT
ProtoBuf
predict(..)βœ…βœ…βœ…βœ…βœ…
encode(..)βœ…βœ…βŒβŒβŒ
INT8CPU❌❌❌❌
FP16CPU❌❌❌❌
FP32CPUCPU/GPUCPU/GPUCPUCPU/GPU

βœ… = Supportedβ€ƒβŒ = Not supported
*ProtoBuf Raven is only available for custom acoustic models.

V3.0

The V3.0 acoustic and geo models are both available in four backends (TFLite/LiteRT, ProtoBuf, PyTorch and ONNX). ONNX Runtime is part of the base install; TFLite and ProtoBuf require birdnet[tf], and the PyTorch backend requires birdnet[pt].

ModelAcousticAcousticAcousticAcousticGeoGeoGeoGeo
BackendTFLite/
LiteRT
ProtoBufPyTorchONNXTFLite/
LiteRT
ProtoBufPyTorchONNX
predict(..)βœ…βœ…βœ…βœ…βœ…βœ…βœ…βœ…
encode(..)βœ…βœ…βœ…βœ…βŒβŒβŒβŒ
INT8❌❌❌❌CPU❌❌❌
FP16CPU❌❌CPU/GPUCPU❌❌CPU/GPU
FP32CPUCPU/GPUCPU/GPUCPU/GPUCPUCPU/GPUCPU/GPUCPU/GPU

βœ… = Supported ❌ = Not supported

Load a V3.0 model by passing the version and backend, e.g. birdnet.load("acoustic", "3.0", "onnx") or birdnet.load("geo", "3.0", "tf").

Perch V2

ModelAcousticGeo
BackendProtoBuf❌
predict(..)βœ…βŒ
encode(..)βœ…βŒ
INT8❌❌
FP16❌❌
FP32CPU/GPU❌

Note: Perch can not be run on Intel macOS systems due to compatibility issues with TensorFlow.

Example usage

The examples use the 2.4 models on the tf backend, which needs pip install birdnet[tf] (or library="litert" on the base install, see Installation).

Identify species within an audio file

import birdnet

model = birdnet.load("acoustic", "2.4", "tf")

predictions = model.predict(
  "example/soundscape.wav",
  # predict only the species from the file
  custom_species_list="example/species_list.txt",
)

predictions.to_csv("example/predictions.csv")

The resulting predictions look like this (excerpt, scores may vary):

inputstart_timeend_timespecies_nameconfidence
/home/.../example/soundscape.wav00:00:00.0000:00:03.00Poecile atricapillus_Black-capped Chickadee0.814
/home/.../example/soundscape.wav00:00:03.0000:00:06.00Poecile atricapillus_Black-capped Chickadee0.3084
/home/.../example/soundscape.wav00:00:06.0000:00:09.00Baeolophus bicolor_Tufted Titmouse0.1864
/home/.../example/soundscape.wav00:00:09.0000:00:12.00Haemorhous mexicanus_House Finch0.6392
/home/.../example/soundscape.wav00:00:18.0000:00:21.00Cyanocitta cristata_Blue Jay0.4353
/home/.../example/soundscape.wav00:00:21.0000:00:24.00Cyanocitta cristata_Blue Jay0.3291
/home/.../example/soundscape.wav00:00:21.0000:00:24.00Haemorhous mexicanus_House Finch0.1866
...............

For a more detailed prediction you can take a look at example/predictions.csv.

Predict species for a given location and time

import birdnet

model = birdnet.load("geo", "2.4", "tf")

predictions = model.predict(42.5, -76.45, week=4)

predictions.to_csv("example/location.csv")

The resulting predictions look like this (excerpt, scores may vary; sorted alphabetically):

species_nameconfidence
Acanthis flammea_Common Redpoll0.0442
Accipiter cooperii_Cooper's Hawk0.0812
Agelaius phoeniceus_Red-winged Blackbird0.0996
Anas platyrhynchos_Mallard0.4468
Anas rubripes_American Black Duck0.11
......

The full result is at example/location.csv.

Location of Log File

Each prediction or encoding session writes its own log file to the system temp directory:

  • Windows: C:\Users\{user}\AppData\Local\Temp\birdnet_session_*.log
  • Linux/MacOS: /tmp/birdnet_session_*.log

Environment variables

VariableDefaultEffect
BIRDNET_APP_DATAplatform app data dirWhere downloaded models, labels and the taxonomy are cached. Set it to a persistent path in ephemeral environments.
BIRDNET_TF_VERBOSE0Set to 1 to let TensorFlow's native startup output through. It is hidden by default, because TensorFlow prints its absl::InitializeLog warning and oneDNN notice on every import β€” and every worker process imports it, so one prediction emits dozens of lines. Diagnostics from a failed import are always shown, whatever this is set to.
BIRDNET_START_METHODspawnMultiprocessing start method: spawn, forkserver or fork. See the documentation before choosing fork.

File formats

The audio models support all formats compatible with the SoundFile library (see here). This includes, but is not limited to, WAV, FLAC, OGG, and AIFF. The flexibility of supported formats ensures that the models can handle a wide variety of audio input types, making them adaptable to different use cases and environments.

  • Supported: AIFC, AIFF, AU, AVR, CAF, FLAC, HTK, IRCAM, MAT4, MAT5, MP3, MPC2K, NIST, OGG, OPUS, PAF, PVF, RAW, RF64, SD2, SDS, SVX, VOC, W64, WAV, WAVEX, WVE, XI
  • Not supported at the moment: AAC, M4A, WMA

Model formats and execution details

Depending on the model version, this project provides up to four model formats: Protobuf/Raven, TFLite, PyTorch and ONNX. All formats are designed to have identical precision up to 2 decimal places, with differences only appearing from the third decimal place onward.

  • TFLite Model (tf): Limited to CPU execution only. Requires birdnet[tf] for the default TFLite interpreter; the LiteRT interpreter (library="litert") is part of the base install where wheels exist.
  • ProtoBuf Model (pb): Can be executed on both GPU and CPU. Requires birdnet[tf] (birdnet[and-cuda] for GPU).
  • PyTorch Model (pt, V3.0 only): Can be executed on both GPU and CPU. Requires birdnet[pt].
  • ONNX Model (onnx, V3.0 only): Can be executed on both GPU and CPU. Part of the base install (CPU build); for GPU replace it with the GPU build after installing, since only one of the two may be installed: pip uninstall onnxruntime && pip install onnxruntime-gpu (pip check will then report the missing onnxruntime, and every later pip install/upgrade of birdnet puts the CPU build back β€” redo the swap).

Ensure your environment is configured to utilize the appropriate model and available hardware optimally.

License

Please ensure you review and adhere to the specific license terms provided with each model. Note that educational and research purposes are considered non-commercial use cases.

Citation

Feel free to use birdnet for your acoustic analyses and research. If you do, please cite as:

@article{kahl2021birdnet,
  title={BirdNET: A deep learning solution for avian diversity monitoring},
  author={Kahl, Stefan and Wood, Connor M and Eibl, Maximilian and Klinck, Holger},
  journal={Ecological Informatics},
  volume={61},
  pages={101236},
  year={2021},
  publisher={Elsevier}
}

Funding

Our work in the K. Lisa Yang Center for Conservation Bioacoustics is made possible by the generosity of K. Lisa Yang to advance innovative conservation technologies to inspire and inform the conservation of wildlife and habitats.

The development of BirdNET is supported by the German Federal Ministry of Research, Technology and Space (FKZ 01|S22072), the German Federal Ministry for the Environment, Climate Action, Nature Conservation and Nuclear Safety (FKZ 67KI31040E), the German Federal Ministry of Economic Affairs and Energy (FKZ 16KN095550), the Deutsche Bundesstiftung Umwelt (project 39263/01) and the European Social Fund.

Partners

BirdNET is a joint effort of partners from academia and industry. Without these partnerships, this project would not have been possible. Thank you!

Our partners