speak
speak
让 Claude 把它的回答读出来。
不是对原始回复的文本转语音转储。你说“简单读给我听”,Claude 会把它说的话改写成一个简短的语音脚本,然后播放。脚本永远不会出现在聊天中。这是你和模型之间的对话,文本不会妨碍你。
今天在 Claude Code 中可用。播放部分是一个普通的 MCP 服务器,所以它也可以放入 Claude Desktop、Cursor 或任何 MCP 客户端。
你会得到什么
speakMCP 服务器,带有工具speak、stop、pause、resume、back、skip、add_pronunciation、list_pronunciations、list_voices、set_defaultmacOS 上 Claude 说话时的浮动覆盖层:每个窗口上方的一个小胶囊,带有实时波形,后退一个句子,跳过一个句子,从精确位置暂停和恢复,停止
用于 Claude Code 的
/speak技能,带有样式:simple(默认)、brief、decisions、full、eli5自动说话:一个
Stop钩子,在每次回答后读取一个brief脚本,默认关闭speakCLI:echo "hello" | speakRaycast 脚本命令:
Speak按原样读取选中的文本,Speak Simply先用claude -p将其改写为简短的语音摘要,Speak Translated先翻译(默认英语;输入另一种语言作为命令参数,或设置SPEAK_TRANSLATE_LANGUAGE来更改默认值)。非英语翻译会使用匹配的已安装 macOS 语音朗读,优先选择最佳可用语音(Premium,然后是 Enhanced,然后是 compact);英语保持你的正常语音不变。在系统设置 > 辅助功能 > 朗读与朗读 > 系统语音 > 管理语音中下载某种语言的 Premium 语音,以获得好的效果。Speak Stop停止。它们通过模拟 Cmd+C 复制选择内容,所以 Raycast 需要辅助功能权限。
Related MCP server: MCP Audio Server
引擎
引擎 | 成本 | 需要 | 备注 |
| 免费 | macOS | 默认。在系统设置 > 辅助功能 > 朗读内容中下载 Premium 或 Enhanced 语音以获得良好质量。将 Siri 语音设置为系统默认,裸 |
| 免费 | 网络 | 通过 |
| 免费 |
| 本地神经 TTS,在 CPU 上运行。 |
| 付费 |
|
|
| 免费层 |
|
|
在 macOS 上选择语音
默认的 say 引擎使用你 Mac 的系统语音,所以只需在 macOS 中设置一次,每次朗读都会使用它:
打开系统设置 > 辅助功能 > 朗读与朗读(旧版本为“朗读内容”)。
在“系统语音”下,选择一个语音。Apple 为每种语言提供了大量语音库;Premium 和 Enhanced 语音按需下载,听起来比 compact 默认语音好得多。Siri 语音也可以在这里选择。
根据需要设置语速。
发音
在聊天中告诉 Claude:
“从现在起把 fancyapp 读作 fan-see-app”
“你保存了哪些发音”
它们存放在 ~/.config/speak/pronunciations.json 中(用 SPEAK_CONFIG_DIR 覆盖文件夹),匹配整个单词且不区分大小写,并应用于每次朗读:
{
"fancyapp": "fan-see-app",
"OAuth": "oh auth"
}链接和电子邮件按口语方式朗读:https://example.com/login 变成“example dot com slash login”,jane@example.de 变成“jane at example dot d e”。像 de、io、co.uk 这样的短结尾会逐字母拼读,因为“de”作为一个单词读出来是“duh”。
有两个读音的单词(“live”、“read”、“lead”)无法通过单词列表修复。技能会告诉 Claude 在脚本中重新拼写它们,这样语音就不会猜错:“lyive”表示“live”如“alive”,“red”表示过去时态的“read”,“led”表示金属。技能带有一个常见易混淆单词表,并在说话前检查脚本。
保持 SPEAK_VOICE 未设置以跟随系统语音,或将其设置为 say -v ? 中的语音名称,以仅覆盖 Claude 的语音。
第一个可用的引擎获胜,除非你设置 SPEAK_ENGINE。SPEAK_VOICE 设置语音。两者都可以通过 set_default 工具在每个会话中更改(“切换到 edge 引擎”)。
安装
将 RAYCAST_SCRIPTS_DIR 设置为已在 Raycast 中添加的目录(设置 > 扩展 > 脚本命令),命令会链接到其中。如果没有,请手动将本仓库中的 raycast/ 添加到那里一次。
RAYCAST_SCRIPTS_DIR=~/raycast-scripts ./install.sh需要 Node 20+、jq 和 Claude Code。
git clone https://github.com/CareyScott/speak
cd speak
./install.sh这会构建服务器和 macOS 覆盖层辅助程序(需要 Xcode 命令行工具中的 swiftc),在用户范围内注册 MCP 服务器,将技能链接到 ~/.claude/skills,将 Stop 钩子添加到 ~/.claude/settings.json,并将 speak 和 speak-auto 链接到 ~/.local/bin。
重启 Claude Code。
使用
与 Claude 对话:
“读给我听”
“简单说”
“你需要我做什么,大声说出来”
“/speak decisions”
“停止”
每次回答后自动说话:
speak-auto on # brief style
speak-auto on decisions # only the questions for you
speak-auto off当它说话时,使用覆盖层或直接说:
“暂停”、“继续”、“后退一个句子”、“跳过那个”、“停止”
暂停保持精确位置。继续从该位置继续。后退重播上一个句子。跳过跳到下一个。关于暂停或继续不会说任何话;它只是执行。
选择引擎或语音:
export SPEAK_ENGINE=edge
export SPEAK_VOICE=en-IE-ConnorNeural或在聊天中:“列出 say 语音”、“从现在起使用 Jamie”。
工作原理
技能告诉 Claude 如何为耳朵写作:短句,先讲重点,描述代码而不是读代码,以它需要你做的决定结束。Claude 用该脚本调用 speak 工具。
服务器去除任何剩余的 markdown,将脚本拆分为句子,并在当前句子播放时合成下一个句子。
在 macOS 上,一个小的 Swift 辅助程序(overlay/main.swift)使用 AVAudioPlayer 拥有播放,并绘制覆盖层:一个始终置顶、不激活的面板,永远不会抢走焦点。Node 通过 stdin 以 JSON 行形式一次发送一个句子文件,它在 stdout 上报告 finished、back 或 stop。暂停和恢复发生在辅助程序内部,所以位置是精确的。后退和跳过告诉服务器接下来播放哪个句子。在其他地方,服务器回退到 afplay 或 ffplay,没有覆盖层。
自动说话是一个 Claude Code Stop 钩子。当标志文件 ~/.config/speak/auto 存在时,钩子阻止停止一次,并要求 Claude 以文件中命名的样式说话。stop_hook_active 守卫阻止它循环。
开发
npm run dev # run the server with tsx
npm test # vitest
npm run typecheckMIT。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables Claude and other AI assistants to interact with your computer's audio system, allowing for recording from microphones and playing audio through speakers.9MIT
- AlicenseNot gradedqualityDmaintenanceEnables text-to-speech conversion with smart language detection (using Google TTS for Chinese) and audio file playback with playback controls for Claude Desktop.3MIT
- AlicenseNot gradedqualityBmaintenanceEnables text-to-speech conversion using OpenAI's TTS API, with inline audio playback and history within MCP hosts like Claude.4BSD 2-Clause "Simplified"
- FlicenseAqualityCmaintenanceEnables Claude to speak responses out loud using ElevenLabs text-to-speech API, with tools to list voices and convert text to speech.2
Related MCP Connectors
Generate AI images, video, speech, music and presentations from Claude, ChatGPT and Cursor.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CareyScott/speak'
If you have feedback or need assistance with the MCP directory API, please join our Discord server