@eka-care/ekascribe-ts-sdk 1.5.2 → 1.5.4
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.
|
@@ -333,13 +333,20 @@ class VadWebClient {
|
|
|
333
333
|
* End VAD
|
|
334
334
|
*/
|
|
335
335
|
destroyVad() {
|
|
336
|
-
|
|
336
|
+
// Properly destroy MicVAD instance
|
|
337
|
+
if (this.micVad && typeof this.micVad.destroy === 'function') {
|
|
338
|
+
this.micVad.destroy();
|
|
339
|
+
}
|
|
337
340
|
this.recording_started = false;
|
|
338
341
|
}
|
|
339
342
|
/**
|
|
340
343
|
* reset vadWeb instance
|
|
341
344
|
*/
|
|
342
345
|
resetVadWebInstance() {
|
|
346
|
+
// First, stop any ongoing operations
|
|
347
|
+
if (this.micVad) {
|
|
348
|
+
this.micVad.pause(); // Stop recording first
|
|
349
|
+
}
|
|
343
350
|
// Properly destroy MicVAD instance
|
|
344
351
|
if (this.micVad && typeof this.micVad.destroy === 'function') {
|
|
345
352
|
this.micVad.destroy();
|