speaker-calibration 2.2.196 → 2.2.197
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.
- package/dist/example/i18n.js +1391 -1387
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/src/tasks/combination/combination.js +4 -7
package/package.json
CHANGED
|
@@ -601,7 +601,7 @@ class Combination extends AudioCalibrator {
|
|
|
601
601
|
this.clearLastUnfilteredRecordedSignals();
|
|
602
602
|
this.numSuccessfulCaptured +=1;
|
|
603
603
|
} else {
|
|
604
|
-
if (result['sd']
|
|
604
|
+
if (result['sd'] <= this._calibrateSoundBurstMaxSD_dB) {
|
|
605
605
|
console.log('SD: ' + result['sd'] + ', less than _calibrateSoundBurstMaxSD_dB: ' + this._calibrateSoundBurstMaxSD_dB);
|
|
606
606
|
} else {
|
|
607
607
|
console.log('SD: ' + result['sd'] + ', greater than _calibrateSoundBurstMaxSD_dB: ' + this._calibrateSoundBurstMaxSD_dB);
|
|
@@ -618,7 +618,6 @@ class Combination extends AudioCalibrator {
|
|
|
618
618
|
this.recordingChecks['unfiltered'].pop();
|
|
619
619
|
}
|
|
620
620
|
this.recordingChecks['unfiltered'].push(result);
|
|
621
|
-
await this.pyServerAPI.checkMemory();
|
|
622
621
|
// let start = new Date().getTime() / 1000;
|
|
623
622
|
// const payloadT = tf.tensor1d(payload);
|
|
624
623
|
// payloadT.print();
|
|
@@ -631,6 +630,7 @@ class Combination extends AudioCalibrator {
|
|
|
631
630
|
// console.log("dimention:", xfft.shape);
|
|
632
631
|
// let end = new Date().getTime() / 1000;
|
|
633
632
|
// console.log("Time taken:", end - start, "seconds");
|
|
633
|
+
console.log('start calculate impulse response');
|
|
634
634
|
const usedPeriodStart = this.num_mls_to_skip * this.sourceSamplingRate;
|
|
635
635
|
const payload_skipped_warmUp = payload.slice(usedPeriodStart);
|
|
636
636
|
await this.pyServerAPI
|
|
@@ -645,7 +645,6 @@ class Combination extends AudioCalibrator {
|
|
|
645
645
|
this.fs2 = res['fs2'];
|
|
646
646
|
this.L_new_n = res['L_new_n'];
|
|
647
647
|
this.dL_n = res['dL_n'];
|
|
648
|
-
await this.pyServerAPI.checkMemory();
|
|
649
648
|
this.impulseResponses.push(
|
|
650
649
|
await this.pyServerAPI
|
|
651
650
|
.getImpulseResponse({
|
|
@@ -658,7 +657,6 @@ class Combination extends AudioCalibrator {
|
|
|
658
657
|
dL_n: this.dL_n,
|
|
659
658
|
})
|
|
660
659
|
.then(res => {
|
|
661
|
-
if (this.numSuccessfulCaptured < this.numCaptures) {
|
|
662
660
|
this.numSuccessfulCaptured += 2;
|
|
663
661
|
this.stepNum += 1;
|
|
664
662
|
console.log('got impulse response ' + this.stepNum);
|
|
@@ -670,7 +668,6 @@ class Combination extends AudioCalibrator {
|
|
|
670
668
|
message: this.status,
|
|
671
669
|
});
|
|
672
670
|
return res['ir'];
|
|
673
|
-
}
|
|
674
671
|
})
|
|
675
672
|
.catch(err => {
|
|
676
673
|
console.error(err);
|
|
@@ -2764,8 +2761,8 @@ class Combination extends AudioCalibrator {
|
|
|
2764
2761
|
calibrateSoundLimit,
|
|
2765
2762
|
_calibrateSoundBurstNormalizeBy1000HzGainBool = false,
|
|
2766
2763
|
_calibrateSoundBurstScalarDB = 71,
|
|
2767
|
-
calibrateSound1000HzMaxSD_dB =
|
|
2768
|
-
_calibrateSoundBurstMaxSD_dB =
|
|
2764
|
+
calibrateSound1000HzMaxSD_dB = 0.1,
|
|
2765
|
+
_calibrateSoundBurstMaxSD_dB = 0.1
|
|
2769
2766
|
) => {
|
|
2770
2767
|
this.TAPER_SECS = _calibrateSoundTaperSec;
|
|
2771
2768
|
this.calibrateSoundLimit = calibrateSoundLimit;
|