Chanakya: The Open-Source Voice Assistant That Stays Offline
In a world where every "Hey Siri" or "Okay Google" sends your voice to a remote server, privacy often feels like an afterthought. What if you could have a helpful voice assistant that actually respects your data? That's the idea behind Chanakya, an open-source project that runs entirely on your own machine.
No API keys, no cloud processing, no data harvesting. Just a local, functional voice assistant you can talk to without wondering who else is listening.
What It Does
Chanakya is a Python-based voice assistant designed to operate completely offline. You speak to it, it processes your speech locally, figures out your intent, and responds—all without an internet connection. It handles basic tasks like telling the time, opening applications, searching your local files, or even fetching Wikipedia summaries (the one task that does require a network call). The core promise is simple: your audio and your data never leave your computer.
Why It's Cool
The clever part isn't just the offline functionality—it's how it's built. Chanakya uses a combination of Vosk for offline speech-to-text and PyTorch with a fine-tuned BERT model for natural language understanding. This means it's not just doing simple keyword matching; it's actually interpreting the intent behind your sentences locally.
Its modular "skill" system is also a developer's dream. Want to teach it a new trick? You can write a simple Python function, drop it into the skills directory, and the assistant can learn to perform a new task. The architecture is straightforward and begs for tinkering.
For developers, this is a fantastic sandbox. It demystifies how voice assistants work under the hood, from audio processing to intent classification, all with code you can read and modify. It’s a practical entry point into the world of NLP and offline AI.
How to Try It
Getting Chanakya running on your machine is pretty straightforward. You'll need Python 3.7+ and a bit of comfort with the terminal.
Clone the repo:
git clone https://github.com/Rishabh-Bajpai/Chanakya-Local-Friend.git cd Chanakya-Local-FriendInstall the dependencies:
pip install -r requirements.txtDownload the necessary models: The setup script will guide you, but you'll need to download the Vosk speech recognition model and the fine-tuned BERT model. Links are provided in the repository's README.
Run it: