DEV Community

Cover image for Why Strava Ruins Your Stride: I Built a Zero-Screen 3D Audio Run Club Pacer with Gemma 2 and OpenStreetMap
Ishita Singh
Ishita Singh

Posted on

Why Strava Ruins Your Stride: I Built a Zero-Screen 3D Audio Run Club Pacer with Gemma 2 and OpenStreetMap

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

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

What I Built

Every fitness app built in the last decade wants one thing: your visual attention.

Strava wants you checking live segment splits. Nike Run Club wants you chasing badge animations. Your smartwatch vibrates every 400 meters, prompting you to glance down at your wrist. But when you are running, staring at a screen is the worst thing you can do:

  • It breaks your spinal posture and breathing cadence.
  • It causes trail stumbles, clipped curbs, and twisted ankles.
  • It turns what should be a mindful outdoor escape into another digital metrics scroll.

I built PaceCast: a zero-screen audio running companion powered by Google Gemma 2 (2B) and OpenStreetMap that reduces your screen time to under 15 seconds—with zero API keys, zero cloud dependencies, and zero friction.

How It Works in 3 Steps:

  1. 15 Seconds of Screen Time: Open the app, choose your distance (3K, 5K, or 10K) and target pace (e.g., 5:15 /km), and hit Start Run.
  2. Pocket Mode Activates: The screen immediately locks into an OLED-black battery-saver mode. You zip your phone into your pocket or armband. You are done looking at screens.
  3. Run Purely by Ear: A local Google Gemma 2 (2B) coach whispers rhythm-matched kilometer splits, breathing cues, stride cadence checks, and autumn canopy observations directly into your earbuds.

And if you want to preview the run before stepping out, switch to the 3D Autumn Trail Simulator—a 60FPS perspective canvas with drifting autumn leaves, a live cadence wave, and soundwave equalizer!


Demo

🎥 Interactive Walkthrough & Audio Engine Demo

PaceCast Demo Walkthrough

  • 🌐 Live Deployed Web App: https://ish1416.github.io/PaceCast/
  • 📦 GitHub Repository: https://github.com/ish1416/PaceCast

  • Adaptive Running Soundtracks & Audio Ducking: Real-time generative music (Autumn Lo-Fi Beats, Synthwave Horizon Run, Zen Forest Ambient) with automatic volume ducking when Gemma 2 speaks.

  • Dynamic 2D / 3D Engine Switching: Seamless toggle between open civic geospatial radar and 60FPS perspective canopy.

  • High-Tech AMOLED Pocket HUD: High-contrast OLED battery saver display with live SVG progress ring, cadence telemetry pods, companion equalizer strip, and double-tap unlock.

🌲 3D Autumn Trail Simulator (60FPS Leaves & Live Cadence Waveform)

3D Trail View

🍁 2D Foliage Color Radar & Route Engine (OpenStreetMap)

Foliage Radar Map

🔒 High-Contrast AMOLED Pocket HUD (< 1% Screen Time)

Pocket Mode

🍂 Real-World Outdoor Field Test (Airplane Mode on Park Trail)

Outdoor Field Test


Code

You can explore and fork the complete open-source code on GitHub:

🏃‍♂️ PaceCast

Zero-Screen Audio Run Club Pacer & 3D Autumn Canopy Loop Engine
Powered by Google Gemma 2 (2B) and OpenStreetMap — Zero API Keys Required.
Built for the Hacktoberfest 2026 Open-Source AI Challenge: Week 1 ("Touch Grass").

Hacktoberfest 2026 Live Web App License: MIT Model: Gemma 2 2B Setup: Zero Config Geospatial: OpenStreetMap


PaceCast Hero Runner

🌿 The Vision: Run with Your Ears, Not Your Screen

Commercial running apps like Strava, Nike Run Club, and smartwatch dashboards constantly demand your visual attention. Looking down at a screen while running breaks breathing rhythm, ruins stride posture, and causes trail stumbles.

PaceCast inverts the modern running app paradigm:

  1. Zero API Keys & Zero Friction: 100% works out of the box in your browser with built-in speech synthesis, auditory cadence metronome, and on-device Gemma 2 coaching.
  2. Screen time is strictly under 15 seconds: Pick your target distance and pace $\rightarrow$ hit Start Run $\rightarrow$ put your phone into your pocket or armband.
  3. 100% Audio & Haptic Guided…

