@layercode/js-sdk 2.3.2 → 2.3.3

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.
@@ -3698,8 +3698,8 @@ registerProcessor('audio_processor', AudioProcessor);
3698
3698
  _initializeVAD() {
3699
3699
  var _a;
3700
3700
  console.log('initializing VAD', { pushToTalkEnabled: this.pushToTalkEnabled, canInterrupt: this.canInterrupt, vadConfig: this.vadConfig });
3701
- // If we're in push to talk mode, we don't need to use the VAD model
3702
- if (this.pushToTalkEnabled) {
3701
+ // If we're in push to talk mode or mute mode, we don't need to use the VAD model
3702
+ if (this.pushToTalkEnabled || this.isMuted) {
3703
3703
  return;
3704
3704
  }
3705
3705
  // Check if VAD is disabled
@@ -4458,6 +4458,7 @@ registerProcessor('audio_processor', AudioProcessor);
4458
4458
  this.isMuted = true;
4459
4459
  console.log('Microphone muted');
4460
4460
  this.options.onMuteStateChange(true);
4461
+ this.stopVad();
4461
4462
  }
4462
4463
  }
4463
4464
  /**
@@ -4468,6 +4469,7 @@ registerProcessor('audio_processor', AudioProcessor);
4468
4469
  this.isMuted = false;
4469
4470
  console.log('Microphone unmuted');
4470
4471
  this.options.onMuteStateChange(false);
4472
+ this._initializeVAD();
4471
4473
  }
4472
4474
  }
4473
4475
  }