speaker-calibration 2.2.8 → 2.2.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speaker-calibration",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "Speaker calibration library for auditory testing",
5
5
  "main": "dist/main.js",
6
6
  "directories": {
@@ -219,8 +219,13 @@ class Listener extends AudioPeer {
219
219
  ...(availableConstraints.channelCount && availableConstraints.channelCount == true
220
220
  ? {channelCount: {exact: 1}}
221
221
  : {}),
222
+ echoCanellation: false,
223
+ noiseSuppression: false,
224
+ autoGainControl: false
222
225
  };
223
226
 
227
+ console.log(contraints);
228
+
224
229
  this.displayUpdate(
225
230
  `Listener MediaDevices Contraints - ${JSON.stringify(contraints, undefined, 2)}`
226
231
  );
@@ -247,6 +247,7 @@ class AudioCalibrator extends AudioRecorder {
247
247
  }
248
248
  downloadSingleFilteredRecording = () => {
249
249
  const recordings = this.getAllFilteredRecordedSignals();
250
+ console.log("Single filtered recording should be of length: " + recordings[0].length);
250
251
  saveToCSV(recordings[0], `recordedMLSignal_convolved.csv`);
251
252
  }
252
253
  downloadUnfilteredRecordings = () => {
@@ -38,6 +38,7 @@ class AudioRecorder extends MyEventEmitter {
38
38
  const data = audioBuffer.getChannelData(0);
39
39
 
40
40
  console.log(`Decoded audio buffer with ${data.length} samples`);
41
+ console.log(`Unfiltered recording should be of length: ${data.length}`);
41
42
  this.#recordedSignals.push(Array.from(data));
42
43
  };
43
44
 
@@ -47,6 +48,7 @@ class AudioRecorder extends MyEventEmitter {
47
48
  const data = audioBuffer.getChannelData(0);
48
49
 
49
50
  console.log(`Decoded audio buffer with ${data.length} samples`);
51
+ console.log(`Filtered recording should be of length: ${data.length}`);
50
52
  this.#filteredRecordings.push(Array.from(data));
51
53
  };
52
54
 
@@ -644,6 +644,9 @@ class Combination extends AudioCalibrator {
644
644
 
645
645
  let desired_time = this.desired_time_per_mls;
646
646
 
647
+ console.log("MLS sequence should be of length: " + (this.sourceSamplingRate * desired_time));
648
+
649
+
647
650
  length = this.sourceSamplingRate * desired_time;
648
651
  //get mls here
649
652
  await this.pyServerAPI