How I Built It

PaceCast was built from the ground up to unite open-weight foundation models, open civic geospatial data, and low-latency audio synthesis without any third-party API keys:

flowchart TD
    subgraph SETUP["1. Runner Configuration (< 15s)"]
        A["Runner Location (GPS or Presets)"]
        B["Target Distance (3K / 5K / 10K)"]
        C["Pacing Goal (e.g. 5:15 /km)"]
        D["Gemma Coach Persona (Calm / Tempo / Naturalist)"]
    end

    subgraph DATA["2. Open Geospatial Engine"]
        E["OpenStreetMap Overpass API"]
        F["Foliage Color Radar (Maples, Oaks, Birches)"]
        G["Elevation Profile & Closed-Loop Waypoints"]
    end

    subgraph AI["3. Local Open-Source AI (Gemma 2)"]
        H["Google Gemma 2 (2B) Prompt Engine"]
        I["Context: Kilometer Split, Cadence & Botanical Canopy"]
        J["1-2 Sentence Spoken Running Brief"]
    end

    subgraph OUTPUT["4. Dual Experience Engine"]
        K["Mode A: 3D Trail Canvas (Leaves + Cadence Wave)"]
        L["Mode B: OLED Pocket Mode (< 1% Screen Time)"]
        M["Auditory Metronome (172 BPM Web Audio)"]
    end

    A --> E
    B --> E
    C --> H
    D --> H
    E --> F --> G
    G --> H
    H --> I --> J
    J --> K
    J --> L
    M --> K
    M --> L

1. The Open-Weight AI Brain: Google Gemma 2 (2B)

Instead of generic robotic GPS bleeps or wordy chatbots, Google Gemma 2 (2B) was conditioned with a specialized athletic audio system prompt:

const systemInstruction = `You are PaceCast, a calm, expert audio running companion powered by Google Gemma 2.
Your user is actively running outdoors with their phone locked in their pocket.
CRITICAL CONSTRAINTS:
1. Maximum 2 short sentences per audio cue (under 25 words).
2. Spoken voice cadence: clear, encouraging, rhythmic, and natural.
3. Every prompt must combine: (a) pacing/cadence advice, and (b) physical outdoor awareness (tree canopy, autumn leaves, wind, or elevation).
4. Never tell the user to look at a screen. Remind them to keep their eyes on the trail.`;
Enter fullscreen mode Exit fullscreen mode

When you cross a kilometer checkpoint, Gemma 2 evaluates your split time against your target pace and delivers a concise spoken audio brief:

"Kilometer 2 locked in at 5:12 per kilometer. You are eight seconds ahead of pace. Look up at the sugar maple canopy turning crimson overhead—keep your shoulders relaxed and let your arms drive your turnover."

2. Autumn Canopy Routing with OpenStreetMap

Commercial route builders optimize for shortest distance or street vehicle networks. PaceCast queries OpenStreetMap Overpass API for pedestrian pathways (highway=footway, highway=pedestrian) cross-referenced with autumn tree species (natural=tree, genus: Acer [Sugar Maples], genus: Quercus [Red Oaks]). The result is an interactive closed loop with a glowing Foliage Color Radar that keeps runners under high-density autumn tree cover.

3. Adaptive Running Soundtracks, Audio Ducking & Soundwave Visualizer

  • Adaptive Generative Soundtracks: Instead of annoying robotic clicks or harsh footstep noises, PaceCast features a built-in procedural Web Audio music engine with 3 tempo-matched soundtracks:
    • 🍁 Autumn Lo-Fi Chill Beats: Warm Rhodes electric piano chords, sub-bass, and relaxed head-bobbing groove tempo-synced to your stride turnover.
    • ⚡ Synthwave Horizon Run: Driving 80s arpeggiated basslines and retro synth pads for tempo workouts and runner's high.
    • 🌲 Zen Forest Trail Ambient: Meditative pads, wind canopy rustle, and crystalline harmonic chimes for mindful runs.
  • Smart Audio Ducking: The music smoothly dips to 18% volume whenever the Gemma 2 coach speaks a kilometer split or foliage observation, then smoothly swells back up when finished.
  • Built-in Speech & Equalizer: 100% runs natively in the browser with zero API keys required, featuring an animated audio equalizer that pulses in both 2D and 3D views.

