Speech 扩展
🎥Plug & Play
Watch the demo
本教程介绍如何把 Speech MCP 服务器 添加为 goose 扩展,以实现实时语音交互、音视频转录、文字转语音,以及多说话人音频生成。
要求
PyAudio 从麦克风采集音频需要 PortAudio
快速安装
- goose Desktop
- goose CLI
命令
uvx -p 3.10.14 speech-mcp@latest
配置
- goose Desktop
- goose CLI
- Launch the installer
- Click
Yesto confirm the installation - Click the button in the top-left to open the sidebar
- Navigate to the chat
- 运行
configure命令:
goose configure
- 选择添加
Command-line Extension
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension (Streamable HTTP)
└
- 为扩展命名
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◆ What would you like to call this extension?
│ speech
└
- 输入命令
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ speech
│
◆ What command should be run?
│ uvx -p 3.10.14 speech-mcp@latest
└
- 输入 goose 在操作完成前等待的秒数。默认是 300 秒
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ speech
│
◇ What command should be run?
│ uvx -p 3.10.14 speech-mcp@latest
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- 选择是否添加描述。如果这里选 “Yes”,系统会提示你输入扩展描述。
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ speech
│
◇ What command should be run?
│ uvx -p 3.10.14 speech-mcp@latest
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Would you like to add a description?
│ No
└
- 当询问是否添加环境变量时,选择 No
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ speech
│
◇ What command should be run?
│ uvx -p 3.10.14 speech-mcp@latest
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Would you like to add a description?
│ No
│
◆ Would you like to add environment variables?
│ No
│
└ Added speech extension
使用示例
这个示例演示如何用 goose 和 Speech MCP 服务器扩展,把语音指令变成代码。你可以直接对 goose 说话,启动语音界面,给出口头提示,让 goose 根据请求生成并打开一个网页。
这样就可以解放双手来用 goose 构建,让开发更易用、更有互动性。
- goose Desktop
- goose CLI
- 在 goose 桌面版中打开一个新会话
- 打开终端,启动一个新的 goose 会话:
goose session
goose 提示词
可以用这些话启动语音界面:
- 「goose,我今天不想打字。」
- 「我们用语音聊吧。」
- 「我们可以语音对话吗?」
- 「我想说话,不想打字。」
- 「goose,启动语音界面。」
goose 我今天不想说话
goose 输出
明白。那我可以改用语音指令帮你。我会启动语音界面,这样你可以说出请求,而不必打字。
---- Launch Speech UI ----
goose 语音 🎙️
goose:
我已经启动语音界面。你现在可以说出请求,而不必打字。听到我的声音、看到麦克风激活后再说。你需要什么帮助?
Max:
goose,我们做一个简单页面,上面写着 vibes,再让它变色、在页面上移动,做完后在浏览器里打开这个页面