speaker-calibration 2.1.18 → 2.1.20
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/listener.html +1 -0
- package/dist/example/speakerUI.js +7 -3
- package/dist/main.js +127 -5
- package/package.json +2 -1
- package/src/config/firebase.js +25 -0
- package/src/peer-connection/listener.js +22 -2
- package/src/peer-connection/speaker.js +21 -1
- package/src/server/PythonServerAPI.js +12 -5
- package/src/tasks/combination/combination.js +293 -101
- package/src/tasks/impulse-response/impulseResponse.js +111 -67
|
@@ -8,7 +8,8 @@ window.onload = () => {
|
|
|
8
8
|
const sendToServerButton = document.getElementById('sendToServerButton');
|
|
9
9
|
const wavFile = document.getElementById('wav-file');
|
|
10
10
|
|
|
11
|
-
const {Speaker, VolumeCalibration, ImpulseResponseCalibration, CombinationCalibration} =
|
|
11
|
+
const {Speaker, VolumeCalibration, ImpulseResponseCalibration, CombinationCalibration} =
|
|
12
|
+
speakerCalibrator;
|
|
12
13
|
|
|
13
14
|
const normalize = (min, max) => {
|
|
14
15
|
var delta = max - min;
|
|
@@ -148,7 +149,7 @@ window.onload = () => {
|
|
|
148
149
|
|
|
149
150
|
flexSwitchCheckIR.onchange = () => {
|
|
150
151
|
flexSwitchCheckVolume.checked = !flexSwitchCheckIR.checked;
|
|
151
|
-
flexSwitchCheckCombo.checked = !flexSwitchCheckIR.checked
|
|
152
|
+
flexSwitchCheckCombo.checked = !flexSwitchCheckIR.checked;
|
|
152
153
|
};
|
|
153
154
|
|
|
154
155
|
flexSwitchCheckVolume.onchange = () => {
|
|
@@ -226,6 +227,9 @@ window.onload = () => {
|
|
|
226
227
|
|
|
227
228
|
try {
|
|
228
229
|
if (calibrationLevel == 0) {
|
|
230
|
+
const trial = await Speaker.getMicrophoneNamesFromDatabase().then(microphoneList => {
|
|
231
|
+
console.log('microphoneList', microphoneList);
|
|
232
|
+
});
|
|
229
233
|
invertedIR = await Speaker.startCalibration(speakerParameters, calibrator);
|
|
230
234
|
console.log({invertedIR});
|
|
231
235
|
await useIRResult(invertedIR);
|
|
@@ -253,7 +257,7 @@ window.onload = () => {
|
|
|
253
257
|
|
|
254
258
|
if (flexSwitchCheckIR.checked) {
|
|
255
259
|
runImpulseResponseCalibration(calibrationLevel);
|
|
256
|
-
} else if (flexSwitchCheckVolume.checked){
|
|
260
|
+
} else if (flexSwitchCheckVolume.checked) {
|
|
257
261
|
runVolumeCalibration();
|
|
258
262
|
} else {
|
|
259
263
|
runCombinationCalibration(calibrationLevel);
|