Comments (10)
All paths in birdnet-go config are relative by default, you need to set working directory in systemd config unless you configure absolute paths in config (like path: /opt/birdnet-go/logs/webui.log).
This is my /etc/systemd/system/birdnet-go.service
[Unit]
Description=BirdNET-Go Analyzer Service
[Service]
ExecStart=/home/thakala/birdnet-go realtime -d
Restart=on-failure
User=thakala
Group=thakala
WorkingDirectory=/home/thakala
[Install]
WantedBy=multi-user.target
To fix ALSA permission issue you need to add birdnet user as member of audio group
sudo usermod -a -G audio birdnet
from birdnet-go.
WorkingDirectory
worked, thanks! Unfortunately, even when birdnet is a member of the audio groupβ¦
birdnet@birdnet:~ $ groups
birdnet adm dialout cdrom sudo audio video plugdev games users input render netdev gpio i2c spi
β¦I'm getting the same ALSA errors
from birdnet-go.
Have you tried rebooting Linux after adding birdnet user to audio group? Does alsamixer work with birdnet user?
from birdnet-go.
I have rebooted, and alsamixer
does work for the birdnet user (or at least it launches and I can change the volume
![image](https://private-user-images.githubusercontent.com/3483/309338599-d8ffd399-83e2-41ad-93db-260142b8ec4a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0NTUzMDYsIm5iZiI6MTcxOTQ1NTAwNiwicGF0aCI6Ii8zNDgzLzMwOTMzODU5OS1kOGZmZDM5OS04M2UyLTQxYWQtOTNkYi0yNjAxNDJiOGVjNGEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjdUMDIyMzI2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWM2M2NhNmM5OThjNmM0OGY2MTYzNGE1NzBjMWQzODg0OTZjMzBmNWM1OGU5MTEwNjZhMjczZWJiOWI2ZDAxNyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.F7A7WBPDEobUGEDeuRLIk18yLlWJJY5RkkvMmKp59-0)
from birdnet-go.
I did a lot testing today and I now know what is wrong.
"ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave" error is caused by BirdNET-Go trying to use ALSA device which is already open, in your case it is most likely caused by PulseAudio which BirdNET-Pi is using as audio backend.
This can be solved by configuring BirdNET-Pi to use dsnoop as audio card, this is capture device type which can be shared by multiple applications
There is also bunch of ALSA audio plugins in BirdNET-Pi os which need to be made unavailable for ALSA, non-destructive way to disable them is to rename /etc/alsa/conf.d for example /etc/alsa/conf.d.off.
Once you reboot BirdNET-Pi should record on dsnoop device and BirdNET-Go should also tap to that same device.
This works only with locally installed birdnet-go, recently released Docker image is unable to use shared dsnoop device.
from birdnet-go.
@tphakala Thanks for all that testing! The computer where I'm currently running BirdNET-Go actually does not have BirdNET-Pi on it anywhere. This was a fresh OS with only BirdNET-Go installed.
I do see pulseaudio
running in top, though. In the other thread I know you said you disable Pulse Audio for BirdNET-Go, so perhaps it's a similar issue? Though when I have tried running BirdNET-Go through systemd, I always stop any other running instances first, so I wouldn't expect them to be competing. But I don't think I've ever tried running it via systemd after a restart without having run it manually at all, so maybe something is hanging around. I can test that.
But also maybe once I'm on a version that doesn't use Pulse Audio at all it won't matter?
from birdnet-go.
I disabled Pulse Audio because it is causing inconsistent behavior due to how Pulse Audio works by default. When you login to Linux shell, by SSH or by any other means, this will typically also spawn a Pulse Audio server, once you log out Pulse Audio server stops.
Miniaudio library I am using in BirdNET-Go connects to Pulse Audio server if it is available, if it is not it falls back to ALSA. In your case Pulse Audio backed audio works, but ALSA does not (hence errors with systemd launched process).
Could you try to add following config into /home/birdnet/.asoundrc (or to profile you are running BirdNET-Go as)
pcm.capture {
type dsnoop
ipc_key 5678
slave {
pcm "hw:0,0"
channels 2
rate 48000
format S16_LE
}
}
pcm.!default {
type hw
capture.pcm {
type plug
slave.pcm "capture"
}
}
This will configure ALSA to provide audio capture device as dsnoop type device which can be shared between processes.
from birdnet-go.
Is your system a full desktop install or is it a minimal install?
from birdnet-go.
Is your system a full desktop install or is it a minimal install?
I believe it was a vanilla Raspberry Pi OS Lite 64 bit install from a few weeks ago
from birdnet-go.
@farski idk if you are still having this issue, but I was seeing the same thing and fixed it by adding
ExecStartPre=/usr/bin/pulseaudio --start
to my systemd script. I think the pulseaudio server doesn't get started for systemd sessions, and this triggers it to start up before it kicks off the normal startup process.
There might be a better way to do this because linux audio is far from my strong suit, but it seems to be working for me π
from birdnet-go.
Related Issues (20)
- Enhancement: add white-space:nowrap to CSS for Species column HOT 1
- Guidance for installing on a Mac? HOT 6
- Merge conflict in .github/FUNDING.yml
- bug (minor) Web UI not working correctly if default port is changed HOT 1
- Pulseaudio 100% CPU HOT 2
- Docker container for x86 is not built
- Direct links do not load CSS/some UI HOT 2
- Privacy filter too many false positives HOT 9
- Discrepency between realtime/web reporting and the CLI? HOT 7
- v0.5.4 docker build issue HOT 4
- CPU usage when running realtime HOT 6
- miniaudio fails to initialize HOT 7
- (Minor) missing greek locale species names HOT 3
- [feature request] Adding bird images to MQTT object
- Crash with "fatal error: concurrent map writes" HOT 3
- How to configure MQTT Client Id? HOT 1
- No stats?
- Adding BirdWeather API Token crashed my docker container HOT 4
- Missing thumbnail for certain species HOT 3
- Queue is full!! with alexbelgium HA Addon HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from birdnet-go.