{"slug": "snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that", "title": "Snap Me: learn English from the objects around you, with Gemma 4 and a voice that runs in your browser", "summary": "A developer built Snap Me, a browser-based English-learning app that uses Gemma 4 and the Kokoro-82M text-to-speech model to identify photographed objects and generate vocabulary lessons with pronunciation, example sentences and fill-in-the-blank exercises. The developer cut identification time from 9–13 seconds to 3–4 seconds and lesson generation from 34–66 seconds to 5–6 seconds by setting thinkingLevel to MINIMAL, and resizes photos in-browser (512px to the API, 768px for display) to limit mobile data use. The app, built in about a day for the Hacktoberfest Hack Day Libreville 2026, stores progress, XP and a daily five-photo quota in localStorage with no database or account.", "body_md": "In Libreville, private English lessons are out of reach for many families, and word lists need a discipline that few beginners keep. I teach English, and I know one thing works better than lists: a word stuck to an object you actually own.\n\nSo I built **Snap Me** in about a day for the Hacktoberfest Hack Day Libreville 2026 (Microsoft User Group Gabon, theme \"AI belongs to everyone\"). You photograph an object, and the app gives you its English word, its pronunciation, three example sentences and two fill-in-the-blank exercises. A voice says the word out loud. Every exercise you get right earns XP, which unlocks the past and then the future tense.\n\nThe whole AI chain relies on open models:\n\n`speechSynthesis` if Kokoro is not available.\nThere is no database and no account. Progress, XP, the daily quota and the notebook all live in `localStorage`. That was a constraint I chose to stay shippable in a day, and it turned out to fit the use case well.\n\nMy first version took 9 to 13 seconds to identify an object and 34 to 66 seconds to generate the lesson. Nobody waits that long after taking a photo. Two changes fixed it:\n\n`thinkingBudget: 0` returns a 400 error on this model. I found `thinkingLevel: MINIMAL` on a developer forum instead:\n\n``` js\nconst FAST_CONFIG = { thinkingConfig: { thinkingLevel: ThinkingLevel.MINIMAL } };\n```\n\nWith it, identification takes about 3 to 4 seconds and the lesson about 5 to 6 seconds, and the JSON stayed valid on every call I made. One caveat: this parameter is not in the official documentation, and I only validated it on a handful of calls, so I treat it as a tuning I would re-check before relying on it.\n\nPhotos are resized in the browser before anything is sent: a 512px version goes to the API, and a 768px version is kept for the on-screen result and the notebook. Sending a multi-megabyte photo on every snap would be a product bug where mobile data is costly. For the same reason the voice runs locally instead of calling a server on every listen, and the app is limited to 5 photos a day, which also nudges learners to pick an object that matters to them.\n\nTwo bugs from real use, both fixed with prompt changes:\n\nThe lesson: a small model has no guaranteed structured output, so I validate every field it returns and fix the format on my side instead of trusting it.\n\nExporting and importing progress to change device, recognizing several objects in one photo, and a spaced-repetition review mode for the notebook.\n\nI built this project with the help of Claude Code (Anthropic), and I directed the product, reviewed the changes and tested the app on real photos. Gemma 4 and Kokoro-82M run inside the app. The design reference mockups in the repository (`docs/references`) were generated with AI and only served as design inspiration, they are not used in the app. The logo, icons and share image are drawn in code, and the screenshots are real captures of the app. I drafted this post with AI assistance and edited it myself.", "url": "https://wpnews.pro/news/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that", "canonical_source": "https://dev.to/nelge3d/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that-runs-in-your-4ie6", "published_at": "2026-10-25 12:03:44+00:00", "updated_at": "2026-10-25 12:13:14.624554+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "generative-ai"], "entities": ["Gemma 4", "Kokoro-82M", "Claude Code", "Anthropic", "Microsoft User Group Gabon", "Snap Me"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that", "markdown": "https://wpnews.pro/news/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that.md", "text": "https://wpnews.pro/news/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that.txt", "jsonld": "https://wpnews.pro/news/snap-me-learn-english-from-the-objects-around-you-with-gemma-4-and-a-voice-that.jsonld"}}