osx-tts-mcp/README.md

43 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# @lilith/osx-tts-mcp
MCP server for **local** text-to-speech on macOS via the built-in `say` command.
No GPU, no network — speech is synthesized and played on the machine running the
server. Companion to `@lilith/speech-synthesis-mcp` (remote Chatterbox/GPU TTS):
use this one when you want local, always-available spoken output.
## Tools
- `synthesize` — speak text aloud. Args: `text` (required), `personality`,
`voice` (overrides personality voice), `rate` (wpm, overrides personality rate).
Fire-and-forget; inline tags like `[laugh]` are stripped.
- `list_voices` — installed macOS voices (`say -v '?'`), optional `locale` filter.
- `list_personalities` — named voice + rate presets.
- `health_check` — engine availability, default voice, installed-voice count.
## Configuration (env)
| Var | Default | Purpose |
| --- | --- | --- |
| `OSX_TTS_VOICE` | `Zoe (Premium)` | Default voice (name from `list_voices`) |
| `OSX_TTS_RATE` | (voice default) | Default speaking rate, words/min |
| `OSX_SAY_BIN` | `/usr/bin/say` | Override the `say` binary path |
| `OSX_TTS_PERSONALITIES_FILE` | `~/.claude/osx-speech-personalities.json` | Custom personalities |
| `OSX_TTS_PLAYBACK_HOST` | (unset) | SSH target to stream audio to a remote listener |
| `AUDIO_PLAYER` | `afplay` (macOS) | Local player |
## Example `~/.mcp.json` entry
```json
"osx-tts": {
"command": "/opt/homebrew/bin/node",
"args": ["/Users/natalie/Code/@packages/osx-tts-mcp/dist/index.js"],
"env": { "OSX_TTS_VOICE": "Zoe (Premium)" }
}
```
## Build
```sh
pnpm install && pnpm build
```