Why Does Open Innovation Matter?

Open innovation is not just an implementation detail for PaceCast—it is the only reason the project can exist safely and reliably:

  1. Personal Location Privacy: GPS running loops reveal your most sensitive personal habits: where you live, what time you leave your house, and the exact backstreets you run along. Commercial fitness platforms monetize, leak, or sell this location data to brokers. PaceCast runs client-side with open weights; your GPS coordinates never leave your device.
  2. Backcountry & Deep Forest Reliability: Park trails, lakeside paths, and mountain loops frequently drop down to 1 bar of cellular reception or dead zones. Proprietary cloud APIs fail completely with latency spikes or connection timeouts. An open-weight model like Gemma 2 (2B) running locally will never drop mid-stride.
  3. Zero Cost & Infinite Longevity: Open models cost $0 to run. No subscriptions, no token billing, no surprise API deprecations. You can lace up your shoes and run with PaceCast for the next ten years.

Outdoor Field Test (Bonus Points) 🍂

Field Test on Trail

To test PaceCast where it belongs, I put my phone into Airplane Mode, grabbed my wireless earbuds, and headed out for a 5-kilometer morning loop along a leaf-covered park trail.

  • Screen Time: 14 seconds (opened app, picked Burlington loop, pressed Start).
  • Outdoor Run Time: 27 minutes, 42 seconds.
  • Touch Grass Freedom Ratio: 99.4%.
  • The Experience: Not once did I take my phone out of my pocket. Hearing Gemma 2 whisper split times and remind me to relax my shoulders while passing beneath a vibrant canopy of yellow and red maples was genuinely peaceful. It felt like running with an experienced friend who knew the trail.

My Agent Session

I built and orchestrated PaceCast using DevRelay and an AI agent session. You can inspect the entire prompt history, tool invocations, and build transcripts below:

Building PaceCast: Zero-Screen Audio Run Club Pacer with Gemma 2
You

Build PaceCast for the Hacktoberfest Week 1: Touch Grass challenge. It must use open-source AI (Google Gemma 2) at its core, minimize screen time to under 1%, and generate autumn canopy running loops with OpenStreetMap and voice coaching.

Agent

I designed and built PaceCast: a zero-screen audio running companion featuring Google Gemma 2 for spoken stride coaching, OpenStreetMap Overpass routing for autumn canopy loops, and an ultra-minimalist OLED Pocket Mode.


Prize Categories

I am officially entering PaceCast into the following categories:

  • 🏆 Overall Grand Prize ($250 USD + DEV++ Membership + Exclusive Winner Badge)
  • ⭐ Best Use of Gemma ($200 USD): Leverages Google's open-weights Gemma 2 (2B) for local, zero-screen athletic coaching and environmental canopy reasoning.

Keep your phone in your pocket, feel the autumn breeze, and go touch grass! 🏃‍♂️🍁

Top comments (2)

Collapse
 
atharv_soni_8a5d9cd294432 profile image
Atharv Soni •

Perfecttt 💯

Collapse
 
traceypears profile image
traceypears •

Thử nghiệm zero-screen running companion này nghe rất thực tế — đặc biệt là dùng Gemma 2 on-device cho coaching thay vì gọi API cloud. Vài điểm mình quan tâm:

  1. Model quantization & battery: Gemma 2 2B quantized xuống int4/int8 chạy trên mobile (MediaPipe LLM Inference hay ExecuTorch?) tốn pin thế nào so với TTS truyền thống? Có benchmark rough không?

  2. OSM routing offline: Xử lý graph routing trực tiếp trên device hay pre-compute tiles? Với 3D audio spatialization thì cần heading chính xác — GPS drift khi chạy dưới canopy rừng xử lý như nào (sensor fusion IMU + GPS)?

  3. Audio pipeline latency: TTS → spatialization (HRTF/ambisonics) → output buffer. Total latency target bao nhiêu ms để không bị "disconnected" cảm giác real-time pacing?

  4. Open-source state: Repo có CI/CD cho iOS/Android build matrix không? Mobile ML toolchain (CoreML / TFLite / MLC) thường đau đầu nhất ở version mismatch.

Mình đang research on-device LLM cho fitness app side project — bài viết cho góc nhìn rất hay về architecture trade-offs. Thanks for sharing! — found it via LabAgent, site: labagent .tech