This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
๐ฃ๏ธ LingoBuddy โ Anxiety-Free Language Conversation Partner
A personalized, zero-judgment foreign language conversation simulator powered by local open-weight AI and the Web Speech API.
What I Built
Who I Built It For
I built LingoBuddy for my close friend who has been eagerly preparing to travel and relocate abroad, but struggles with intense foreign language conversation anxiety. Whenever they try to practice with native speakers or conventional language apps, they freeze up. Fear of making grammatical blunders, the pressure of rapid-fire replies, and the awkwardness of asking someone to repeat themselves over and over turn what should be an exciting journey into an intimidating hurdle.
The Problem It Solves
Traditional language learning platforms rely heavily on gamified countdown timers, flashcards, or punitive scoring systems that actually amplify anxiety. Furthermore, conversational chatbots often generate walls of unbroken text that overwhelm beginners.
LingoBuddy solves this by creating a 100% judgment-free, private safe haven for vocal immersion:
-
The "Anxiety Shield" (
[?] Hint): A one-click rescue system embedded into every single AI speech bubble. If my friend gets stuck or nervous, tapping[?]immediately reveals a gentle inline card with:- Plain-English Translation: Contextual and literal understanding.
- Grammar Insight: Clear, non-academic explanations of verb conjugations, polite forms, and sentence structures.
- Vocabulary Spotlight: Monospace chips highlighting key vocabulary.
- 3 Suggested Safe Replies: Instant rescue responses they can tap to auto-fill the chat input or practice speaking aloud.
-
Hands-Free Voice Conversation: Powered by the native browser Web Speech API (
SpeechRecognition&SpeechSynthesis), with live audio equalizers and state indicators (LISTENING,PROCESSING,SPEAKING,IDLE). -
Pacing Control: An audio pace toggle allowing relaxed
0.75x๐ข slow speech or natural1.0xโก standard pace. -
Authentic Scenarios: Roleplay environments tailored to everyday real-life challenges:
- โ At a Coffee Shop
- ๐บ๏ธ Asking for Directions
- โ๏ธ Airport Check-in & Customs
- ๐จ Hotel Reception Check-in
- ๐ฌ Friendly Casual Chit-Chat
-
Private Progress Tracking: Uses the browser's Web Storage API (
localStorage) to celebrate consistency with daily streaks, total sentences spoken, and a positive fluency confidence meter.
Demo
- GitHub Repository: [https://anushragav-vs.github.io/LingoBuddy/]
- Architecture: Zero-build Progressive Web App (PWA). You can run it locally with zero dependencies in seconds:
# Clone the repository
git clone https://github.com/anushragav-vs/LingoBuddy.git
cd LingoBuddy
# Run using any static HTTP server (Python, npx, or Live Server)
python -m http.server 3000
Then navigate to http://localhost:3000 in Google Chrome or Microsoft Edge.
Core Interface Highlights:
-
Glassmorphism Dashboard: Obsidian dark palette (
#07090e), frosted glass panels (backdrop-filter: blur), dynamic soundwaves, and language flags. - Voice Control Dock: Concentric pulsing microphone animation during active speech recognition, real-time transcription preview, and a synthetic voice audio interrupt button.
- Multi-Language Selector: Seamlessly switch between Spanish ๐ช๐ธ, French ๐ซ๐ท, German ๐ฉ๐ช, Italian ๐ฎ๐น, Japanese ๐ฏ๐ต, and Mandarin ๐จ๐ณ with automatic BCP-47 speech recognition and synthesis reconfiguration.
Code
The complete source code is available on GitHub:
๐ https://github.com/anushragav-vs/LingoBuddy
Clean Modular Structure (Zero Node Modules Bloat):
LingoBuddy/
โโโ index.html # Semantic Glassmorphism single-page UI & PWA shell
โโโ manifest.json # Progressive Web App manifest (standalone installable)
โโโ sw.js # Service worker for offline asset caching
โโโ instructions.md # Functional requirements & UX specifications
โโโ rules.md # Engineering architecture guidelines
โโโ .gitignore # Git ignore rules
โโโ README.md # Hacktoberfest submission & documentation
โโโ assets/
โโโ css/
โ โโโ styles.css # Glassmorphism tokens, soundwave bars, glow rings
โโโ js/
โโโ app.js # Master UI controller and state machine
โโโ speech-handler.js # Web Speech API wrapper (STT & TTS engines)
โโโ ai-handler.js # Ollama REST connector + autonomous fallback simulator
โโโ storage-handler.js # LocalStorage CRUD, streaks & fluency metrics
โโโ scenarios.js # Multi-language dialogues & Anxiety Shield metadata
How I Built It
1. Open-Source AI & Local Inference Layer
LingoBuddy is architected around open-weight foundation models via Ollama (http://localhost:11434/v1/chat/completions):
-
Models: Optimized for Qwen 2.5 (
qwen2.5:latest) and Llama 3 (llama3:latest). - Prompt Engineering: Uses structured JSON schema outputs to enforce conversational brevity (1โ2 spoken sentences) paired with rich metadata required by the Anxiety Shield:
{
"reply": "ยกHola! Bienvenido a Cafรฉ Luz. ยฟQuรฉ te gustarรญa tomar hoy?",
"translation": "Hello! Welcome to Cafรฉ Luz. What would you like to have today?",
"grammarTip": "'ยฟQuรฉ te gustarรญa...?' uses the polite conditional form of 'gustar'.",
"vocabHighlight": ["Bienvenido (welcome)", "Tomar (to drink)"],
"suggestedReplies": [
"Un cafรฉ con leche de avena, por favor.",
"ยฟTienen cruasanes o algo para comer?",
"Solo un espresso doble, gracias."
]
}
-
Autonomous Local Fallback Engine: If Ollama isn't running on the user's machine, the app automatically switches to an embedded contextual dialogue simulator in
ai-handler.js, ensuring 100% uptime with zero setup friction.
2. Audio & Speech Engineering
- Implemented via the native Web Speech API:
-
SpeechRecognition/webkitSpeechRecognitiondynamically adjusts itslangattribute to the target language (e.g.,es-ES,fr-FR,ja-JP). -
SpeechSynthesisqueries system voice catalogues to select high-fidelity native accents with pitch and rate modulation (0.75x slow mode). - Built-in audio collision prevention stops speech recognition while the synthetic voice is speaking to prevent self-echo loops.
-
3. Frontend Architecture
- Vanilla ES6+ Modules: Built with zero bundlers (no Webpack, Vite, or Babel required).
- Tailwind CSS via CDN + Custom CSS: Ultra-smooth Glassmorphism styling with dark obsidian surfaces, cyan/emerald accents, and animated SVG waveforms.
-
PWA Ready: Includes
manifest.jsonandsw.jsfor desktop and mobile offline installation.
Why Does Open Innovation Matter?
Open innovation is what made LingoBuddy possible in ways closed APIs never could:
- Uncompromising Privacy for Vulnerable Learning: Learning a language involves making awkward, embarrassing mistakes. When users practice with closed commercial APIs (OpenAI, Google, Anthropic), their intimate voice recordings and transcripts are transmitted over third-party servers and potentially stored or used for training. By running open-weight models (Qwen-2.5, Llama-3) locally via Ollama, my friend's voice and thoughts never leave their laptop.
- Zero Cost & Infinite Practice: Language fluency requires hundreds of hours of trial and error. Closed cloud APIs charge per-token fees that penalize users who need more repetitions. Open-source local inference is 100% free and unlimited.
- Resilience & Travel Readiness: Learners frequently travel to places with spotty airport Wi-Fi or expensive roaming data. Because LingoBuddy combines local open-source AI with a PWA service worker and an autonomous offline fallback engine, it remains fully usable on airplanes, trains, or in remote cafes without an internet connection.
My Agent Session
This application was engineered collaboratively using Antigravity AI:
- Architecture planning and technical specification generation in
instructions.mdandrules.md. - End-to-end development of modular ES6 frontend, Web Speech API integration, and local Ollama REST client.
- Zero-dependency PWA configuration and Git repository deployment.
Prize Categories
- Build for a Friend (Primary Challenge Category)
- Open Innovation / Local AI
- Personal Productivity & Learning
Top comments (0)