Manahil, a local Urdu and English voice assistant prototype
I prototyped a voice assistant that waits for a wake word, understands spoken Urdu and answers in an Urdu and English mix using models that run on my own PC.
The problem
I wanted a personal voice assistant that handles spoken Urdu and runs on my own PC rather than in a cloud service.
How I built it
The pipeline has five steps: listen for a wake word on the device, record the command until the speaker stops, transcribe it with faster-whisper set to Urdu, send the text to a local language model through Ollama, and give the reply. The assistant's persona answers in a natural Urdu and English mix and keeps replies short.
What got hard
- An assistant that is always listening should not record or transcribe everything it hears.
Wake-word detection runs first, and recording starts only after it fires. The recorder then ends the command after two seconds of quiet using a simple energy-based voice-activity check, and Whisper's own voice filter trims the rest.
- A very large local language model can be missing or fail to answer.
The language layer tries the 72B model first, falls back to an 8B model, and if both fail it returns a short polite Urdu error line instead of crashing the loop.
The result
The loop from wake word to written reply is coded end to end across five scripts. It stayed a prototype: replies are printed rather than spoken.
The ← and → keys turn the page too.