DEV Community

Cover image for TrailTone: A Local Bird-Call Listener for Your Next Walk
Shaurya Tiwari
Shaurya Tiwari

Posted on

TrailTone: A Local Bird-Call Listener for Your Next Walk

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

TrailTone
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass.

What I Built

TrailTone is a browser-based bird-call listening companion for hikers, birders, and anyone who wants a reason to spend more time outside.

You can record a short sound clip while walking, or upload an audio file, and TrailTone returns likely bird or nature-sound matches. The interface is intentionally small: use the screen to start listening, then put the phone away and explore the world around you.

The app keeps recordings in the browser and does not upload them to a server.

Demo

Run TrailTone locally:

npx serve .
Enter fullscreen mode Exit fullscreen mode

Open the local URL, allow microphone access, and select Record a call. You can also upload an audio file with Upload audio.

The first visit downloads the TensorFlow.js and YAMNet model assets. The application shell is cached by a service worker for later visits.

Code

The complete source is in this repository:

TrailTone

TrailTone is an offline-capable bird-call listening companion for the Touch Grass challenge. Record a short clip on a walk or upload one, and an open YAMNet audio model ranks likely bird and nature-sound matches directly in the browser.

Run it

Because microphone access requires a secure origin, run a local static server from this directory:

npx serve .
Enter fullscreen mode Exit fullscreen mode

Open the printed http://localhost URL. The first visit downloads TensorFlow.js and the YAMNet weights; the app shell is cached by its service worker, and the model is kept by the browser's asset cache. Once loaded, inference is local and audio is never uploaded. (A production build should bundle and pin the model files for a stronger offline guarantee.)

Why open innovation

The app is deliberately built around YAMNet, an open model exposed through the open-source TensorFlow.js ecosystem. A closed inference API would make a trail recording dependent on signal, an…




How I Built It

TrailTone uses:

  • The open YAMNet audio model
  • TensorFlow.js for browser-based inference
  • The browser MediaRecorder API for capturing audio
  • The Web Audio API for decoding and resampling recordings
  • A service worker for caching the application shell

The audio is decoded to a 16 kHz waveform and passed to YAMNet directly in the browser. The app filters the model's general audio-event predictions for likely bird and nature-related matches, then displays the top results with confidence scores.

The model is not treated as a definitive ornithology tool. It provides possible matches that encourage the user to listen again, observe the surroundings, and verify the result with a field guide.

Why Does Open Innovation Matter?

Open innovation makes local, private experimentation possible.

A closed audio API would require a network connection and would send a recording of the user's surroundings to a service they do not control. TrailTone keeps the recording in the browser, which is better suited to a walk in a park, forest, or backcountry area where connectivity may be unreliable.

Using an open model also means the project can evolve. YAMNet can be replaced with a regional bird-call model, fine-tuned with openly licensed data, or bundled more completely for true no-signal use. Developers can inspect and change the complete path from microphone input to prediction instead of treating inference as an inaccessible remote service.

The open approach also keeps the basic experience free to run and avoids per-request inference costs.

Prize Categories

I am entering the overall Hacktoberfest Open-Source AI Challenge Week 1 category.

TrailTone does not use any of the listed partner technologies, so I am not claiming a partner-specific prize category.

Top comments (0)