claude-voice 1.3.3 → 1.3.4
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/config/default.json +8 -2
- package/package.json +1 -1
- package/scripts/postinstall.js +60 -27
package/config/default.json
CHANGED
|
@@ -54,12 +54,18 @@
|
|
|
54
54
|
"jarvis": [
|
|
55
55
|
"▁JA R VI S",
|
|
56
56
|
"▁JA R V I S",
|
|
57
|
-
"J AR VI S"
|
|
57
|
+
"J AR VI S",
|
|
58
|
+
"J A R VI S",
|
|
59
|
+
"J A R V I S",
|
|
60
|
+
"▁J A R VI S"
|
|
58
61
|
],
|
|
59
62
|
"claude": [
|
|
60
63
|
"▁C L A U DE",
|
|
61
64
|
"▁C L A U D E",
|
|
62
|
-
"C L A U DE"
|
|
65
|
+
"C L A U DE",
|
|
66
|
+
"C L A U D E",
|
|
67
|
+
"▁C LA U DE",
|
|
68
|
+
"C LA U D E"
|
|
63
69
|
]
|
|
64
70
|
},
|
|
65
71
|
"picovoice": {
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -29,7 +29,7 @@ console.log('║ Claude Voice Extension - Auto Setup ║'
|
|
|
29
29
|
console.log('╚════════════════════════════════════════════════════════════╝\n');
|
|
30
30
|
|
|
31
31
|
// 1. Create config directory
|
|
32
|
-
console.log('Step 1/
|
|
32
|
+
console.log('Step 1/7: Setting up configuration...');
|
|
33
33
|
if (!fs.existsSync(CONFIG_DIR)) {
|
|
34
34
|
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
35
35
|
console.log(' [✓] Created config directory');
|
|
@@ -69,7 +69,7 @@ try {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// 4. Install Claude Code hooks
|
|
72
|
-
console.log('\nStep 2/
|
|
72
|
+
console.log('\nStep 2/7: Installing Claude Code hooks...');
|
|
73
73
|
try {
|
|
74
74
|
const settingsFile = installHooks(HOOKS_DIR);
|
|
75
75
|
console.log(' [✓] Hooks installed');
|
|
@@ -79,7 +79,7 @@ try {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
// 5. Install Claude Code plugin (skill)
|
|
82
|
-
console.log('\nStep 3/
|
|
82
|
+
console.log('\nStep 3/7: Installing Claude Code plugin...');
|
|
83
83
|
try {
|
|
84
84
|
const pluginPath = installPlugin(path.join(__dirname, '..'));
|
|
85
85
|
console.log(' [✓] Plugin installed');
|
|
@@ -90,7 +90,7 @@ try {
|
|
|
90
90
|
|
|
91
91
|
// 6. Install Piper TTS and download default voice
|
|
92
92
|
const binPath = path.join(__dirname, '..', 'bin', 'claude-voice');
|
|
93
|
-
console.log('\nStep 4/
|
|
93
|
+
console.log('\nStep 4/7: Installing Piper TTS engine...');
|
|
94
94
|
console.log(' (First-time install may take 1-2 minutes)\n');
|
|
95
95
|
try {
|
|
96
96
|
execSync(`"${binPath}" voice download en_US-joe-medium`, {
|
|
@@ -103,7 +103,7 @@ try {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// 7. Download whisper-tiny STT model
|
|
106
|
-
console.log('\nStep 5/
|
|
106
|
+
console.log('\nStep 5/7: Downloading Whisper STT model...');
|
|
107
107
|
console.log(' (This may take 2-3 minutes depending on connection)\n');
|
|
108
108
|
try {
|
|
109
109
|
execSync(`"${binPath}" model download whisper-tiny`, {
|
|
@@ -128,8 +128,8 @@ try {
|
|
|
128
128
|
console.log(' Run manually: claude-voice model download kws-zipformer-gigaspeech');
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
// 9. Install
|
|
132
|
-
console.log('\nStep 7/7:
|
|
131
|
+
// 9. Install platform-specific audio tools
|
|
132
|
+
console.log('\nStep 7/7: Checking audio tools...');
|
|
133
133
|
const platform = os.platform();
|
|
134
134
|
|
|
135
135
|
function checkCommand(cmd) {
|
|
@@ -141,13 +141,11 @@ function checkCommand(cmd) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
if (platform === 'darwin') {
|
|
150
|
-
// macOS - try Homebrew
|
|
144
|
+
if (platform === 'darwin') {
|
|
145
|
+
// macOS - need sox for audio capture
|
|
146
|
+
if (checkCommand('rec')) {
|
|
147
|
+
console.log(' [✓] sox installed');
|
|
148
|
+
} else {
|
|
151
149
|
if (checkCommand('brew')) {
|
|
152
150
|
try {
|
|
153
151
|
console.log(' Installing sox via Homebrew...');
|
|
@@ -158,28 +156,63 @@ if (checkCommand('rec')) {
|
|
|
158
156
|
console.log(' Run manually: brew install sox');
|
|
159
157
|
}
|
|
160
158
|
} else {
|
|
161
|
-
console.log(' [!]
|
|
162
|
-
console.log(' Install sox manually: brew install sox');
|
|
163
|
-
console.log(' Or install Homebrew first: https://brew.sh');
|
|
159
|
+
console.log(' [!] sox not found. Install with: brew install sox');
|
|
164
160
|
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
161
|
+
}
|
|
162
|
+
console.log(' [✓] Audio playback: afplay (native)');
|
|
163
|
+
} else if (platform === 'linux') {
|
|
164
|
+
// Linux - check all required tools
|
|
165
|
+
console.log(' Checking Linux dependencies...\n');
|
|
166
|
+
|
|
167
|
+
// Check sox for audio capture
|
|
168
|
+
if (checkCommand('rec')) {
|
|
169
|
+
console.log(' [✓] sox installed');
|
|
170
|
+
} else {
|
|
171
|
+
console.log(' [!] sox not found');
|
|
172
|
+
console.log(' Install: sudo apt install sox');
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Check alsa-utils for arecord (alternative audio capture)
|
|
176
|
+
if (checkCommand('arecord')) {
|
|
177
|
+
console.log(' [✓] alsa-utils installed (arecord)');
|
|
178
|
+
} else {
|
|
179
|
+
console.log(' [!] alsa-utils not found');
|
|
180
|
+
console.log(' Install: sudo apt install alsa-utils');
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Check audio playback
|
|
184
|
+
if (checkCommand('aplay') || checkCommand('paplay') || checkCommand('ffplay')) {
|
|
185
|
+
console.log(' [✓] Audio playback available');
|
|
186
|
+
} else {
|
|
187
|
+
console.log(' [!] No audio player found');
|
|
188
|
+
console.log(' Install one: sudo apt install alsa-utils OR sudo apt install ffmpeg');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Check xdotool for terminal injection
|
|
192
|
+
if (checkCommand('xdotool')) {
|
|
193
|
+
console.log(' [✓] xdotool installed (terminal injection)');
|
|
194
|
+
} else {
|
|
195
|
+
console.log(' [!] xdotool not found (required for voice commands)');
|
|
196
|
+
console.log(' Install: sudo apt install xdotool');
|
|
171
197
|
}
|
|
172
198
|
}
|
|
173
199
|
|
|
174
200
|
// 10. Show platform info and completion
|
|
175
201
|
console.log('\nFinalizing setup...');
|
|
176
|
-
console.log(`
|
|
202
|
+
console.log(` Platform: ${platform}`);
|
|
177
203
|
|
|
178
204
|
if (platform === 'darwin') {
|
|
179
|
-
console.log(' [✓]
|
|
205
|
+
console.log(' [✓] macOS: All features supported');
|
|
180
206
|
} else if (platform === 'linux') {
|
|
181
|
-
|
|
182
|
-
|
|
207
|
+
const missingDeps = [];
|
|
208
|
+
if (!checkCommand('rec') && !checkCommand('arecord')) missingDeps.push('sox or alsa-utils');
|
|
209
|
+
if (!checkCommand('xdotool')) missingDeps.push('xdotool');
|
|
210
|
+
|
|
211
|
+
if (missingDeps.length === 0) {
|
|
212
|
+
console.log(' [✓] Linux: All features supported');
|
|
213
|
+
} else {
|
|
214
|
+
console.log(' [!] Linux: Missing dependencies: ' + missingDeps.join(', '));
|
|
215
|
+
}
|
|
183
216
|
}
|
|
184
217
|
|
|
185
218
|
// 11. Show next steps
|