@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
|
}
|
package/dist/store/store.js
CHANGED