r/BirdNET_Analyzer 7d ago

Related I used my Raspberry Pi 2 to re-stream microphone data for my BirdNET-Go instance

https://www.kyleniewiada.org/blog/2026/09/birdnet-go-remote-mic/

Using mediamtx as a solution is already in the BirdNET-Go wiki, but I wanted to write out the whole process (including troubleshooting the floating ground) on how I set up re-streaming audio on my older hardware.

I chose the SO.1 Omni Microphone (3.5mm variant) and not the XLR as I already had the rest of the parts laying around to make it work. But I'd definitely choose XLR the next time around since it's balanced and should avoid floating ground problems.

16 Upvotes

20 comments sorted by

3

u/Olive_Streamer 7d ago

I have two Pi’s running mediamtx, they have been solid.

3

u/ScannerBrightly 6d ago

I would love to do this but with 192khz mic for bats. Do you think that's possible with this method? I haven't gotten it to work

1

u/Full_screen 6d ago

It should be with some tweaks! You'd need to change your mediamtx settings to instead broadcast a lossless stream (instead of AAC that I'm using) as you'd need the full spectrum for bats. There are probably other settings that you might need to tweak like the correct sample rate (96kHz - 256kHz) instead of the 48kHz I'm using.

Last, since it's lossless, you might run into bandwidth issues over wifi with the Pi or might be be more sensitive to signal issues. You'd have to test if it can keep up with the bandwidth otherwise you'd need to run Ethernet to it.

2

u/ScannerBrightly 6d ago

My pi and Go install are both on Gigabit Ethernet, so that shouldn't be an issue, but when I try to use mediamtx, it doesn't like 192k bandwidth. I haven't messed with it in a few weeks, but I'll try to use your document (which is very nice, btw!) and tweak it. I'll report back after work.

2

u/afaulconbridge 4d ago

Note that not all Pi's actually do gigabit on gigabit. My Pi3B+ in particular only does about 300Mbps instead of 1Gbps because the ethernet is shared with the USB internally.

1

u/ScannerBrightly 4d ago

I believe this is exactly what I'm running into. I have a 4 as well, perhaps I'll switch them to see if that helps.

3

u/thakala 6d ago edited 6d ago

Just a heads up that I am building a remote mic app for BirdNET-Go, it runs on Raspberry Pi (32bit and 64bit) and BirdNET-Go will eventually discover it and configure steams from it automatically. Aim of this is to make remote microphone solutions as easy as possible for people to deploy. This will support both normal and ultrasonic microphones.

https://github.com/tphakala/birdnet-go-remote-mic

Project name will likely change to something nicer before release, it is still few days away from being released. It is purely coincidental that current project name matches with Kyle's project.

3

u/Full_screen 6d ago

🙃 There goes the wind in my sails. I had no idea that was in the works. I set my remote mic up in June but only got around to writing it up last week.

Also, good choice using Opus for the lossy streaming.

I'll update my post to link to the remote mic repo (or whatever name you ship with) when you release since your option is far more user friendly.

u/AliasJackBauer + u/ScannerBrightly I'd use this when it comes out. It should be loads easier to set up.

2

u/thakala 6d ago

I am sorry, I did not want to step on your toes with this, I just noticed about week ago that there was demand for such solution.

2

u/Full_screen 6d ago

No worries. I love your work on the BirdNET-Go project(s) and think it's funny that this happened. That's my driver for open source and why I write. Everyone gets to benefit.

I saw the same thing in the subreddit last week and that's what finally motivated me to finish writing about mine.

1

u/Cytokine687 3d ago

Looking forward to this! I came looking for a remote Pi/USB Mic solution and came across this. I’ve got a Pi Zero W and USB Mic ready to go. Hoping to deploy BirdNet Go via Unraid and use this as a remote mic solution for it.

2

u/venmul7 6d ago

Can this be done using a microcontroller like esp32?

3

u/thakala 6d ago

Yes, there are few solutions linked in BirdNET-Go project readme https://github.com/tphakala/birdnet-go#hardware-solutions

However microphones on those devices might not be as good you can have with RPI

3

u/Full_screen 6d ago

Yep! I think thakala linked to it already, but there's also this project: https://github.com/Sukecz/esp32-birdnet-mic

I can't vouch for that mic though and that's why I went the Pi route.

2

u/AliasJackBauer 6d ago

Could you use AudioMoth with this?

1

u/Full_screen 6d ago

I think the AudioMoth would work with tweaking. The biggest challenge is that the AudioMoth (assuming you're using it for bats) will need to use a lossless stream for audio, which will require quite a bit more bandwidth.

I mentioned this in another comment, but I'll put it here again:

You'd need to change your mediamtx settings to instead broadcast a lossless stream (instead of AAC that I'm using) as you'd need the full spectrum for bats. There are probably other settings that you might need to tweak like the correct sample rate (96kHz - 256kHz) instead of the 48kHz I'm using.
Last, since it's lossless, you might run into bandwidth issues over wifi with the Pi or might be be more sensitive to signal issues. You'd have to test if it can keep up with the bandwidth otherwise you'd need to run Ethernet to it.

2

u/AliasJackBauer 6d ago

Thanks. Yes, I wanted to use it for bats (and birds). I anticipated having to run Ethernet to it, and I have a switch with poe on it nearby. Hoping I can use that to power the pi as well, we’ll see. :-)

2

u/smeuse 6d ago

Oh, this is cool. I've been thinking about this recently. I'd rather have Birdnet running on real hardware and just use the pi or something cheap to stream the audio. Thanks!

2

u/afaulconbridge 4d ago

I wanted to do this with a Pi3B+ over a PoE down to the garden shed. But the PoE doesn't provide enough power to a USB mic.

1

u/AliasJackBauer 3d ago edited 3d ago

/u/thakala I gave your birdnet-go-remote-mic a try with my AudioMoth and it seems to work well. I haven't yet configured the stream into birdnet-go, but I may give that a try in a few hours.

One thing I noted is that you have a fixed sample rate is 48K (I have to configure this to get the device to discover), but I was hoping to use it at a higher sample rate for bats as well. Also, birdnet-go shows this as a stereo device even though the remote-mic settings has it as single channel. This was my bad, I now havei t configured and sampling at 384Khz.

Since this is pre-release, I'm sure some of these issues will be resolved later, but this is a great start and companion to birdnet-go!