@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.
|
@@ -3692,8 +3692,8 @@ class LayercodeClient {
|
|
|
3692
3692
|
_initializeVAD() {
|
|
3693
3693
|
var _a;
|
|
3694
3694
|
console.log('initializing VAD', { pushToTalkEnabled: this.pushToTalkEnabled, canInterrupt: this.canInterrupt, vadConfig: this.vadConfig });
|
|
3695
|
-
// If we're in push to talk mode, we don't need to use the VAD model
|
|
3696
|
-
if (this.pushToTalkEnabled) {
|
|
3695
|
+
// If we're in push to talk mode or mute mode, we don't need to use the VAD model
|
|
3696
|
+
if (this.pushToTalkEnabled || this.isMuted) {
|
|
3697
3697
|
return;
|
|
3698
3698
|
}
|
|
3699
3699
|
// Check if VAD is disabled
|
|
@@ -4452,6 +4452,7 @@ class LayercodeClient {
|
|
|
4452
4452
|
this.isMuted = true;
|
|
4453
4453
|
console.log('Microphone muted');
|
|
4454
4454
|
this.options.onMuteStateChange(true);
|
|
4455
|
+
this.stopVad();
|
|
4455
4456
|
}
|
|
4456
4457
|
}
|
|
4457
4458
|
/**
|
|
@@ -4462,6 +4463,7 @@ class LayercodeClient {
|
|
|
4462
4463
|
this.isMuted = false;
|
|
4463
4464
|
console.log('Microphone unmuted');
|
|
4464
4465
|
this.options.onMuteStateChange(false);
|
|
4466
|
+
this._initializeVAD();
|
|
4465
4467
|
}
|
|
4466
4468
|
}
|
|
4467
4469
|
}
|