@entros/pulse-sdk 1.5.2 → 1.5.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.
package/dist/index.mjs CHANGED
@@ -59,9 +59,30 @@ async function captureAudio(options = {}) {
59
59
  audio: {
60
60
  sampleRate: TARGET_SAMPLE_RATE,
61
61
  channelCount: 1,
62
+ // Capture without browser-side audio processing — preserves the
63
+ // raw microphone signal for the SDK's downstream feature extraction
64
+ // and for server-side validation. Audio cleanup intended for the
65
+ // transcription path runs server-side, on a parallel path that
66
+ // never feeds back to feature extraction. Matches the mobile SDK's
67
+ // choice of Android's `MIC` source over `VOICE_RECOGNITION` —
68
+ // same architectural decision, two platforms.
62
69
  echoCancellation: false,
63
70
  noiseSuppression: false,
64
- autoGainControl: false
71
+ autoGainControl: false,
72
+ // OS-level voice isolation request (W3C Media Capture Extensions,
73
+ // 2024). Activates the platform DSP on Chrome 124+ / ChromeOS and
74
+ // surfaces Apple Voice Isolation Mic Mode on Safari macOS Sonoma+
75
+ // / iOS 17+ when the user has it enabled in Control Center.
76
+ // Silently ignored on browsers/OSes without support, so the
77
+ // constraint costs nothing where it doesn't help. Distinct
78
+ // mechanism from `noiseSuppression` above — that flag controls
79
+ // WebRTC's hand-tuned AudioProcessingModule, this requests the
80
+ // OS-native neural effect.
81
+ // @ts-expect-error -- W3C Media Capture Extensions property; not
82
+ // yet in lib.dom.d.ts as of TypeScript 6.0. Removing this directive
83
+ // becomes a compile error once lib.dom catches up, signaling that
84
+ // it can be deleted.
85
+ voiceIsolation: true
65
86
  }
66
87
  });
67
88
  let ctx;
@@ -4657,9 +4678,16 @@ var PulseSession = class {
4657
4678
  audio: {
4658
4679
  sampleRate: 16e3,
4659
4680
  channelCount: 1,
4681
+ // Capture constraints kept in lock-step with `sensor/audio.ts` —
4682
+ // the two entry points (standalone capture vs session-based
4683
+ // capture) must agree or the verify flow and direct-API
4684
+ // consumers diverge.
4660
4685
  echoCancellation: false,
4661
4686
  noiseSuppression: false,
4662
- autoGainControl: false
4687
+ autoGainControl: false,
4688
+ // @ts-expect-error -- W3C Media Capture Extensions property; not
4689
+ // yet in lib.dom.d.ts as of TypeScript 6.0.
4690
+ voiceIsolation: true
4663
4691
  }
4664
4692
  });
4665
4693
  this.audioStageState = "capturing";