@eka-care/ekascribe-ts-sdk 1.5.37 → 1.5.39
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.
|
@@ -242,12 +242,21 @@ class VadWebClient {
|
|
|
242
242
|
frameSamples: this.frame_size,
|
|
243
243
|
preSpeechPadFrames: this.speech_pad_frames,
|
|
244
244
|
onFrameProcessed: (prob, frames) => {
|
|
245
|
-
console.log(frames, 'frames in vad web');
|
|
246
245
|
// Get callback dynamically to ensure it's always up to date
|
|
247
246
|
const vadFrameProcessedCallback = EkaScribeStore.vadFrameProcessedCallback;
|
|
247
|
+
// console.log(
|
|
248
|
+
// 'VAD callback exists:',
|
|
249
|
+
// !!vadFrameProcessedCallback,
|
|
250
|
+
// 'Recording started:',
|
|
251
|
+
// this.recording_started
|
|
252
|
+
// );
|
|
248
253
|
if (vadFrameProcessedCallback) {
|
|
249
254
|
vadFrameProcessedCallback({ probabilities: prob, frame: frames });
|
|
250
255
|
}
|
|
256
|
+
// Only process frames internally when recording is active
|
|
257
|
+
if (!this.recording_started) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
251
260
|
audioFileManager?.incrementTotalRawSamples(frames);
|
|
252
261
|
audioBuffer?.append(frames);
|
|
253
262
|
// Check if audio chunk needs to be clipped
|