-
-
Notifications
You must be signed in to change notification settings - Fork 19
Home
BirdNET-Go is a application inspired by BirdNET-Pi and BirdNET Analyzer, it aims to be high performance and simple to deploy alternative for both of these.
- Audio analysis based on BirdNET 2.4 tflite model
- Runs on Windows, Linux (inc. Raspberry Pi) and macOS
- File analysis support for WAV files
- 24/7 realtime analysis of soundcard capture
- Analysis output to Raven table, csv file, SQLite or MySQL
- Realtime analysis output compatible with OBS chat log input for wildlife streams
- Birdweather API support on realtime analysis
- Localized species labels thanks to translations by @patlevin
- Minimal runtime dependencies, BirdNET TensorFlow Lite model is embedded in executable
BirdNET-Go has been tested to work on
- Raspberry Pi 3B+ with 512MB RAM
- Raspberry Pi 4B with 4GB RAM
- Intel NUC running Windows 10
- Intel desktop PC running Windows 11
- Intel MacBook Pro
For 24/7 realtime detection Raspberry Pi 3B+ is more than enough, it can process 3 second segments in ~500ms.
TPU accelerators such as Coral.AI are not supported due to incompatibility with BirdNET tflite model.
Pre-compiled BirdNET-Go executables are available at https://github.com/tphakala/birdnet-go/releases/, unzip birdnet-go in any directory you wish to run it in, on Windows for example c:\users\username\birdnet-go.
In addition to BirdNET-Go executable you also need TensorFlow Lite C library which is available for download at https://github.com/tphakala/tflite_c/releases. Download library for your target platform and install it in proper library path for your system
- On Linux copy libtensorflowlite_c.so to /usr/local/lib and run "sudo ldconfig"
- On macOS libtensorflowlite_c.dylib to /usr/local/lib
- On Windows copy libtensorflowlite_c.so to BirdNET-Go executable directory or any other directory in system PATH
BirdNET-Go accepts several settings from command line but main configuration method is through configuration file which is created when birdnet-go is first run
Configuration file location is operating system depended and there is alternative locations for user preference.
On Linux and macOS default and primary location for configuration file is $HOME/.config/birdnet-go/config.yaml for user specific deployment, alternative location is /etc/birdnet-go/config.yaml for system wide deployment.
On Windows default and primary configuration file location is config.yaml in birdnet-go.exe installation directory, secondary location is C:\User\username\AppData\Local\birdnet-go\config.yaml
# BirdNET-Go configuration
debug: false # print debug messages, can help with problem solving
# Node specific settings
node:
name: BirdNET-Go # name of node, can be used to identify source of notes
locale: en # language to use for labels
timeas24h: true # true for 24-hour time format, false for 12-hour time format
threads: 0 # 0 to use all available CPU threads
# BirdNET model specific settings
birdnet:
sensitivity: 1.0 # sigmoid sensitivity, 0.1 to 1.5
threshold: 0.8 # threshold for prediction confidence to report, 0.0 to 1.0
overlap: 0.0 # overlap between chunks, 0.0 to 2.9
latitude: 00.000 # latitude of recording location for prediction filtering
longitude: 00.000 # longitude of recording location for prediction filtering
# Realtime processing settings
realtime:
processingtime: false # true to report processing time for each prediction
audioexport:
enabled: false # true to export audio clips containing indentified bird calls
path: clips/ # path to audio clip export directory
type: wav # audio file type, wav, mp3 or flac
log:
enabled: false # true to enable OBS chat log
path: birdnet.txt # path to OBS chat log
interval: 15 # minimum interval between repeating log messages in seconds
birdweather:
enabled: false # true to enable birdweather uploads
debug: false # true to enable birdweather api debug mode
id: 00000 # birdweather ID
threshold: 0.9 # threshold of prediction confidence for uploads, 0.0 to 1.0
# Ouput settings
output:
file:
enabled: true # true to enable file output for file and directory analysis
path: output/ # path to output directory
type: table # ouput format, Raven table or csv
# Only one database is supported at a time
# if both are enabled, SQLite will be used.
sqlite:
enabled: false # true to enable sqlite output
path: birdnet.db # path to sqlite database
mysql:
enabled: false # true to enable mysql output
username: birdnet # mysql database username
password: secret # mysql database user password
database: birdnet # mysql database name
host: localhost # mysql database host
port: 3306 # mysql database port
af: Afrikaans
ca: Catalan
cs: Czech
zh: Chinese
hr: Croatian
da: Danish
nl: Dutch
en: English
et: Estonian
fi: Finnish
fr: French
de: German
hu: Hungarian
is: Icelandic
id: Indonesia
it: Italian
ja: Japanese
lv: Latvian
lt: Lithuania
no: Norwegian
pl: Polish
pt: Portugues
ru: Russian
sk: Slovak
sl: Slovenian
es: Spanish
sv: Swedish
th: Thai
uk: Ukrainian
birdnet-go is a CLI application with 2 main operating modes, file analysis and realtime analysis
File analysis is enabled by **file **flag, you can define additional options such as BirdNET detection threshold, sensitivity or number of CPU threads used by tflite. Default format for file analysis results is Raven table and output is saved in output/inputfilename.wav.txt.
File analysis works best with WAV files which are recorded in 48k sample rate, BirdNET-Go has very simple resampling algorithm which allows ingestion of audio files with alternative sample rates but detection accuracy will be degraded. Input file bit depths of 16, 24 and 32 (int) are supported.
raspberry$ ./birdnet-go file soundscape.wav --threshold 0.1
Read config file: /etc/birdnet-go/config.yaml
BirdNET GLOBAL 6K V2.4 FP32 model initialized, using 4 threads of available 4 CPUs
Analysis completed, total time elapsed: 8 second(s)
Output written to output/soundscape.wav.txt
raspberry$ cat output/soundscape.wav.txt
Selection View Channel Begin File Begin Time (s) End Time (s) Low Freq (Hz) High Freq (Hz) Species Code Common Name Confidence
1 Spectrogram 1 1 soundscape.wav 0.0 3.0 0 15000 bkcchi Black-capped Chickadee 0.9016
2 Spectrogram 1 1 soundscape.wav 3.0 6.0 0 15000 bkcchi Black-capped Chickadee 0.2293
4 Spectrogram 1 1 soundscape.wav 9.0 12.0 0 15000 houfin House Finch 0.7025
7 Spectrogram 1 1 soundscape.wav 18.0 21.0 0 15000 blujay Blue Jay 0.4036
8 Spectrogram 1 1 soundscape.wav 21.0 24.0 0 15000 blujay Blue Jay 0.2557
10 Spectrogram 1 1 soundscape.wav 27.0 30.0 0 15000 merlin Merlin 0.1787
12 Spectrogram 1 1 soundscape.wav 33.0 36.0 0 15000 daejun Dark-eyed Junco 0.4388
13 Spectrogram 1 1 soundscape.wav 36.0 39.0 0 15000 daejun Dark-eyed Junco 0.2882
14 Spectrogram 1 1 soundscape.wav 39.0 42.0 0 15000 houfin House Finch 0.1649
15 Spectrogram 1 1 soundscape.wav 42.0 45.0 0 15000 daejun Dark-eyed Junco 0.8249
18 Spectrogram 1 1 soundscape.wav 51.0 54.0 0 15000 houfin House Finch 0.1684
19 Spectrogram 1 1 soundscape.wav 54.0 57.0 0 15000 houfin House Finch 0.6576
21 Spectrogram 1 1 soundscape.wav 60.0 63.0 0 15000 daejun Dark-eyed Junco 0.5821
24 Spectrogram 1 1 soundscape.wav 69.0 72.0 0 15000 houfin House Finch 0.2088
25 Spectrogram 1 1 soundscape.wav 72.0 75.0 0 15000 houfin House Finch 0.5951
27 Spectrogram 1 1 soundscape.wav 78.0 81.0 0 15000 houfin House Finch 0.1680
28 Spectrogram 1 1 soundscape.wav 81.0 84.0 0 15000 hawfin Hawfinch 0.1956
29 Spectrogram 1 1 soundscape.wav 84.0 87.0 0 15000 houfin House Finch 0.1953
31 Spectrogram 1 1 soundscape.wav 90.0 93.0 0 15000 amegfi American Goldfinch 0.3799
32 Spectrogram 1 1 soundscape.wav 93.0 96.0 0 15000 houfin House Finch 0.2400
33 Spectrogram 1 1 soundscape.wav 96.0 99.0 0 15000 amegfi American Goldfinch 0.4648
35 Spectrogram 1 1 soundscape.wav 102.0 105.0 0 15000 houfin House Finch 0.4192
38 Spectrogram 1 1 soundscape.wav 111.0 114.0 0 15000 engine Engine 0.5252
39 Spectrogram 1 1 soundscape.wav 114.0 117.0 0 15000 engine Engine 0.1538
40 Spectrogram 1 1 soundscape.wav 117.0 120.0 0 15000 amegfi American Goldfinch 0.3417
Realtime analysis requires audio capture device from which audio is ingested for analysis, input audio format should be 16 bit, 48000 hz, stereo input is downmixed to 1 channel. Realtime analysis works by reading PCM audio to internal buffer, this buffer is read by another thread as sliding window buffer in 1.5 second intervals until 3 seconds of unprocessed audio is captured. 3 second chunks are fed to BirdNET model for analysis.
Results of realtime analysis can be saved to log file and SQLite or MySQL database. Log file format is suitable to be used as chat log overlay in Open Broadcaster Software for wildlife streams etc. Database is suitable for BirdNET-Pi like interface for visualizing bird observations.
BirdNET-Go uses miniaudio library for audio device access, supported audio backends for miniaudio are
Linux
- ALSA
- Pulse Audio
- JACK
Windows
- WASAPI
- DirectSound
- WinMM
macOS
- Core Audio
On Linux I have tested ALSA and Pulse Audio, of which latter is recommended.
Make sure Pulse Audio is installed on your system and set Pulse Audio to output 16bit 48000 hz audio by editing /etc/pulse/daemon.conf to contain following
default-sample-format = s16le
default-sample-rate = 48000
Make sure that recording device is set to 16 bit 48000 hz mode, 2 channel source is downmixed to 1 channel internally in BirdNET-Go.
BirdNET-Go supports Birdweather API for uploading captured audio clips and BirdNET results to birdweather.com. For Birdweather API access you need a token which can be requested by email from tim@birdweather.com. You can use following template for token request
Hi, Tim, and thank you so much for BirdWeather.com!
Below is the information I would like to use to request a BirdWeather ID
Latitude=
Longitude=
City= [ City ]
State= [ State ]
Country= [ Country ]
Thank you so much!
[ Your Name ]
Disclaimer: By requesting this BirdWeather ID, I acknowledge that my location
and recording data will be made public.