DEV Community

aditya-bobate
aditya-bobate

Posted on AI-assisted

I Built My Friend a Private Japanese Conversation Partner with Gemma

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
I built SpeakMate, a private Japanese conversation partner for my friend.
He's learning Japanese because he's preparing for an upcoming exchange program in Japan. The problem was simple: he needed someone to practice speaking Japanese with, but he didn't always have someone available.
So instead of building another generic chatbot, I built something specifically for him.
SpeakMate lets him:

  • 🎙️ Speak Japanese using his microphone
  • 📝 Get his speech transcribed locally
  • 🤖 Have a conversation with Gemma 3 4B
  • ✏️ Receive useful Japanese corrections
  • 💬 Get short explanations in English
  • 🔊 Hear the response spoken back in Japanese The goal was simple: Open SpeakMate → Speak Japanese → Keep talking. Demo The project currently runs locally because the AI models are designed to run on the user's own computer. GitHub: https://github.com/aditya-bobate/SpeakMate The repository contains the complete source code and setup instructions. Code GitHub Repository: https://github.com/aditya-bobate/SpeakMate How I Built It The most important design decision was making the AI local. SpeakMate uses Gemma 3 4B through Ollama for the conversation and faster-whisper for speech recognition. The architecture is: Browser → MediaRecorder → FastAPI → faster-whisper → Japanese text → Gemma 3 4B via Ollama → Japanese response + correction → Browser Text-to-Speech I built the backend with Python and FastAPI. The frontend is intentionally simple: plain HTML, CSS and JavaScript. For the conversation, I use Gemma 3 4B locally through Ollama. I designed the prompt to make Gemma behave more like a friendly Japanese-speaking friend rather than a textbook. It is instructed to:
  • Use natural but beginner-friendly Japanese
  • Ask exactly one follow-up question
  • Focus on practical situations
  • Correct only meaningful mistakes
  • Explain corrections briefly
  • Encourage the learner instead of overwhelming them For voice input, I initially experimented with browser speech recognition, but it wasn't reliable enough. So I switched to a local faster-whisper pipeline. The voice interaction works like this: Microphone → MediaRecorder → /transcribe → faster-whisper → Japanese text → /chat → Gemma 3 4B → Response + correction → Browser TTS Why Does Open Innovation Matter? Language practice can contain personal conversations. Instead of requiring a cloud AI API for every message, the core AI processing can happen on the user's own computer. SpeakMate uses:
  • Gemma 3 4B for conversation
  • Ollama for local model inference
  • faster-whisper for local speech recognition This makes the project more private and gives me more control over the AI stack. It also means the project isn't locked into a single closed API. The underlying local model can be changed or experimented with as the project evolves. For my friend, this wasn't just a technical choice. It directly supported the problem I was trying to solve: giving him a private place to practice Japanese conversations. Testing It With My Friend This is the part that mattered most to me. I actually handed the working version to the person I built it for. His reaction was: "I loved it. It was easy to use."

That was exactly what I wanted to hear.
I wasn't trying to build the most complicated language-learning platform possible.
I wanted to build something my friend could open and immediately start using.
The feedback validated the simple interface and the conversational approach.
Technical Stack
AI Model: Gemma 3 4B
Model Runtime: Ollama
Speech Recognition: faster-whisper
Backend: Python + FastAPI
Frontend: HTML + CSS + JavaScript
Text-to-Speech: Browser Speech Synthesis API
What I'd Build Next
If I continue working on SpeakMate, I'd like to add:

  • Conversation scenarios for university, restaurants, travel and making friends
  • Japanese vocabulary tracking
  • Pronunciation feedback
  • Learning progress tracking
  • Better mobile support
  • More local model options My Agent Session I did not use a DevRelay agent session for this project. Prize Categories Gemma SpeakMate uses Gemma 3 4B as the core conversational AI model. Why I Built This My friend didn't need another AI demo. He needed someone to practice Japanese with. So I built him one. And because the core AI runs locally with open models, the project can remain private, customizable, and something I can continue experimenting with. That's what open innovation means to me in this project: having the freedom to build around the actual needs of a person instead of forcing the problem into a closed service. GitHub: https://github.com/aditya-bobate/SpeakMate

Top comments (0)