mcp-voice-hooks 1.0.18 → 1.0.20
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/package.json +1 -1
- package/public/app.js +36 -3
package/package.json
CHANGED
package/public/app.js
CHANGED
@@ -153,7 +153,7 @@ class VoiceHooksClient {
|
|
153
153
|
});
|
154
154
|
|
155
155
|
this.testTTSBtn.addEventListener('click', () => {
|
156
|
-
this.speakText('
|
156
|
+
this.speakText('This is Voice Mode for Claude Code. How can I help you today?');
|
157
157
|
});
|
158
158
|
|
159
159
|
// Voice toggle listeners
|
@@ -454,7 +454,40 @@ class VoiceHooksClient {
|
|
454
454
|
this.voiceSelect.value = savedVoice;
|
455
455
|
this.selectedVoice = savedVoice;
|
456
456
|
} else {
|
457
|
-
|
457
|
+
// Look for Google US English Male voice first
|
458
|
+
let googleUSMaleIndex = -1;
|
459
|
+
let microsoftAndrewIndex = -1;
|
460
|
+
|
461
|
+
this.voices.forEach((voice, index) => {
|
462
|
+
const voiceName = voice.name.toLowerCase();
|
463
|
+
|
464
|
+
// Check for Google US English Male
|
465
|
+
if (voiceName.includes('google') &&
|
466
|
+
voiceName.includes('us') &&
|
467
|
+
voiceName.includes('english')) {
|
468
|
+
googleUSMaleIndex = index;
|
469
|
+
}
|
470
|
+
|
471
|
+
// Check for Microsoft Andrew Online
|
472
|
+
if (voiceName.includes('microsoft') &&
|
473
|
+
voiceName.includes('andrew') &&
|
474
|
+
voiceName.includes('online')) {
|
475
|
+
microsoftAndrewIndex = index;
|
476
|
+
}
|
477
|
+
});
|
478
|
+
|
479
|
+
if (googleUSMaleIndex !== -1) {
|
480
|
+
this.selectedVoice = `browser:${googleUSMaleIndex}`;
|
481
|
+
this.voiceSelect.value = this.selectedVoice;
|
482
|
+
this.debugLog('Defaulting to Google US English Male voice');
|
483
|
+
} else if (microsoftAndrewIndex !== -1) {
|
484
|
+
this.selectedVoice = `browser:${microsoftAndrewIndex}`;
|
485
|
+
this.voiceSelect.value = this.selectedVoice;
|
486
|
+
this.debugLog('Google US English Male not found, defaulting to Microsoft Andrew Online');
|
487
|
+
} else {
|
488
|
+
this.selectedVoice = 'system';
|
489
|
+
this.debugLog('Preferred voices not found, using system default');
|
490
|
+
}
|
458
491
|
}
|
459
492
|
|
460
493
|
// Update warnings based on selected voice
|
@@ -663,7 +696,7 @@ class VoiceHooksClient {
|
|
663
696
|
|
664
697
|
handleWaitStatus(isWaiting) {
|
665
698
|
const listeningIndicatorText = this.listeningIndicator.querySelector('span');
|
666
|
-
|
699
|
+
|
667
700
|
if (isWaiting) {
|
668
701
|
// Claude is waiting for voice input
|
669
702
|
listeningIndicatorText.textContent = 'Claude is paused and waiting for voice input';
|