@eka-care/ekascribe-ts-sdk 2.0.25 → 2.0.27

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.
Files changed (2) hide show
  1. package/dist/index.mjs +8 -14
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -11207,7 +11207,7 @@ class EkaScribeStore {
11207
11207
  }
11208
11208
  // Reset store to initial state
11209
11209
  resetStore() {
11210
- this._txnID = "", this._sessionBucketPath = "", this._sessionStatus = {}, this._userSpeechCallback = null, this._eventCallback = null, this._vadFramesCallback = null, this._vadFrameProcessedCallback = null;
11210
+ this._txnID = "", this._sessionBucketPath = "", this._sessionStatus = {}, this._vadInstance = null, this._audioFileManagerInstance = null, this._audioBufferInstance = null, this._userSpeechCallback = null, this._eventCallback = null, this._vadFramesCallback = null, this._vadFrameProcessedCallback = null;
11211
11211
  }
11212
11212
  }
11213
11213
  const EkaScribeStore$1 = EkaScribeStore.getInstance();
@@ -54251,17 +54251,6 @@ const decodeApiResponse = (i) => {
54251
54251
  }, Ur = class Ur {
54252
54252
  // Private constructor to prevent direct instantiation
54253
54253
  constructor() {
54254
- this.audioFileManagerInstance = new AudioFileManager(), EkaScribeStore$1.audioFileManagerInstance = this.audioFileManagerInstance, this.audioBufferInstance = new AudioBufferManager(SAMPLING_RATE, AUDIO_BUFFER_SIZE_IN_S), EkaScribeStore$1.audioBufferInstance = this.audioBufferInstance, this.vadInstance = new VadWebClient(
54255
- PREF_CHUNK_LENGTH,
54256
- DESP_CHUNK_LENGTH,
54257
- MAX_CHUNK_LENGTH,
54258
- FRAME_RATE
54259
- ), EkaScribeStore$1.vadInstance = this.vadInstance, console.log(
54260
- "Initialising SDK: ",
54261
- this.audioFileManagerInstance,
54262
- this.audioBufferInstance,
54263
- this.vadInstance
54264
- );
54265
54254
  }
54266
54255
  // Static method to get the singleton instance with optional initialization
54267
54256
  static getInstance({
@@ -54288,7 +54277,12 @@ const decodeApiResponse = (i) => {
54288
54277
  });
54289
54278
  }
54290
54279
  async initTransaction(a) {
54291
- this.resetEkaScribe();
54280
+ EkaScribeStore$1.resetStore(), this.audioFileManagerInstance = new AudioFileManager(), EkaScribeStore$1.audioFileManagerInstance = this.audioFileManagerInstance, this.audioBufferInstance = new AudioBufferManager(SAMPLING_RATE, AUDIO_BUFFER_SIZE_IN_S), EkaScribeStore$1.audioBufferInstance = this.audioBufferInstance, this.vadInstance = new VadWebClient(
54281
+ PREF_CHUNK_LENGTH,
54282
+ DESP_CHUNK_LENGTH,
54283
+ MAX_CHUNK_LENGTH,
54284
+ FRAME_RATE
54285
+ ), EkaScribeStore$1.vadInstance = this.vadInstance, console.log("Initialising SDK Instances ", EkaScribeStore$1);
54292
54286
  const s = await initialiseTransaction(a);
54293
54287
  return console.log(s, "initTransactionResponse"), s;
54294
54288
  }
@@ -54339,7 +54333,7 @@ const decodeApiResponse = (i) => {
54339
54333
  status: "info",
54340
54334
  message: `Transaction cancel status: ${m.code}`,
54341
54335
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
54342
- }), this.resetEkaScribe(), m;
54336
+ }), m;
54343
54337
  } catch (r) {
54344
54338
  return {
54345
54339
  code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "description": "EkaScribe TypeScript SDK - Modern ES2020 build",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",