Skip to content
Arunish Rajput@arunishrajput

AI & agents

Gemini Voice Assistant

A wake-word voice assistant built on the Gemini API — and the small project that quietly found an audience.

Archived2024Solo build
PythonSpeechRecognitionpyttsx3Gemini API

STARS

22★

FORKS

6



The problem

I wanted a voice assistant I could actually change — configurable wake word, my own exit commands, a voice I picked — rather than one that answers to a brand name and does what the vendor decided.


What I built

A Python loop that listens continuously, wakes on a configurable phrase, sends what follows to the Gemini API, and speaks the reply through pyttsx3. Wake word, exit words, speech rate and volume are all config, not constants.

It is a small program. It is also the most-starred thing I have written — 22 stars and 6 forks from people I have never met — which taught me something the code didn't: a short README that says exactly what a thing does and how to run it is worth more reach than a bigger project without one.


How it works

Continuous listening in a loop, with the wake word gating what actually reaches the API — so idle chatter never spends a request. Exit words break the loop cleanly rather than killing the process mid-speech.


What I'd do differently

The original README told people to paste their API key directly into main.py, which is how keys end up in commit history. It should have been an environment variable from the first line, and that is the change I would make before touching anything else.