This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass
What I Built
Last spring I was on a trail at dawn, that electric half-hour when every bird in the forest is shouting at once, and I realized I could name maybe three of them. My phone had no signal, and the bird apps I knew about needed the cloud. So I just stood there, surrounded by a symphony I couldn't understand.
That frustration became TrailWhistle: point your phone at the dawn chorus and it tells you who's singing, using AI that runs entirely on your device. It listens to 3 seconds of birdsong and identifies the species, with common name, scientific name, and confidence score. No internet. No account. No data leaving your phone.
It's also a small biodiversity survey tool. Visit a park repeatedly and it builds a living checklist of every species detected there, each with timestamps and GPS coordinates, exportable as CSV or JSON. Over a season, you watch your local patch come alive on paper.
Who it's for: the hiker who hears something amazing and wants a name for it, the parent whose kid asks "what's that bird?", the gardener curious about who's visiting, and anyone who has stood in the woods surrounded by sound and wanted to understand it.
How it gets you off the screen: the design goal is that the screen is the shortest part of your day. Three seconds of recording, phone back in your pocket, eyes on the canopy.
Demo
Try it live: https://trailwhistle.onrender.com
Tap one of the demo calls (American Robin, Song Sparrow, Mourning Dove, Barn Owl) to see the full detection flow, or open the Species tab and search all 6,522 species BirdNET knows.
Even better: take your phone outside tomorrow morning and tap record on a real bird.
Code
Sourabh-Kumar04
/
TrailWhistle
Offline-first bird-call identifier PWA with on-device open-weight AI
๐ฟ TrailWhistle
Offline-first, on-device Area Biodiversity Survey Tool & Avian Census PWA.
Built for the Hacktoberfest Open-Source AI Challenge: Week 1 (Theme: "Touch Grass").
Zero cloud servers. Zero API keys. Zero cellular data required.
๐ Overview
TrailWhistle gets people off the screen and into the natural world. In remote wilderness, mountain canyons, and deep forests, cellular reception drops to zero. That's usually where traditional AI applications fail.
TrailWhistle is architected as an Area Biodiversity Survey Tool running 100% on-device using the open-weight BirdNET v2.4 ONNX model (6,522 global avian species) compiled to WebAssembly via ONNX Runtime Web (onnxruntime-web).
Rather than isolated single-bird identification, TrailWhistle supports the core ecological field workflow:
- Arrive at a location: Set your survey site (e.g. Pine Ridge Trailhead, Redwood Creek Basin) and habitat transect.
- Sample continuously: Tap once to capture 3 seconds of birdsong across the area as callsโฆ
MIT licensed. React + TypeScript PWA. The interesting parts are src/services/classifier.ts (the inference pipeline) and public/inference-worker.js (the Web Worker that keeps the UI smooth during classification).
How I Built It
The heart of TrailWhistle is BirdNET v2.4, the open bioacoustic model from the Cornell Lab of Ornithology and Chemnitz University of Technology, trained on recordings contributed by birders and researchers to community archives such as xeno-canto.
- Capture. An AudioWorklet grabs microphone input at 48 kHz, BirdNET's required sample rate, and slices it into 3-second windows. There's a ScriptProcessor fallback for older browsers.
-
On-device inference. The model (~47 MB, ONNX format) runs through
onnxruntime-webwith WebAssembly SIMD acceleration, inside a Web Worker. No server, no API key, no round trip. It looks at 144,000 audio samples and outputs confidence scores for all 6,522 species. - Honest results. Below 25% confidence, the app says "Unknown" instead of guessing. An earlier version of this project fabricated species names when confidence was low, and I ripped that out. In a field tool, a wrong answer is worse than no answer.
- Offline-first. A service worker caches the app shell, the model weights, and the taxonomy. The first visit downloads ~50 MB; after that, airplane mode is fine. The field log persists to localStorage with GPS coordinates.
The whole thing is a PWA, so you can install it from the browser and it lives on your home screen like a native app.
Why Does Open Innovation Matter?
Open weights make four properties true at the same time, and a closed API would struggle to offer all of them together:
- It works where there's no signal. The best birding spots have none. A closed API needs a connection for every identification. With open weights, the model lives on the device after one download.
- It's private by architecture. Every 3-second clip is stamped with GPS. Sent to a cloud API, that's a map of everywhere you hike. With local inference, audio and location never leave the phone: no account, no tracking, no telemetry.
- There's no per-use cost. Identifying 1,000 birds costs nothing extra, which matters for a free tool whose whole point is getting kids and casual hikers into nature. (BirdNET's model is released under a Creative Commons non-commercial license, CC BY-NC-SA 4.0, so TrailWhistle stays free and non-commercial, with attribution to the BirdNET team.)
- It's swappable, not rented. The model is standard ONNX. When BirdNET updates, or someone fine-tunes a model for a particular region, I replace one file. No vendor can change pricing or deprecate an endpoint out from under the app.
And it's open all the way down: community-contributed recordings, an open model, an open runtime, and an MIT-licensed app that anyone can fork tonight.
My Agent Session
I built this with AI coding agents as pair programmers: architecture decisions, implementation, test suites, and many rounds of UI iteration driven by real browser screenshots.
The most valuable thing the agents did wasn't writing code. It was the hostile review loop. After each build, an agent played a harsh hackathon judge in a real browser and caught real failures, including a silent inference pipeline that looked fine in unit tests but produced nothing in the browser. The same loop caught the old code inventing species names at low confidence, and the fix wasn't a tweak but a principle: never fabricate, always admit uncertainty.
Prize Categories
Best Use of Render: TrailWhistle is deployed and hosted on Render (https://trailwhistle.onrender.com), which serves the PWA, the BirdNET model files, and the full 6,522-species taxonomy.
Tomorrow morning, before the sun is fully up, open the app and tap record. The screen should be the shortest part of your day.



Top comments (0)