@eka-care/ekascribe-ts-sdk 1.5.36 → 1.5.37

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.
@@ -238,12 +238,13 @@ class VadWebClient {
238
238
  const audioFileManager = EkaScribeStore.audioFileManagerInstance;
239
239
  const audioBuffer = EkaScribeStore.audioBufferInstance;
240
240
  this.is_vad_loading = true;
241
- const vadFrameProcessedCallback = EkaScribeStore.vadFrameProcessedCallback;
242
241
  const vad = await MicVAD.new({
243
242
  frameSamples: this.frame_size,
244
243
  preSpeechPadFrames: this.speech_pad_frames,
245
244
  onFrameProcessed: (prob, frames) => {
246
245
  console.log(frames, 'frames in vad web');
246
+ // Get callback dynamically to ensure it's always up to date
247
+ const vadFrameProcessedCallback = EkaScribeStore.vadFrameProcessedCallback;
247
248
  if (vadFrameProcessedCallback) {
248
249
  vadFrameProcessedCallback({ probabilities: prob, frame: frames });
249
250
  }
@@ -146,6 +146,7 @@ class EkaScribeStore {
146
146
  this._userSpeechCallback = null;
147
147
  this._eventCallback = null;
148
148
  this._vadFramesCallback = null;
149
+ this._vadFrameProcessedCallback = null;
149
150
  }
150
151
  }
151
152
  export default EkaScribeStore.getInstance();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "1.5.36",
3
+ "version": "1.5.37",
4
4
  "main": "dist/index.js",
5
5
  "repository": "git@github.com:eka-care/eka-js-sdk.git",
6
6
  "author": "Sanikagoyal28 <sanikagoyal9@gmail.com>",