💡 Inspiration

Foundation Models (LLMs) possess vast medical intelligence, yet in life-or-death physical emergencies, raw LLMs completely fail. Standard models suffer from The Latency Trap (4–8s reasoning times), disembodied text output, lack of sensory pacing, and fatal conversational "chattiness". In a real rescue, hands are occupied or contaminated, and phones lock automatically.

We built LifeLine Voice to solve the Paradox of Intelligence Systems by wrapping ultra-fast inference into a deterministic, physically grounded, multimodal emergency operating layer.

🚀 What it does

LifeLine Voice is a hands-free, real-time emergency dispatcher operating across two distinct execution tracks:

  • 12 Deterministic ERC/AHA Protocols (0 ms Local Latency): Instant offline guidance for acute emergencies (CPR, severe choking, arterial bleeding, unconsciousness, pediatric head trauma, chemical/detergent ingestion, insect stings in mouth/throat, burns, seizures, fractures, and nosebleeds).
  • Real-Time Voice Barge-In (<200 ms Cancellation): Rescuers can interrupt ongoing speech synthesis mid-sentence when patient status deteriorates (e.g., shouting "Patient lost consciousness!" immediately cuts off the choking protocol and switches to CPR).
  • Acoustic Echo Suppression: Intent-gating algorithms prevent the device speaker from triggering false-positive voice loops in its own microphone.
  • Phonetic Speech Normalization (TTS): Preserves clean, high-contrast visual digits on screen (112, 1., 2., 110 BPM) while phonetically speaking natural phrases ("sto dwanaście", "Po pierwsze" / "one one two", "Step one").
  • Sensory Hardware Telemetry: 110 BPM optical & haptic metronome with medical context-lock for CPR, plus auto-resuming Screen Wake Lock API.
  • Expert AI Reasoning (Server-Side Proxy): Unstructured medical queries outside the 12 protocols are routed via an authenticated server-side Route Handler to Groq Cloud (Llama 3.3-70B & Mixtral), strictly bounded to 3 imperative sentences.
  • Agentic AI Certified: Fully compliant with WebMCP standards and curated llms.txt index for autonomous AI agent discovery.

🛠️ How we built it

  • Framework: Next.js 15 (App Router, React Hooks, Turbopack) with zero client-side API key exposure.
  • Decision Engine (lib/rescue-engine.ts): Pure TypeScript rescue state machine with Unicode-safe Polish and English stem analysis.
  • Audio & Telemetry: Web Speech API (STT streaming with interimResults: true & TTS), Web Audio API (AED triangle-wave audio pulse), Screen Wake Lock API, and Vibration API.
  • Frontend & Accessibility: Tailwind CSS v4 in a high-contrast Swiss-Brutalist emergency aesthetic (100% WCAG AA compliance, min. 5.75:1 contrast).

🧠 Challenges we ran into

  • Acoustic Feedback & Interruption (Barge-In): Preventing the microphone from hearing its own text-to-speech speaker while still allowing the human rescuer to interrupt instantaneously. We solved this with real-time interim intent gating and session index tracking.
  • Mobile Sandbox Restrictions: Overcoming iOS Safari audio autoplay blocks via silent user-gesture priming, handling mobile OS microphone throttling, and eliminating the mobile 300 ms tap delay via touch-action: manipulation.
  • Latency Elimination: Enforcing strict prompt boundaries and deterministic local fallbacks so the assistant never stalls during network drops or API rate limits (404/429).

🏅 Accomplishments that we're proud of

  • Achieving 0 ms local latency for 12 life-critical emergency protocols.
  • Engineering a sub-200 ms Voice Barge-In with full acoustic echo suppression on native browser APIs.
  • Perfect 100/100 score on Google PageSpeed & Lighthouse (100 Performance with 0.3s FCP, 100 WCAG AA Accessibility, 100 Best Practices, 100 SEO, and 3/3 WebMCP Agentic certification).
  • Publishing a comprehensive Technical Architecture Whitepaper comparing LifeLine Voice across 8 commercial platforms (Apple Emergency SOS, Google Personal Safety, Noonlight, Life360).

📖 What we learned

In high-stakes physical domains, system architecture, sensory feedback, and physical telemetry matter far more than raw model parameter scale. Medical safety requires deterministic guardrails over conversational creativity.

🔮 What's next for LifeLine Voice

  • Automated wearable sensor fusion (Apple Watch & Pixel Watch HR/SpO₂) for real-time cardiac arrest detection.
  • WebRTC Computer Vision to passively assess chest compression depth and hand placement.
  • Direct tele-dispatch bridge integration with European 112 / E911 dispatch networks.

📄 Technical Deep Dive: Read our full Mobile & System Architecture Whitepaper (benchmark comparisons, latency budgets, and regulatory analysis).

Built With

  • ai
  • first-aid
  • groq
  • llama-3.3
  • llm
  • mixtral
  • mobile-web
  • next.js
  • react
  • screen-wake-lock-api
  • server-side-prox
  • tailwind-css
  • typescript
  • wcag
  • web-speech-api
  • webmcp
Share this project:

Updates

posted an update —

Quality & Performance Milestone: Perfect PageSpeed & Lighthouse Score

LifeLine Voice has been fully optimized and validated against production standards:

  • [100/100] Performance (0.3s First Contentful Paint, 0 CLS)
  • [100/100] Accessibility (WCAG AA compliant high-contrast UI)
  • [100/100] Best Practices & Security (clean console, zero SSR hydration issues)
  • [100/100] SEO
  • [3/3] WebMCP Agentic Browsing Certified (official llms.txt standard index)

Tested live on production: https://lifeline-command.netlify.app/

Log in or sign up for Devpost to join the conversation.

Submission history