@luckydraw/cumulus 0.30.25 → 0.30.26
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/CHANGELOG.md +5 -1
- package/dist/gateway/static/widget.js +25 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.30.25
|
|
4
|
+
- Restored tap-to-interject on the voice mode mic indicator
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
## v0.30.23
|
|
4
|
-
- Voice replies now finish playing fully before the session ends
|
|
5
8
|
|
|
9
|
+
- Voice replies now finish playing fully before the session ends
|
|
6
10
|
|
|
7
11
|
## v0.30.22
|
|
8
12
|
|
|
@@ -1282,7 +1282,11 @@
|
|
|
1282
1282
|
' display: flex; align-items: center; justify-content: center;',
|
|
1283
1283
|
' transition: all 0.3s ease;',
|
|
1284
1284
|
' margin-bottom: 24px;',
|
|
1285
|
+
' cursor: pointer;',
|
|
1286
|
+
' user-select: none;',
|
|
1287
|
+
' -webkit-tap-highlight-color: transparent;',
|
|
1285
1288
|
'}',
|
|
1289
|
+
'.cumulus-voice-indicator:active { transform: scale(0.95); }',
|
|
1286
1290
|
'.cumulus-voice-overlay.listening .cumulus-voice-indicator {',
|
|
1287
1291
|
' background: rgba(0, 102, 204, 0.2);',
|
|
1288
1292
|
' border: 2px solid #0066cc;',
|
|
@@ -4399,6 +4403,24 @@
|
|
|
4399
4403
|
indicator.appendChild(indicatorIcon);
|
|
4400
4404
|
overlay.appendChild(indicator);
|
|
4401
4405
|
|
|
4406
|
+
// Tap-to-interject: clicking the indicator stops TTS and starts listening
|
|
4407
|
+
// immediately, regardless of phase. Cancels any pending mic-restart timer
|
|
4408
|
+
// so the manual action wins over the scheduled auto-restart.
|
|
4409
|
+
indicator.addEventListener('click', function () {
|
|
4410
|
+
if (!state.active) return;
|
|
4411
|
+
if (state.micRestartTimer) {
|
|
4412
|
+
clearTimeout(state.micRestartTimer);
|
|
4413
|
+
state.micRestartTimer = null;
|
|
4414
|
+
}
|
|
4415
|
+
if (state.phase === 'speaking') {
|
|
4416
|
+
stopSpeaking();
|
|
4417
|
+
}
|
|
4418
|
+
if (state.phase !== 'listening') {
|
|
4419
|
+
setPhase('listening');
|
|
4420
|
+
startRecognition();
|
|
4421
|
+
}
|
|
4422
|
+
});
|
|
4423
|
+
|
|
4402
4424
|
var transcriptEl = document.createElement('div');
|
|
4403
4425
|
transcriptEl.className = 'cumulus-voice-transcript';
|
|
4404
4426
|
overlay.appendChild(transcriptEl);
|
|
@@ -4732,7 +4754,9 @@
|
|
|
4732
4754
|
if (state.phase !== 'speaking') {
|
|
4733
4755
|
console.log('[Voice] PCM arrived in phase=' + state.phase + ', recovering to speaking');
|
|
4734
4756
|
if (state.recognition) {
|
|
4735
|
-
try {
|
|
4757
|
+
try {
|
|
4758
|
+
state.recognition.abort();
|
|
4759
|
+
} catch (e) {}
|
|
4736
4760
|
}
|
|
4737
4761
|
clearWatchdog();
|
|
4738
4762
|
// Cancel any pending mic-restart timer so it can't override us
|