opencode-event-sound
v0.1.3
Published
Speak sound cues via OS text-to-speech when opencode sessions go idle, error out, or request permission
Downloads
709
Maintainers
Readme
opencode-event-sound
Speak sound cues through your OS text-to-speech engine when opencode sessions go idle, error out, or request permission.
세션 완료·에러·승인 요청 시 OS 음성(TTS)으로 소리로 알려주는 opencode 플러그인입니다. 기본 대사는 한국어이며 자유롭게 바꿀 수 있습니다.
Install
Add the plugin to your opencode config (~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"plugin": [["opencode-event-sound", {}]]
}Note: the options object is required by the config schema even when empty.
Restart opencode. That's it — on macOS it speaks with your Default Voice (System Settings > Accessibility > Spoken Content).
Options
Pass options via the tuple form:
{
"plugin": [
[
"opencode-event-sound",
{
"voice": "Jian (Premium)",
"phrases": {
"session.idle": "작업 끝!",
"session.error": "에러 났어",
"permission.asked": "확인해줘"
}
}
]
]
}| Option | Type | Default | Description |
| --------- | --------------------- | ---------------------------------------------- | --------------------------------------------------------------------------- |
| voice | string | (unset → macOS Default Voice) | Voice name passed to say -v on macOS. Ignored on Linux. |
| phrases | Record<event, text> | Korean defaults below | Override what is spoken per event. Set a phrase to "" to silence an event. |
Events
| Event | Fires when | Default phrase |
| --------------------- | --------------------------------- | -------------- |
| session.idle | The agent finished its response | 다 됐다 |
| session.error | The session hit an error | 뻑났다 |
| permission.asked | Permission approval is requested | 승인 좀 |
opencode renamed the permission event around v1.18:
permission.updated(old) →permission.asked(new). Both names are supported — configure either one and it applies to whichever your running version emits. A completion cue is also suppressed for 5s after an error, since the session goes idle right after failing.
Duplicate cues for the same event within 1.5s are throttled to avoid spam.
Platform support
- macOS:
say— uses the system Default Voice unlessvoiceoption is set. List installed voices:say -v '?' - Linux:
spd-say, falling back toespeak-ng/espeakif installed - Other platforms: silently does nothing
TTS failures never interrupt your opencode session; they are swallowed quietly.
Related
- opencode-notificator, opencode-notify — desktop notification alternatives
