Wax ma — open-source speech-to-speech voice AI for Wolof and French. Plug into any existing app.
# Wolof Voice AI
Open-source speech-to-speech voice AI for **Wolof and French**. Speak, get
transcribed, get answered, hear the answer spoken back — in Wolof or French,
automatically detected.
This is the production architecture behind SAMADROIT
(a Senegalese legal assistant) and ADEPME (an SME support bot), stripped of
business logic and packaged so any developer can plug it into their own
application.
## What this is for
There is no production-grade open-source Wolof voice assistant. This repo
fixes that. It gives you a working, tested pipeline — transcription,
language-aware chat, and Wolof/French text-to-speech — as a small SDK with
no framework lock-in.
**It is designed to be embedded into anything that already exists**: an
ERP, a CRM, a government portal, a mobile app, a customer-support widget. You
add one server route, you get a voice feature. You don't rebuild your app
around it.
## Architecture
```
Audio in (mic / file)
│
├─ Transcription (cascade)
│ 1. Gemini 2.5-flash multimodal (primary) — detects wo/fr, transcribes
│ faithfully, extracts topic + key facts (anti-drift breakdown).
│ 2. Groq Whisper Large v3 (fallback) — used if Gemini fails/rate-limits.
│
├─ Understanding & reply
│ - Voice → Gemini direct, reads the full breakdown (original + topic +
│ key facts) and replies natively in the spoken language.
│ - Typed → Groq (Llama 3.3 70B, with a model fallback chain).
│
└─ Text-to-speech (routed by language)
- Wolof → Gemini TTS, "Autonoe" voice (PCM → MP3 via lamejs)
- French → Microsoft Edge TTS (free, no API key)
```
Everything in `packages/core` runs **server-side only**. No client ever talks
to Gemini/Groq directly — your server holds the keys, the browser only talks
to your own API route.
## Repo layout
```
packages/core/ The SDK: transcribe.ts, llm.ts, tts.ts — provider calls, no UI.
examples/demo-web/ Working speech-to-speech chatbot (Next.js), chat-style UI
(text + voice input, voice output). No …