AI news

Building “Bird Radio” with Codex and a Raspberry Pi: Candidate Birdcall Records Await Human Checks

By 十字路口Crossing2 viewsSource: 十字路口Crossing
Building “Bird Radio” with Codex and a Raspberry Pi: Candidate Birdcall Records Await Human Checks

The author connects BirdNET, Perch V2, BirdNET-Go and Birdsong in a window-side listening system. Its 3,176 records and 34 species as of November 26 are candidate identifications, not 34 confirmed species or individual birds; the reported time and cost are one person's experience.

No matter how powerful AI becomes, the joy of making something you love with your own hands remains very tangible.

Article illustration

Giving the office window another pair of ears

The AI Hacker House started by Crossing sits beside a lake in the very center of Caohejing Development Zone Park in Shanghai, surrounded by leafy trees.

Article illustration

When I work by the window, one of my great pleasures is looking up now and then to see whether any birds have come to visit today.

Article illustration

A little while ago, I used Codex and several open-source projects to build a Raspberry Pi system that listens to birds around the clock: “Bird Radio”, which I placed beside the AI Hacker House window.

From buying the equipment to getting the whole Bird Radio system running, I spent two or three days.

A few days ago, I also recorded a short video to give a simple demonstration of the system running in the office.

Article illustration

Friends who know me know that I started birdwatching during the pandemic, more than four years ago now. I have also kept the habit of recording my bird list. On my eBird profile [1], I have recorded 387 species I have seen around the world.

Article illustration

So I have also kept observing and recording birds in Caohejing Development Zone Park, where the AI Hacker House I work in every day is located. Over the past year or so, my eBird records show that I have seen 25 species in this park with my own eyes. It is, after all, a small urban park, so most sightings are familiar regulars such as Light-vented Bulbuls, Spotted Doves, and White Wagtails.

Article illustration

The Caohejing Development Zone Park bird checklist on eBird: 25 species observed by eye over the past year or so.

Often, though, I hear a few crisp bird calls outside, but by the time I react and open the window to look, the sound has stopped and the bird has hidden behind the leaves. If I cannot find it, the moment simply passes.

To my surprise, in the first 24 hours after the listening system went live, 25 candidate bird species appeared on its identification list.

Birds such as the Common Sandpiper, and the Pale-legged Leaf Warbler, which are not easy to see in everyday life, also appeared on the list. Some may only have been passing through; others may have been hiding behind the treetops outside the window all along. A bird call I once would have heard and forgotten is now saved as a complete recording that I can open and listen to again and again.

Article illustration

The individual Common Sandpiper (Actitis hypoleucos) species card on the Bird Radio website. The illustration comes from a reference work by the 19th-century ornithologist John Gould.

Article illustration

The individual Pale-legged Leaf Warbler (Phylloscopus tenellipes) species card on the Bird Radio website, showing its call spectrogram and the distribution of detection times.

If you are curious about which birds have flown outside the window at this moment, you can open the page I have made publicly available: https://aihh-bird.kojiyang.me/.

Article illustration

The “Bird Radio @ AI Hacker House” homepage: a live display of candidate species heard outside the window and a wall of natural-history illustrations.

Article illustration

Clicking the Light-vented Bulbul species card on the Bird Radio homepage reveals its illustration and call records.

A microphone outside the window, and two or three days of flow

I did not reinvent the wheel to build this system. Instead, I used Codex for vibe coding, connecting tools that were already well established in the open-source community.

All the hardware sits by the office window. The main controller is a Raspberry Pi 5 indoors, fitted with a heatsink and fan. A USB microphone extends through the window to the outside, and I even 3D-printed a little white rain shelter for it.

Article illustration

A photo of the Raspberry Pi 5 beside an indoor workstation, with a heatsink and case fan.

Article illustration

The USB microphone extending outdoors and the little white rain shelter 3D-printed for it.

On the software side, the main thanks go to several building blocks from the open-source community. Birdcall recognition uses BirdNET [2], a collaboration between the Cornell Lab of Ornithology and Chemnitz University of Technology in Germany, as well as Google's Perch V2 [3]. For real-time recording, model calls and saving records, it uses BirdNET-Go [4]. The front-end display is based on Birdsong[5].

The visual details of Birdsong, an open-source project created by Ed Stone, deserve a mention. It looks like a 19th-century natural-history poster because its bird illustrations mainly come from the open-source project Fugleramme [6], initiated by Arne Giacomo. The originals are public-domain bird prints by 19th-century natural-history artists such as John Gould, the von Wright brothers, and John James Audubon. It also includes the classic Dutch bird book Nederlandsche Vogelen from 1770–1829, published by Nozeman and Sepp and digitized by the National Library of the Netherlands, as well as public-domain collections on Wikimedia Commons.

I genuinely rediscovered a kind of happiness I had not felt for a long time while making it. One moment I was setting up the Raspberry Pi; the next, adjusting the page. Whenever I got one part working, I could not help wanting to take it a little further. As I kept going, I became completely immersed in a state of flow.

No matter how powerful AI becomes, the joy of making something you love with your own hands remains very tangible.

Watching an idea in my head gradually take shape and finally really run felt like a reward in itself.

At six every morning, the park wakes up before we do

