原始内容
Loqui
Loqui gives your Mac a local voice service. Keep Loqui running in the menu bar, then use it from Terminal, Pi, Claude Code, or any app that knows how to send text to Loqui.
Loqui runs on-device using PocketTTS through FluidAudio, so speech does not require cloud TTS APIs, API keys, or per-request fees. The first speech request may take longer while model assets are downloaded and cached locally.
Requirements
- macOS 14 or newer
- Apple Silicon Mac recommended
- Homebrew for the easiest install
Install Loqui
brew install swairshah/tap/loqui
Then open Loqui from Applications. It runs as a menu bar app.
To confirm it is running:
loqui status
Speak from Terminal
loqui say "Hello, world!"
loqui say --voice alba "Good morning!"
echo "Text from a pipe" | loqui say
loqui voices
loqui stop
Available voices:
alba, vera, paul, charles, michael, anna, fantine, eponine, cosette, eve, george, mary, marius, javert, azelma, caro_davy, peter_yearsley, stuart_bell
You can also change the default voice in Loqui's menu bar settings.
Use with Pi
Install the Pi extension:
pi install npm:@swairshah/pi-talk
Restart Pi if needed. Once installed, Pi can speak short <voice> summaries from assistant responses through Loqui.
Pi commands:
| Command | Description |
|---|---|
/tts |
Toggle TTS on or off |
/tts-mute |
Mute audio while keeping voice tags |
/tts-voice <name> |
Change voice |
/tts-style |
Toggle succinct or verbose voice prompts |
/tts-say <text> |
Speak text manually |
/tts-stop |
Stop current speech |
/tts-status |
Show TTS status |
Use with Claude Code
Loqui also includes a Claude Code plugin in Extensions/claude-code-talk.
From this repository:
claude plugin install ./Extensions/claude-code-talk
Claude Code speaks after each response completes because Claude Code hooks run after the full assistant message is available.
Use with MCP-Capable Agents
Loqui includes an MCP server package in Extensions/loqui-mcp. It gives MCP clients tools for speaking text, stopping playback, checking status, listing voices, and saving WAV audio.
Auto-install it to detected agents:
npx -y @swairshah/loqui-mcp@latest mcp --install
This registers Loqui with Claude Code, Codex, Cursor, Windsurf, OpenCode, and Pi when their CLIs/config directories are present.
MCP gives agents explicit tools. Automatic spoken summaries from every assistant response still need an app-specific hook or extension, such as the bundled Pi and Claude Code integrations.
Stop Speech
Use any of these:
loqui stop
- Press Cmd+. anywhere on macOS.
- Click stop in the Loqui menu bar app.
- Use
/tts-stopin Pi or/claude-talk:tts-stopin Claude Code.
Microphone-Aware Playback
Loqui watches whether the default microphone is active. If your microphone becomes active while Loqui is speaking, current speech stops and queued speech is cleared. If the microphone is already active, queued speech waits until microphone activity ends.
Loqui detects microphone activity through CoreAudio device state; it does not capture microphone audio.
Troubleshooting
Loqui is not speaking
- Check that Loqui is running in the menu bar.
- Run
loqui status. - Try
loqui say "Testing Loqui". - Check your macOS output device and volume.
The first request is slow
The model may still be downloading and caching. Try again after the first synthesis finishes.
Pi or Claude Code is not speaking
- Make sure Loqui is running.
- Test
loqui say "Testing"from Terminal. - Check the extension status command:
/tts-statusin Pi or/claude-talk:tts-statusin Claude Code.
Developer Docs
Credits
- Pocket TTS by Kyutai Labs
- FluidAudio by Fluid Inference
License
MIT