Fixed PPT key assignment

canary
WolverinDEV 2018-11-18 11:32:16 +01:00
parent f37b918a5b
commit 789f9eb709
1 changed files with 4 additions and 1 deletions

View File

@ -360,8 +360,11 @@ class PushToTalkVAD extends VoiceActivityDetector {
}
set key(key: ppt.KeyDescriptor) {
Object.assign(this._key_hook, this._key);
ppt.unregister_key_hook(this._key_hook);
Object.assign(this._key, key);
Object.assign(this._key_hook, key);
this._pushed = false;
ppt.register_key_hook(this._key_hook);
}
shouldRecord(buffer: AudioBuffer): boolean {