Building Audio Alerts with TTS for Gemini CLI
Ever wish Gemini CLI could actually speak to you? I built an extension that adds audio alerts with text-to-speech.
Quick Install
gemini extensions install https://github.com/HainanZhao/gemini-extension-audio-alerts
Set your theme:
export AUDIO_ALERTS_THEME=retro
Available themes: retro, espionage, hero, portal, premium
The Problem
When running Gemini CLI in the background, you miss important moments:
- When the agent needs your permission to run a tool
- When an error occurs
- When a long task completes
The Solution
Plays themed sounds followed by spoken messages:
Sounds
- retro - 8-bit game sounds
- espionage - High-tech clicks
- hero - Dramatic fanfare
- portal - Magical transitions
- premium - Elegant chimes
Spoken Messages
| Event | Retro Theme | Espionage Theme |
|---|---|---|
| Permission | "Permission needed" | "Agent requesting permission" |
| Error | "Error detected" | "Critical failure detected" |
| Done | "Game over. You win" | "Mission accomplished" |
Cross-Platform
-
macOS:
say,afplay -
Linux:
espeak,gtts-cli,play - Windows: PowerShell System.Speech
Repo
https://github.com/HainanZhao/gemini-extension-audio-alerts
This post was written with assistance from AI coding agents.
Top comments (0)