@hivegpt/hiveai-angular 0.0.579 → 0.0.580

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.
@@ -1236,6 +1236,8 @@
1236
1236
  this.NOISE_FLOOR_SAMPLE_COUNT = 30;
1237
1237
  this.SPEAKING_THRESHOLD_MULTIPLIER = 2.5;
1238
1238
  this.WAVEFORM_BAR_COUNT = 40;
1239
+ // Amplify raw amplitude so normal speech (±10–20 units) maps to visible levels
1240
+ this.SENSITIVITY_MULTIPLIER = 5;
1239
1241
  this.audioLevels$ = this.audioLevelsSubject.asObservable();
1240
1242
  this.isUserSpeaking$ = this.isUserSpeakingSubject.asObservable();
1241
1243
  }
@@ -1248,7 +1250,7 @@
1248
1250
  var source = this.audioContext.createMediaStreamSource(stream);
1249
1251
  this.analyserNode = this.audioContext.createAnalyser();
1250
1252
  this.analyserNode.fftSize = 2048;
1251
- this.analyserNode.smoothingTimeConstant = 0.8;
1253
+ this.analyserNode.smoothingTimeConstant = 0.4;
1252
1254
  var bufferLength = this.analyserNode.frequencyBinCount;
1253
1255
  this.dataArray = new Uint8Array(bufferLength);
1254
1256
  source.connect(this.analyserNode);
@@ -1324,8 +1326,8 @@
1324
1326
  for (var i = 0; i < this.WAVEFORM_BAR_COUNT; i++) {
1325
1327
  var index = i * step;
1326
1328
  var value = data[index];
1327
- // Normalize to 0-100
1328
- var normalized = Math.abs((value - 128) / 128) * 100;
1329
+ // Normalize and amplify so quiet speech produces visible movement
1330
+ var normalized = Math.abs((value - 128) / 128) * 100 * this.SENSITIVITY_MULTIPLIER;
1329
1331
  bars.push(Math.min(100, Math.max(0, normalized)));
1330
1332
  }
1331
1333
  return bars;
@@ -2183,10 +2185,10 @@
2183
2185
  VoiceAgentModalComponent.prototype.toggleMic = function () {
2184
2186
  this.voiceAgentService.toggleMic();
2185
2187
  };
2186
- /** Map audio level (0–100) to waveform bar height in px (320). */
2188
+ /** Map audio level (0–100) to waveform bar height in px (440). */
2187
2189
  VoiceAgentModalComponent.prototype.getWaveformHeight = function (level) {
2188
2190
  var n = Math.min(100, Math.max(0, level !== null && level !== void 0 ? level : 0));
2189
- return 3 + (n / 100) * 17;
2191
+ return 4 + (n / 100) * 36;
2190
2192
  };
2191
2193
  Object.defineProperty(VoiceAgentModalComponent.prototype, "statusLabel", {
2192
2194
  /** Status label for active call. */