claude-stts
A Claude Code plugin that adds speech-to-text (STT) and text-to-speech (TTS) capabilities to the Claude Code CLI. Speak your prompts instead of typing them, and hear Claude's responses read aloud.
If you are looking for gemini cli alternative... gemini-stts

Features
- Speech-to-Text (
/t) - Dictate your prompt using your microphone via a Chrome-based UI powered by the Web SpeechRecognition API
- Text-to-Speech (
/h) - Have Claude's response (or any text) spoken aloud using the browser's SpeechSynthesis API
- Combined STT + TTS (
/th) - Speak your prompt and automatically hear the response -- a full voice conversation flow
- Looping STT (
/tl) - Like /t, but keeps re-opening the dictation dialog after each prompt until you cancel it
- Looping STT + TTS (
/thl) - Like /th, but stays in a continuous speak-and-listen loop until you cancel the dialog
Voice Commands (STT)
While dictating, you can use voice commands for hands-free editing:
| Command | Action |
|---|
insert comma / period / question mark / exclamation mark / tab | Inserts the corresponding punctuation or character |
new paragraph | Ends the current sentence and starts a new paragraph |
go to start / go to end | Moves cursor to the beginning or end of the text |
select all | Selects all text |
unselect selection | Collapses the selection without deleting |
delete selection | Deletes the selected text |
undo it / redo it | Undo or redo the last action |
A built-in cheat sheet for these voice commands is also available via the 🗣️ button in the STT dialog.
Keyboard Shortcuts (STT)
| Shortcut | Action |
|---|
Ctrl+R | Toggle speech recognition on/off |
Enter | Send the prompt |
Shift+Enter | Insert a new line |
Escape | Stop recording / cancel |
How It Works
The plugin launches a Chrome instance (via chrome-launcher) in app mode and connects to it using puppeteer-core. This approach leverages the browser's native SpeechRecognition and SpeechSynthesis APIs, which provide high-quality speech processing without requiring any external API keys or services.
- STT flow: Opens a Chrome window with a textarea where you can type or dictate. Microphone permission is automatically granted via Puppeteer. When you click "Send" or press Enter, the text is printed to stdout, which Claude Code captures and processes as your prompt.
~Speak
- TTS flow: Opens a Chrome window that receives text via Puppeteer's
evaluateOnNewDocument, then speaks it using SpeechSynthesisUtterance. Supports a --oneshot flag to automatically close after speaking.
~Hear
Architecture
claude-stts/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/
│ ├── t.md # /t command - speech-to-text
│ ├── tl.md # /tl command - looping speech-to-text
│ ├── h.md # /h command - text-to-speech
│ ├── th.md # /th command - combined STT + TTS
│ └── thl.md # /thl command - looping STT + TTS
├── src/
│ ├── chrome-sidekick.ts # Chrome launcher and Puppeteer connection utilities
│ ├── stt.ts # STT entry point - launches Chrome with speech recognition UI
│ ├── stt_ui.html # STT frontend - textarea with SpeechRecognition integration
│ ├── tts.ts # TTS entry point - launches Chrome with speech synthesis UI
│ └── tts_ui.html # TTS frontend - textarea with SpeechSynthesis integration
├── dist/ # Pre-built bundles (committed so users don't need `npm install`)
│ ├── stt.mjs # Bundled STT entry point
│ ├── tts.mjs # Bundled TTS entry point
│ ├── stt_ui.html # Copied at build time
│ └── tts_ui.html # Copied at build time
├── build.mjs # esbuild build script
├── package.json
└── tsconfig.json
Prerequisites
- Node.js (v18+)
- Google Chrome or Chromium installed on your system
- A working microphone for speech-to-text
Installation
As a Claude Code Plugin
Install directly from the repository:
claude plugin add https://github.com/sandipchitale/claude-stts
The repository ships with pre-built bundles in dist/, so no npm install is required for end users. The slash commands invoke node ${CLAUDE_PLUGIN_ROOT}/dist/stt.mjs and dist/tts.mjs directly.
For Local Development
git clone https://github.com/sandipchitale/claude-stts.git
cd claude-stts
npm install
npm run build # bundles src/*.ts into dist/ via esbuild