@eka-care/ekascribe-ts-sdk 2.0.38 → 2.0.40
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.
- package/README.md +0 -9
- package/dist/index.d.ts +9 -0
- package/dist/index.mjs +1238 -1216
- package/dist/worker.bundle.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -325,17 +325,8 @@ const response = await ekascribe.endRecording();
|
|
|
325
325
|
|
|
326
326
|
### 8. Get output recorded prescription
|
|
327
327
|
|
|
328
|
-
You can fetch output in two ways:
|
|
329
|
-
|
|
330
|
-
- `getTemplateOutput({ txn_id })`: polling is your responsibility; call repeatedly until processing finishes.
|
|
331
328
|
- `pollSessionOutput({ txn_id, max_polling_time })`: SDK polls for you and resolves when processing finishes (default max wait: 2 minutes; override via `max_polling_time`, pass time in milliseconds).
|
|
332
329
|
|
|
333
|
-
Example (manual polling):
|
|
334
|
-
|
|
335
|
-
```ts
|
|
336
|
-
const res = await ekascribe.getTemplateOutput({ txn_id: 'transaction-id' });
|
|
337
|
-
```
|
|
338
|
-
|
|
339
330
|
Example (SDK-managed polling):
|
|
340
331
|
|
|
341
332
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ declare class EkaScribe {
|
|
|
67
67
|
onEventCallback(callback: TEventCallback): void;
|
|
68
68
|
onVadFramesCallback(callback: TVadFramesCallback): void;
|
|
69
69
|
onVadFrameProcessedCallback(callback: TVadFrameProcessedCallback): void;
|
|
70
|
+
onPartialResultCallback(callback: TPartialResultCallback): void;
|
|
70
71
|
configureVadConstants({ pref_length, desp_length, max_length, sr, frame_size, pre_speech_pad_frames, short_thsld, long_thsld, }: {
|
|
71
72
|
pref_length: number;
|
|
72
73
|
desp_length: number;
|
|
@@ -337,6 +338,14 @@ declare type TOutputSummary = {
|
|
|
337
338
|
warnings?: TTemplateMessage[];
|
|
338
339
|
};
|
|
339
340
|
|
|
341
|
+
declare type TPartialResultCallback = (data: {
|
|
342
|
+
txn_id: string;
|
|
343
|
+
response: TGetStatusApiResponse;
|
|
344
|
+
status_code: number;
|
|
345
|
+
message: string;
|
|
346
|
+
poll_status: 'in-progress' | 'completed' | 'failed' | 'timeout';
|
|
347
|
+
}) => void;
|
|
348
|
+
|
|
340
349
|
declare type TPatchTransactionError = {
|
|
341
350
|
error: {
|
|
342
351
|
type: string;
|