As of the morning of November 26, Bird Radio had saved 3,176 candidate identification records, covering 34 candidate bird species. These records still need further human verification, but spreading out the nine days of data already reveals a vivid picture of daily life in this little park.

First, the park has a “morning rush hour” of its own.

Looking over the time distribution across those nine days, you find that the park is busiest not at noon but from 6 to 8 a.m. Those three hours alone contributed nearly half the day's song records, with as many as 501 in the 7 a.m. hour. After 10 a.m., the woods gradually grew quieter. Around 3 p.m., there was another small peak. After darkness fell at 5 p.m., almost nothing remained but the sound of the wind.

Often, before we have even arrived at the office, the birds outside the window have already finished a round of morning meetings.

Article illustration

Some bird illustrations that have appeared in Bird Radio, including the Light-vented Bulbul, Spotted Dove, Swinhoe's White-eye, Common Kingfisher, Chinese Blackbird, Azure-winged Magpie, Daurian Redstart and Common Sandpiper.

When these candidate species are considered by “role,” the world outside the window is much richer than what I used to see with my eyes.

The undisputed stars of the woods are still the familiar regulars.

The Light-vented Bulbul was recorded 2,064 times, accounting for about 65% of all events. Singing from 6 a.m. until dusk, it truly deserves to be called the “park director.” Next came the Spotted Dove (270 records), the White Wagtail (145) and the Swinhoe's White-eye (130), which likes to move through the treetops in flocks.

The first to clock in each day are the “early shift.”

The Chinese Blackbird (91 records) and the Azure-winged Magpie (117) are practically the park's alarm clocks. After 6 a.m. each morning, they are among the most vocal birds; once the sun has fully risen, their calls become less frequent. The Oriental Magpie (89) and the Oriental Magpie-Robin (58) prefer to visit around 9 a.m.

The waterbirds beside the lake have a much stronger presence than I imagined.

There is a lake right beside the AI Hacker House, but with the trees in the way, I rarely see the birds by the water directly. Yet the system recorded 125 Common Kingfisher detections, with its calls heard even at dusk and late at night. The list also included the Common Sandpiper, the Black-crowned Night Heron and the Common Moorhen.

There are also woodland visitors hidden behind the leaves.

Examples include the Pallas's Leaf Warbler (14 records), the Daurian Redstart (10), along with three species that appeared only once or twice sporadically: the Pale-legged Leaf Warbler, the Red-flanked Bluetail, and the Marsh Tit. They are small birds with brief, delicate calls, almost impossible to spot while sitting by the window. But the microphone preserved those few seconds of their passage.

Putting birdsong on the big television: a living natural-history poster

To give these sounds more of a presence, I put the Birdsong interface directly on the large television in the office.

Bird calls used to be mere background white noise in the office. Now, whenever something stirs outside the window, the cards on the big television refresh with an illustration and name of the corresponding bird. The more a bird calls, the larger its share of the display, like an ecological poster that updates itself every day.

Article illustration

The Bird Radio interface displayed live on the large television in the AI Hacker House office during the day.

Article illustration

At night, in the office beneath the Crossing neon sign, the big television still quietly displays the day's birdcall records.

My colleagues and I have also developed a new habit: when an unfamiliar name suddenly appears on the screen, we open the recording to listen. Sometimes we even follow the sound to the window and look for the bird.

Once sound and image connect, this familiar little park around us feels as though it has opened up anew.

Across time zones and languages, caring about the birds outside our windows

There was another surprise after I built it: many people around the world were doing the same small thing.

On BirdWeather [7], I can see listening stations deployed around the world by birdwatchers like me and which birds they are hearing at this very second.

Article illustration

BirdWeather's live listening map of East Asia, showing fellow enthusiasts' stations around Shanghai and in Japan, South Korea and elsewhere.

Zooming out from East Asia to Europe and North America, the screen lights up with a dense scattering of dots. At that moment, I suddenly felt I was not alone. Across time zones and languages, we were all thinking about the same small thing: which little bird has flown outside the window today?

Article illustration

BirdWeather's global listening-station map, viewed from Europe and the Americas. Birdwatchers around the world are sharing the birdsong outside their windows.

If you would like to see which birds I have heard here today, feel free to drop by anytime: https://aihh-bird.kojiyang.me/.

If you want to build the same kind of Bird Radio by your own window, all you really need is a Raspberry Pi, such as a Raspberry Pi 5, and a USB microphone costing around RMB100. Give your agent the names of the open-source projects BirdNET-Go, Birdsong and BirdWeather, and let it guide you through deployment step by step. In a single weekend, you can hear a different side of the world outside your window.

References

[1] My eBird profile: https://ebird.org/profile/MzA1NDA1NQ

[2]BirdNET:https://birdnet.cornell.edu/

[3]Perch V2:https://github.com/google-research/perch/

[4]BirdNET-Go:https://github.com/tphakala/birdnet-go/

[5]Birdsong:https://github.com/dopeytree/birdsong

[6]Fugleramme:https://arnegiacomo.dev/fugleramme/

[7]BirdWeather:https://www.birdweather.com/

This article comes from the WeChat public account “Crossing,” and was written by “Crossing.”

Related topics

After reading

Join the AINRK community

Read how to join the community and connect with people working in AI.

Community information (opens in a new tab)