opencode-smart-voice-notify 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ The plugin automatically tries multiple TTS engines in order, falling back if on
|
|
|
36
36
|
|
|
37
37
|
### Option 1: From npm (Recommended)
|
|
38
38
|
|
|
39
|
-
Add to your OpenCode config file (`~/.config/opencode/
|
|
39
|
+
Add to your OpenCode config file (`~/.config/opencode/opencode.json`):
|
|
40
40
|
|
|
41
41
|
```json
|
|
42
42
|
{
|
|
@@ -74,10 +74,10 @@ Add to your OpenCode config file (`~/.config/opencode/config.json`):
|
|
|
74
74
|
|
|
75
75
|
When you first run OpenCode with this plugin installed, it will **automatically create**:
|
|
76
76
|
|
|
77
|
-
1. **`~/.config/opencode/smart-voice-notify.jsonc`** - A
|
|
78
|
-
2. **`~/.config/opencode/assets/*.mp3`** - Bundled notification sound files
|
|
77
|
+
1. **`~/.config/opencode/smart-voice-notify.jsonc`** - A comprehensive configuration file with all available options fully documented.
|
|
78
|
+
2. **`~/.config/opencode/assets/*.mp3`** - Bundled notification sound files.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
The auto-generated configuration includes all advanced settings, message arrays, and engine options, so you don't have to refer back to the documentation for available settings.
|
|
81
81
|
|
|
82
82
|
### Manual Configuration
|
|
83
83
|
|
|
@@ -86,49 +86,123 @@ If you prefer to create the config manually, add a `smart-voice-notify.jsonc` fi
|
|
|
86
86
|
```jsonc
|
|
87
87
|
{
|
|
88
88
|
// ============================================================
|
|
89
|
-
// NOTIFICATION MODE SETTINGS
|
|
89
|
+
// NOTIFICATION MODE SETTINGS (Smart Notification System)
|
|
90
90
|
// ============================================================
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
91
|
+
// Controls how notifications are delivered:
|
|
92
|
+
// 'sound-first' - Play sound immediately, TTS reminder after delay (RECOMMENDED)
|
|
93
|
+
// 'tts-first' - Speak TTS immediately, no sound
|
|
94
|
+
// 'both' - Play sound AND speak TTS immediately
|
|
95
|
+
// 'sound-only' - Only play sound, no TTS at all
|
|
95
96
|
"notificationMode": "sound-first",
|
|
96
97
|
|
|
98
|
+
// ============================================================
|
|
99
|
+
// TTS REMINDER SETTINGS (When user doesn't respond to sound)
|
|
100
|
+
// ============================================================
|
|
101
|
+
|
|
102
|
+
// Enable TTS reminder if user doesn't respond after sound notification
|
|
103
|
+
"enableTTSReminder": true,
|
|
104
|
+
|
|
105
|
+
// Delay (in seconds) before TTS reminder fires
|
|
106
|
+
"ttsReminderDelaySeconds": 30, // Global default
|
|
107
|
+
"idleReminderDelaySeconds": 30, // For task completion notifications
|
|
108
|
+
"permissionReminderDelaySeconds": 20, // For permission requests (more urgent)
|
|
109
|
+
|
|
110
|
+
// Follow-up reminders if user STILL doesn't respond after first TTS
|
|
111
|
+
"enableFollowUpReminders": true,
|
|
112
|
+
"maxFollowUpReminders": 3, // Max number of follow-up TTS reminders
|
|
113
|
+
"reminderBackoffMultiplier": 1.5, // Each follow-up waits longer (30s, 45s, 67s...)
|
|
114
|
+
|
|
97
115
|
// ============================================================
|
|
98
116
|
// TTS ENGINE SELECTION
|
|
99
117
|
// ============================================================
|
|
100
|
-
// 'elevenlabs' - Best quality (requires API key)
|
|
101
|
-
// 'edge' -
|
|
102
|
-
// 'sapi' - Windows built-in (free, offline)
|
|
103
|
-
"ttsEngine": "
|
|
118
|
+
// 'elevenlabs' - Best quality, anime-like voices (requires API key)
|
|
119
|
+
// 'edge' - Good quality neural voices (free, requires: pip install edge-tts)
|
|
120
|
+
// 'sapi' - Windows built-in voices (free, offline)
|
|
121
|
+
"ttsEngine": "edge",
|
|
104
122
|
"enableTTS": true,
|
|
105
123
|
|
|
106
124
|
// ============================================================
|
|
107
|
-
// ELEVENLABS SETTINGS
|
|
125
|
+
// ELEVENLABS SETTINGS (Best Quality - Anime-like Voices)
|
|
108
126
|
// ============================================================
|
|
109
127
|
// Get your API key from: https://elevenlabs.io/app/settings/api-keys
|
|
110
|
-
"elevenLabsApiKey": "
|
|
111
|
-
"elevenLabsVoiceId": "cgSgspJ2msm6clMCkdW9",
|
|
128
|
+
// "elevenLabsApiKey": "YOUR_API_KEY_HERE",
|
|
129
|
+
"elevenLabsVoiceId": "cgSgspJ2msm6clMCkdW9",
|
|
112
130
|
"elevenLabsModel": "eleven_turbo_v2_5",
|
|
131
|
+
"elevenLabsStability": 0.5,
|
|
132
|
+
"elevenLabsSimilarity": 0.75,
|
|
133
|
+
"elevenLabsStyle": 0.5,
|
|
113
134
|
|
|
114
135
|
// ============================================================
|
|
115
|
-
// TTS
|
|
136
|
+
// EDGE TTS SETTINGS (Free Neural Voices - Default Engine)
|
|
116
137
|
// ============================================================
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
138
|
+
"edgeVoice": "en-US-AnaNeural",
|
|
139
|
+
"edgePitch": "+50Hz",
|
|
140
|
+
"edgeRate": "+10%",
|
|
141
|
+
|
|
142
|
+
// ============================================================
|
|
143
|
+
// SAPI SETTINGS (Windows Built-in - Last Resort Fallback)
|
|
144
|
+
// ============================================================
|
|
145
|
+
"sapiVoice": "Microsoft Zira Desktop",
|
|
146
|
+
"sapiRate": -1,
|
|
147
|
+
"sapiPitch": "medium",
|
|
148
|
+
"sapiVolume": "loud",
|
|
149
|
+
|
|
150
|
+
// ============================================================
|
|
151
|
+
// INITIAL TTS MESSAGES (Used immediately or after sound)
|
|
152
|
+
// ============================================================
|
|
153
|
+
"idleTTSMessages": [
|
|
154
|
+
"All done! Your task has been completed successfully.",
|
|
155
|
+
"Hey there! I finished working on your request.",
|
|
156
|
+
"Task complete! Ready for your review whenever you are.",
|
|
157
|
+
"Good news! Everything is done and ready for you.",
|
|
158
|
+
"Finished! Let me know if you need anything else."
|
|
159
|
+
],
|
|
160
|
+
"permissionTTSMessages": [
|
|
161
|
+
"Attention please! I need your permission to continue.",
|
|
162
|
+
"Hey! Quick approval needed to proceed with the task.",
|
|
163
|
+
"Heads up! There is a permission request waiting for you.",
|
|
164
|
+
"Excuse me! I need your authorization before I can continue.",
|
|
165
|
+
"Permission required! Please review and approve when ready."
|
|
166
|
+
],
|
|
167
|
+
|
|
168
|
+
// ============================================================
|
|
169
|
+
// TTS REMINDER MESSAGES (Used after delay if no response)
|
|
170
|
+
// ============================================================
|
|
171
|
+
"idleReminderTTSMessages": [
|
|
172
|
+
"Hey, are you still there? Your task has been waiting for review.",
|
|
173
|
+
"Just a gentle reminder - I finished your request a while ago!",
|
|
174
|
+
"Hello? I completed your task. Please take a look when you can.",
|
|
175
|
+
"Still waiting for you! The work is done and ready for review.",
|
|
176
|
+
"Knock knock! Your completed task is patiently waiting for you."
|
|
177
|
+
],
|
|
178
|
+
"permissionReminderTTSMessages": [
|
|
179
|
+
"Hey! I still need your permission to continue. Please respond!",
|
|
180
|
+
"Reminder: There is a pending permission request. I cannot proceed without you.",
|
|
181
|
+
"Hello? I am waiting for your approval. This is getting urgent!",
|
|
182
|
+
"Please check your screen! I really need your permission to move forward.",
|
|
183
|
+
"Still waiting for authorization! The task is on hold until you respond."
|
|
184
|
+
],
|
|
122
185
|
|
|
123
186
|
// ============================================================
|
|
124
187
|
// SOUND FILES (relative to OpenCode config directory)
|
|
125
188
|
// ============================================================
|
|
126
189
|
"idleSound": "assets/Soft-high-tech-notification-sound-effect.mp3",
|
|
127
|
-
"permissionSound": "assets/Machine-alert-beep-sound-effect.mp3"
|
|
190
|
+
"permissionSound": "assets/Machine-alert-beep-sound-effect.mp3",
|
|
191
|
+
|
|
192
|
+
// ============================================================
|
|
193
|
+
// GENERAL SETTINGS
|
|
194
|
+
// ============================================================
|
|
195
|
+
"wakeMonitor": true,
|
|
196
|
+
"forceVolume": true,
|
|
197
|
+
"volumeThreshold": 50,
|
|
198
|
+
"enableToast": true,
|
|
199
|
+
"enableSound": true,
|
|
200
|
+
"idleThresholdSeconds": 60,
|
|
201
|
+
"debugLog": false
|
|
128
202
|
}
|
|
129
203
|
```
|
|
130
204
|
|
|
131
|
-
See `example.config.jsonc` for
|
|
205
|
+
See `example.config.jsonc` for more details.
|
|
132
206
|
|
|
133
207
|
## Requirements
|
|
134
208
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-smart-voice-notify",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Smart voice notification plugin for OpenCode with multiple TTS engines (ElevenLabs, Edge TTS, Windows SAPI) and intelligent reminder system",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|