DEV Community

Cover image for TrailWhisper: Keep Eyes on the Canopy. Phone in the Pocket.
Ayush Gupta
Ayush Gupta

Posted on Originally published at dev.to

TrailWhisper: Keep Eyes on the Canopy. Phone in the Pocket.

Hacktoberfest: Maintainer Spotlight

🌿 Project Overview

Project Name: TrailWhisper

Tagline: Keep Eyes on the Canopy. Phone in the Pocket.

Live Demo: https://ayush-trailwhisper.surge.sh

Video Walkthrough: https://youtu.be/p9flaxXcBRI

Repository: https://github.com/Ayushgupta1715/trailwhisper


🏔️ The Trailhead Paradox: The Screen Problem in Nature

When modern hikers and birders enter forest trails or mountain ranges, they carry smartphones equipped with nature recognition apps. Ironically, this traps them in the "Screen Trap":

  1. Staring down at 120 Hz AMOLED glass instead of looking up at the bird canopy.
  2. Waiting on 4G/5G spinners because mountain valleys are cellular Dead-Zones.
  3. Closed cloud APIs requiring constant internet and streaming intimate forest conversations to centralized corporate servers.

We built TrailWhisper to reverse this. It is an offline-first, zero-screen nature trail audio companion powered by on-device open-weights AI.

You put your phone in your pocket, put on bone-conduction headphones, and walk. When native birds call or endemic flora flutter, TrailWhisper analyzes the ambient biophonics locally, chimes a gentle 528 Hz Solfeggio announcement tone, and whispers a concise 1-sentence directional cue:

"Asian Koel calling at your ten o'clock, high in the mango canopy."


🧠 Why Open Innovation Matters Here

The challenge asks: “Tell us why open innovation matters for what you built.”

Here is why proprietary cloud models fail on trails, and why open weights win:

  1. Zero-Signal Mountain Autonomy (True Dead-Zones): Cellular signal dies 15 minutes into any dense national park. Closed LLM/API endpoints return NetworkError: Failed to fetch. Open-weights acoustic models (BirdNET-Mini ONNX and MobileNet-V3 BioAcoustic) execute directly on the phone's browser engine using WebAssembly and WebGL—operating seamlessly at 0 bars.
  2. Wilderness Acoustic Privacy: Closed cloud APIs require uploading continuous ambient microphone audio to remote servers. TrailWhisper processes microphone buffers in transient Web Audio RAM. Your family's trail conversations never leave your device.
  3. Regional Indo-Gangetic Bio-Acoustics: Commercial Western apps bias heavily towards North American species (Cardinals, Blue Jays). Open weights allow wildlife researchers to calibrate and ground inference in regional South Asian biodiversity:
    • Asian Koel (Eudynamys scolopaceus) — Ascending flute crescendo
    • Coppersmith Barbet (Psilopogon haemacephalus) — Metronomic 1.1 kHz metallic tap
    • Sacred Fig / Peepal Leaf (Ficus religiosa) — Sub-audible cordate petiole breeze flutter
    • Rufous Treepie (Dendrocitta vagabunda) — Musical bell chime
  4. $0 API Cost: Trail guards, forest rangers, and biology students can hike for 8 hours without incurring token costs or hitting rate limits.

🛠️ How It Works: Technical Architecture

  • Frontend Core: React 19 + TypeScript + Vite + Tailwind CSS
  • Live Oscilloscope & Audio Engine: Native Web Audio API (AudioContext, createAnalyser(), getByteTimeDomainData(), getByteFrequencyData()).
  • Procedural Synthesizers: Zero external MP3 downloads. 528 Hz Solfeggio tones and bird call acoustic frequencies are synthesized procedurally with Web Audio oscillators.
  • Directional Whisper Voice: On-device window.speechSynthesis with trail-pace cadence.
  • Anti-Screen Penalty Shield: Continuous gaze tracker. If a user stares at the screen continuously for >30s, an immersive blur shield triggers: "Put the phone away. Nature is happening in front of you, not behind this glass."
  • Offline Nature Journal: Local persistent sightings stored in localStorage, complete with SHA-256 cryptographic fingerprints, timestamps, bearings, and 1-click JSON export.

🎯 Key Features Built

Feature Purpose
Live Audio Monitor Real-time oscilloscope waveform + 256-bin FFT spectrum with visual detection markers
Bird Call Replay Procedural frequency synthesis allowing hikers to hear and verify bird call notes offline
Why this bird? Transparent acoustic reasoning (frequency bands, interval rhythms, seasonal notes)
Trail Bingo (Quests) 3x2 responsive 1-tap sensory checklist without camera or typing
My Trail Journal Offline search, filtering, and cryptographic audit records

🚀 Running Locally

git clone https://github.com/Ayushgupta1715/trailwhisper.git
cd trailwhisper
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

Visit http://localhost:3000 on your laptop or phone on the same Wi-Fi.


🌿 Conclusion

Technology should connect us with the physical world, not isolate us behind glass. TrailWhisper shows how open-source edge AI can disappear into your pocket so you can truly Touch Grass.

Top comments (1)

Collapse
 
suppdevbot profile image
DEV SUPPORTS •
You need to verify your account.
Enter fullscreen mode Exit fullscreen mode

tr.ee/dev-to