@hivegpt/hiveai-angular 0.0.459 → 0.0.460

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.
@@ -1460,8 +1460,8 @@
1460
1460
  source.connect(analyser_1);
1461
1461
  this.remoteAudioContext = ctx;
1462
1462
  var dataArray_1 = new Uint8Array(analyser_1.frequencyBinCount);
1463
- var THRESHOLD_1 = 8;
1464
- var SILENCE_MS_1 = 300;
1463
+ var THRESHOLD_1 = 5;
1464
+ var SILENCE_MS_1 = 1500;
1465
1465
  var lastSoundTime_1 = 0;
1466
1466
  var isSpeaking_1 = false;
1467
1467
  var poll_1 = function () {
@@ -1479,7 +1479,10 @@
1479
1479
  if (!isSpeaking_1) {
1480
1480
  isSpeaking_1 = true;
1481
1481
  console.log("[VoiceDebug] Bot audio energy detected (speaking=true) \u2014 avg=" + avg.toFixed(1) + " \u2014 " + new Date().toISOString());
1482
- _this.ngZone.run(function () { return _this.speakingSubject.next(true); });
1482
+ _this.ngZone.run(function () {
1483
+ _this.userSpeakingSubject.next(false);
1484
+ _this.speakingSubject.next(true);
1485
+ });
1483
1486
  }
1484
1487
  }
1485
1488
  else if (isSpeaking_1 && now - lastSoundTime_1 > SILENCE_MS_1) {