{"slug": "eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away", "title": "Eyes Up: an offline bird-call companion that wants you to put the phone away", "summary": "A developer built Eyes Up, an offline, privacy-first bird-call companion that records 30 seconds of ambient audio, classifies it on-device with Cornell's BirdNET V2.4 TFLite model, and generates a grounded two-sentence field tip via a local Gemma 2 model served through Ollama before speaking it aloud with text-to-speech. The app avoids cloud APIs and server-side codec dependencies by encoding raw microphone data into 16-bit PCM WAV in the browser with a 40-line Web Audio API encoder, and it tracks a \"Touch Grass Score\" comparing outdoor minutes to screen time in a local SQLite database.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass](https://dev.to/challenges/hacktoberfest-week1-2026-10-05)*\n\nI love birding, but I despise modern birding apps.\n\nThe moment you open most wildlife apps on a trail, they demand your full visual attention. You get feeds, social leaderboards, uncompressed photo galleries, and notifications begging you to log into an account. Before you know it, you're standing under a 100-year-old oak tree staring at blue light instead of looking up at the bird singing directly above you.\n\nI built **Eyes Up** to solve that problem. It is an offline, privacy-first bird-call companion built specifically for the \"Touch Grass\" challenge.\n\nThe entire interface is designed around a single constraint: **the screen should be the shortest part of the experience.**\n\nYou tap one big button—\"Record (30s)\"—and drop your phone into your jacket pocket. The app records the acoustic environment, runs Cornell's BirdNET classifier locally on your device's CPU, prompts an on-device Gemma 2 model via Ollama to generate a strictly grounded two-sentence field tip, and speaks the result aloud via Text-to-Speech:\n\n*\"Heard American Robin, 91% match. New species! Look for a warm brick-red breast on lawns and listen for a cheerful caroling song.\"*\n\nThen it dims the screen to pitch black.\n\nThere is no infinite scroll. There are no friend feeds. There is only a single result card, an offline life list, and a **Touch Grass Score** that tracks how many minutes you spent outdoors versus how many minutes you spent looking at the glass.\n\nHere is the one-screen workflow in action:\n\n`#0b0f12`) optimized for sunlight visibility. A single 130px record button and a Touch Grass ratio meter.\nThe complete source code is open-source under the MIT license:\n\nTo run it locally in one command:\n\n```\ngit clone https://github.com/kishorekrrish3/Eyes-Up.git\ncd Eyes-Up\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .\\.venv\\Scripts\\activate\npip install -r requirements.txt\npython run.py\n```\n\nI kept the stack lean, fast, and completely free of cloud subscriptions.\n\nMobile browsers record audio in WebM/Opus (Android) or AAC/MP4 (iOS). Decoding those on a lightweight local server usually requires dragging in heavy `ffmpeg` binaries. Instead, I wrote a 40-line client-side audio encoder in `app/static/app.js` using the Web Audio API. The phone samples the raw Float32 microphone data and compiles an uncompressed 16-bit PCM WAV directly in browser memory before uploading. It works identically across mobile Safari and mobile Chrome with zero server codec friction.\n\nFor acoustic classification, Eyes Up uses the official BirdNET V2.4 model (`BirdNET_GLOBAL_6K_V2.4_Model_FP32.tflite`).\n\nI used Gemma 2 (2B) through Ollama (`http://localhost:11434`) with strict bounding instructions:\n\nThe backend logs outings in a local SQLite database (`data/eyes_up.db`). While an outing is active, the frontend monitors the browser `document.visibilityState`. If your phone screen is on, screen seconds accumulate. If the phone is locked or in your pocket, screen time stops while outdoor outing time ticks forward.\n\nIf you spent 45 minutes walking through the woods and only looked at your phone for 2 minutes to confirm two sightings, your score is **22.5x (96% Eyes Up)**.\n\nDuring this build, the contrast between open-source edge AI and proprietary closed cloud APIs could not have been starker.\n\n`.env` (`OLLAMA_MODEL=gemma2:9b`). No vendor lock-in.\n*View interactive session transcript on DEV:* [Eyes Up: Building an Offline Bird-Call Companion with BirdNET & Gemma](https://dev.to/agent_sessions/eyes-up-building-an-offline-bird-call-companion-with-birdnet-gemma-dmbxhi)\n\nI built Eyes Up using the **Antigravity** coding assistant.\n\nThe agentic pairing workflow excelled at eliminating the boilerplate that usually slows down hackathons:\n\n`tflite-runtime` wheels were missing for Windows, the agent diagnosed the dependency tree and wired Google's modern `ai-edge-litert` package as a clean, transparent shim for `birdnetlib`.` ffmpeg` installations, the agent implemented the browser PCM WAV encoder from first principles, ensuring portable mobile recording.`app/tts_service.py` for users desiring hyper-realistic cloud voices, but the app defaults to 100% offline local TTS to honor the Touch Grass ethos.", "url": "https://wpnews.pro/news/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away", "canonical_source": "https://dev.to/kishore_p_e1fbd59e95a81f6/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away-4n64", "published_at": "2026-10-06 18:41:06+00:00", "updated_at": "2026-10-06 18:48:27.956008+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning", "ai-tools", "natural-language-processing"], "entities": ["Eyes Up", "BirdNET", "Gemma 2", "Ollama", "Cornell", "Antigravity", "SQLite", "Web Audio API"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away", "markdown": "https://wpnews.pro/news/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away.md", "text": "https://wpnews.pro/news/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away.txt", "jsonld": "https://wpnews.pro/news/eyes-up-an-offline-bird-call-companion-that-wants-you-to-put-the-phone-away.jsonld"}}