opencode-sttOpenCode plugin for speech-to-text via Handy API
2
9
近 7 天 3
20.4
生态多维模型
5 个月前
2026-02-22
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-stt@0.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-stt@0.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-sttopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
OpenCode STT Plugin
Adds a /dictate command to OpenCode that records your voice and transcribes it using Handy. Run the command once to start recording, run it again to stop and get the transcription appended to your prompt.
Requirements
You need a build of Handy with the HTTP API enabled. The standard release doesn't have this yet, so grab it from this fork:
https://github.com/belohnung/Handy/tree/feat/http-api
Handy needs to be running locally on port 9876 before you use this plugin.
Usage
/dictate
First run starts recording. Second run stops, waits for transcription, and adds the result to your prompt.
Configuration
The plugin assumes Handy is running at http://localhost:9876. If you need a different setup, edit the HANDY_PORT constant in the source and rebuild.
Installation
Add to your OpenCode config file (e.g., ~/.config/opencode/config.json):
{
"plugins": ["opencode-stt@latest"]
}
Or install manually to your plugins directory.