mcp-voice-hooks 1.0.28 → 1.0.29
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 +4 -2
- package/bin/cli.js +1 -1
- package/package.json +1 -1
- package/public/app.js +23 -3
package/README.md
CHANGED
@@ -52,7 +52,7 @@ Say something to Claude. You will need to send one message in the Claude Code CL
|
|
52
52
|
## Browser Compatibility
|
53
53
|
|
54
54
|
- ✅ **Chrome**: Full support for speech recognition, browser text-to-speech, and system text-to-speech
|
55
|
-
- ⚠️ **Safari**: Full support for speech recognition, but
|
55
|
+
- ⚠️ **Safari**: Full support for speech recognition and system text-to-speech, but browser text-to-speech cannot load high-quality voices
|
56
56
|
- ❌ **Edge**: Speech recognition not working on Apple Silicon (language-not-supported error)
|
57
57
|
|
58
58
|
## Voice responses
|
@@ -70,7 +70,7 @@ You can download high quality voices from the system voice menu: `System Setting
|
|
70
70
|
|
71
71
|
Click the info icon next to the system voice dropdown. Search for "Siri" to find the highest quality voices. You'll have to trigger a download of the voice.
|
72
72
|
|
73
|
-
Once it's downloaded, you can select it in the
|
73
|
+
Once it's downloaded, you can select it in the Browser Voice (Local) menu in Chrome.
|
74
74
|
|
75
75
|
Test it with the bash command:
|
76
76
|
|
@@ -82,6 +82,8 @@ To use Siri voices with voice-hooks, you need to set your system voice and selec
|
|
82
82
|
|
83
83
|
Other downloaded voices will show up in the voice dropdown in the voice-hooks browser interface so you can select them there directly, instead of using the "Mac System Voice" option.
|
84
84
|
|
85
|
+
There is a bug in Safari that prevents browser text-to-speech from loading high-quality voices after browser restart. This is a Safari Web Speech API limitation. To use high-quality voices in Safari you need to set your system voice to Siri and select "Mac System Voice" in the voice-hooks browser interface.
|
86
|
+
|
85
87
|
## Manual Hook Installation
|
86
88
|
|
87
89
|
The hooks are automatically installed/updated when the MCP server starts. However, if you need to manually install or reconfigure the hooks:
|
package/bin/cli.js
CHANGED
package/package.json
CHANGED
package/public/app.js
CHANGED
@@ -350,14 +350,33 @@ class VoiceHooksClient {
|
|
350
350
|
|
351
351
|
// Get available voices
|
352
352
|
this.voices = [];
|
353
|
+
|
354
|
+
// Enhanced voice loading with deduplication
|
353
355
|
const loadVoices = () => {
|
354
|
-
|
355
|
-
|
356
|
+
const voices = window.speechSynthesis.getVoices();
|
357
|
+
|
358
|
+
// Deduplicate voices - keep the first occurrence of each unique voice
|
359
|
+
const deduplicatedVoices = [];
|
360
|
+
const seen = new Set();
|
361
|
+
|
362
|
+
voices.forEach(voice => {
|
363
|
+
// Create a unique key based on name, language, and URI
|
364
|
+
const key = `${voice.name}-${voice.lang}-${voice.voiceURI}`;
|
365
|
+
if (!seen.has(key)) {
|
366
|
+
seen.add(key);
|
367
|
+
deduplicatedVoices.push(voice);
|
368
|
+
}
|
369
|
+
});
|
370
|
+
|
371
|
+
this.voices = deduplicatedVoices;
|
356
372
|
this.populateVoiceList();
|
357
373
|
};
|
358
374
|
|
359
|
-
// Load voices initially and
|
375
|
+
// Load voices initially and with a delayed retry for reliability
|
360
376
|
loadVoices();
|
377
|
+
setTimeout(loadVoices, 100);
|
378
|
+
|
379
|
+
// Set up voice change listener
|
361
380
|
if (window.speechSynthesis.onvoiceschanged !== undefined) {
|
362
381
|
window.speechSynthesis.onvoiceschanged = loadVoices;
|
363
382
|
}
|
@@ -438,6 +457,7 @@ class VoiceHooksClient {
|
|
438
457
|
|
439
458
|
populateVoiceList() {
|
440
459
|
if (!this.voiceSelect || !this.localVoicesGroup || !this.cloudVoicesGroup) return;
|
460
|
+
|
441
461
|
|
442
462
|
// First populate the language filter
|
443
463
|
this.populateLanguageFilter();
|