opencode-sayText-to-speech plugin for OpenCode - hear AI responses spoken aloud
0
7
近 7 天 2
16.7
生态多维模型
5 个月前
2026-03-08
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-say@1.0.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-say@1.0.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-sayopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
Text-to-speech plugin for OpenCode - hear AI responses spoken aloud.
Uses macOS say command for text-to-speech. Perfect for hands-free coding with dictation software.
Installation
Add to your opencode.json:
{
"plugin": ["opencode-say"]
}
Or install globally in ~/.config/opencode/opencode.json.
Usage
Toggle Speech Mode
Create a /say command by adding .opencode/command/say.md:
---
description: Toggle speech mode on/off
---
Use the `say_toggle` tool to toggle speech mode.
Then type /say in OpenCode to toggle speech on/off.
Available Tools
The plugin exposes three tools that the AI can use:
| Tool | Description |
|---|---|
say_toggle |
Toggle speech mode on/off |
say_config |
Configure voice, rate, and max length |
say_status |
Check current settings |
Configuration
Settings are stored in .opencode/say-settings.json:
{
"enabled": true,
"voice": "Samantha",
"rate": 180,
"maxLength": 500
}
| Setting | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Whether speech is enabled |
voice |
string | system default | macOS voice name |
rate |
number | system default | Words per minute |
maxLength |
number | 500 |
Max characters before truncating |
Available Voices
List available voices:
say -v '?'
Common high-quality voices:
Samantha- American femaleDaniel- British maleKaren- Australian femaleMoira- Irish female
Requirements
- macOS (uses the
saycommand) - OpenCode v1.2.0+
License
MIT