Skip to content

Repository files navigation

LocalMind

AI that speaks your language. A voice AI for African languages built by Kajarnak Tech.

Live: https://kajarnaklokossou2008.github.io/localmind/

Features

  • Voice Input (Web Speech API SpeechRecognition) — live transcription with graceful text-input fallback.
  • Translation Engine — rule-based translation across French, English, Fon, Yoruba, Wolof (55+ curated phrases; approximate matching for unknown input).
  • Voice Output (SpeechSynthesis) — click any phrase to hear it; system-voice selection and rate control.
  • Radio Digest — 3 pre-loaded radio transcripts are summarized with real extractive summarization (sentence scoring by keyword frequency) and regex extraction of prices, dates, and locations.
  • Phrase Learning — quiz mode with score tracking, plus a "My Phrases" library persisted in IndexedDB.
  • Offline mode — bundled dictionaries + radio segments + Service Worker via vite-plugin-pwa.

Tech Stack

  • React 18 + TypeScript + Vite (base /localmind/)
  • Dexie.js (IndexedDB)
  • Web Speech API (SpeechRecognition + SpeechSynthesis)
  • vite-plugin-pwa for offline support
  • Real translation dictionaries (src/lib/dictionaries/{fr,en,fon,yoruba,wolof}.ts)

Development

npm install
npm run dev      # local dev server
npm run build    # production build → ./dist
npm run preview  # preview the production build

Deploy

GitHub Actions workflow at .github/workflows/deploy.yml builds and deploys to GitHub Pages on every push to main.

Project Structure

localmind/
├── .github/workflows/deploy.yml
├── public/{robots.txt, favicon.svg}
├── src/
│   ├── components/         # VoiceInput, TranslationEngine, PhraseBook, RadioDigest, PhraseLearning, Header
│   ├── lib/
│   │   ├── dictionaries/   # fr, en, fon, yoruba, wolof (55 phrases each)
│   │   ├── translator.ts   # phrase lookup + bulk translation
│   │   ├── summarizer.ts   # extractive summarization + regex extraction
│   │   ├── speech.ts       # SpeechRecognition + SpeechSynthesis helpers
│   │   ├── db.ts           # Dexie schema
│   │   └── i18n.ts         # EN/FR strings
│   ├── hooks/              # useTheme, useLocale, useSpeech
│   ├── data/radio-segments.ts
│   ├── styles/global.css
│   ├── App.tsx
│   └── main.tsx
├── index.html
├── package.json
├── tsconfig.json
├── vite.config.ts
├── sitemap.xml
└── README.md

Disclaimer

African-language translations are curated for educational use; native-speaker review is recommended for production-grade linguistic accuracy. Browser support for SpeechRecognition in Fon/Yoruba/Wolof varies — the app gracefully falls back to text input.

About

Voice AI for African languages — 275 curated translations across FR/EN/Fon/Yoruba/Wolof + Web Speech API + PWA offline.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages