sndid/README.md

182 lines
3.8 KiB
Markdown
Raw Normal View History

2023-09-21 12:35:13 -06:00
# sndid
`sndid` identifies sounds.
# Install
Install thusly.
Using Debian Stable (12/Bookworm).
Install thine dependencies:
```
sudo apt update
2023-09-21 15:18:00 -06:00
sudo apt install git ffmpeg python3-pip python3-virtualenv netcat-traditional sox
2023-09-21 12:35:13 -06:00
```
Clone repo:
```
git clone https://spacecruft.org/deepcrayon/sndid
cd sndid/
```
2023-09-21 13:47:43 -06:00
If you want some sound samples, pull the submodule:
```
git submodule init
git submodule update
```
2023-09-21 12:35:13 -06:00
Set up Python to taste, such as:
```
2023-09-21 12:59:07 -06:00
virtualenv env
2023-09-21 12:35:13 -06:00
source env/bin/activate
pip install --upgrade pip setuptools wheel
```
Install Python dependencies:
```
pip install -r requirements.txt
```
# Usage
2023-09-21 14:42:41 -06:00
## Command line
As such:
2023-09-21 12:35:13 -06:00
2023-09-21 13:51:51 -06:00
```
./sndid
```
2023-09-21 12:35:13 -06:00
2023-09-21 14:42:41 -06:00
Help:
```
$ ./sndid -h
usage: sndid [-h] [-i INPUT] [-t LATITUDE] [-n LONGITUDE] [-y YEAR] [-m MONTH] [-d DAY] [-c CONFIDENCE]
Run sndid
options:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Input filename to process (default samples/sample.wav)
-t LATITUDE, --latitude LATITUDE
Latitude (default 40.57)
-n LONGITUDE, --longitude LONGITUDE
Longitude (default -105.23)
-y YEAR, --year YEAR Year (default 2023)
-m MONTH, --month MONTH
Month (default 9)
-d DAY, --day DAY Day (default 19)
-c CONFIDENCE, --confidence CONFIDENCE
Minimum Confidence (default 0.50)
```
2023-09-21 14:28:37 -06:00
## Server
Run thusly:
```
./sndid-server
```
Help:
```
$ ./sndid-server -h
usage: sndid-server [-h] [-i IP] [-p PORT] [-t LATITUDE] [-n LONGITUDE] [-y YEAR] [-m MONTH] [-d DAY] [-c CONFIDENCE]
Run sndid-server
options:
-h, --help show this help message and exit
-i IP, --ip IP Server IP address (default 127.0.0.1)
-p PORT, --port PORT Server network port (default 9988)
-t LATITUDE, --latitude LATITUDE
Latitude (default 40.57)
-n LONGITUDE, --longitude LONGITUDE
Longitude (default -105.23)
-y YEAR, --year YEAR Year (default 2023)
-m MONTH, --month MONTH
Month (default 9)
-d DAY, --day DAY Day (default 19)
-c CONFIDENCE, --confidence CONFIDENCE
```
2023-09-21 12:35:13 -06:00
2023-09-21 15:19:52 -06:00
## Client
Is such:
```
./sndid-client
```
2023-09-21 12:35:13 -06:00
# Development
To "develop", install the requirements:
```
pip install -r requirements-dev.txt
```
2023-09-21 12:59:07 -06:00
Then run black on the Python files for nice formatting:
2023-09-21 12:35:13 -06:00
```
black *.py
```
# Upstream
2023-09-21 12:51:50 -06:00
## Birds
### BirdNet
* BirdNet is the main upstream project:
https://birdnet.cornell.edu/
* The source code is available here:
https://github.com/kahst/BirdNET-Analyzer
Unfortunately the project has a horrible license, CC-NC-BY-SA 4.0,
which isn't even a software license. The authors of the license
themselves say it shouldn't be used for software.
It's not just the data files,
such as the models that are NC (which would be ok), but the source
code itself is NC.
I haven't double checked the Python imports, but it would be interesting
to see if they are even compatible with the NC license,
since the NC license is incompatible with so many Free Software
and Open Source Software licenses.
There is a bug open to fix the license, and change it to Apache 2.0,
which would be sane.
I hope this happens:
https://github.com/kahst/BirdNET-Analyzer/issues/154
### birdnetlib
birdnetlib is based on BirdNet, but with a different codebase and author.
2023-09-21 14:47:24 -06:00
birdnetlib uses BirdNet's non-libre NC model files.
birdnetlib has a dependency on the non-free BirdNet-Analyzer Python code
(e.g. via `pip install`),
2023-09-21 12:51:50 -06:00
but the source code to birdnetlib itself is
2023-09-21 14:47:24 -06:00
under the Apache 2.0 license.
birdnetlib is Free Software / Open Source Software, with non-libre dependency.
2023-09-21 12:51:50 -06:00
https://github.com/joeweiss/birdnetlib
2023-09-21 12:35:13 -06:00
2023-09-21 13:51:51 -06:00
# Status
Alpha, initial development.
2023-09-21 12:35:13 -06:00
# Copyright
2023-09-21 12:51:50 -06:00
Unofficial project, not related to BirdNet or Joe Weiss.
2023-09-21 12:35:13 -06:00
Upstream sources under their respective copyrights.
# License
Apache 2.0.
*Copyright © 2023, Jeff Moe.*