@volley/recognition-client-sdk 0.1.381 → 0.1.383
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/dist/index.js +17 -14
- package/dist/index.js.map +3 -3
- package/dist/recog-client-sdk.browser.js +12 -6
- package/dist/recog-client-sdk.browser.js.map +3 -3
- package/dist/simplified-vgf-recognition-client.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/simplified-vgf-recognition-client.ts +11 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplified-vgf-recognition-client.d.ts","sourceRoot":"","sources":["../src/simplified-vgf-recognition-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACH,gBAAgB,
|
|
1
|
+
{"version":3,"file":"simplified-vgf-recognition-client.d.ts","sourceRoot":"","sources":["../src/simplified-vgf-recognition-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACH,gBAAgB,EAInB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEH,wBAAwB,EACxB,WAAW,EACd,MAAM,+BAA+B,CAAC;AAYvC;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IACvE;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAElD;;;OAGG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;CACnC;AAED;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAE5C;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjE;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,IAAI,IAAI,CAAC;IAGvB;;;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BAAyB,GAAG,+BAA+B,CAE5G"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volley/recognition-client-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.383",
|
|
4
4
|
"description": "Recognition Service TypeScript/Node.js Client SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"provenance": true
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"uuid": "11.
|
|
34
|
+
"uuid": "11.1.0",
|
|
35
35
|
"ws": "8.18.3",
|
|
36
|
-
"zod": "3.22.
|
|
36
|
+
"zod": "3.22.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"ts-jest": "29.4.5",
|
|
56
56
|
"typescript": "5.1.6",
|
|
57
57
|
"@recog/shared-config": "1.0.0",
|
|
58
|
-
"@recog/
|
|
58
|
+
"@recog/shared-types": "1.0.0",
|
|
59
59
|
"@recog/shared-utils": "1.0.0",
|
|
60
|
-
"@recog/
|
|
60
|
+
"@recog/websocket": "1.0.0"
|
|
61
61
|
},
|
|
62
62
|
"keywords": [
|
|
63
63
|
"recognition",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
import {
|
|
12
12
|
RecognitionState,
|
|
13
13
|
TranscriptionStatus,
|
|
14
|
-
RecordingStatus
|
|
14
|
+
RecordingStatus,
|
|
15
|
+
RecognitionActionProcessingState
|
|
15
16
|
} from './vgf-recognition-state.js';
|
|
16
17
|
import {
|
|
17
18
|
IRecognitionClient,
|
|
@@ -27,6 +28,7 @@ import {
|
|
|
27
28
|
updateStateOnStop
|
|
28
29
|
} from './vgf-recognition-mapper.js';
|
|
29
30
|
import { RecognitionContextTypeV1 } from '@recog/shared-types';
|
|
31
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* Configuration for SimplifiedVGFRecognitionClient
|
|
@@ -164,11 +166,12 @@ export class SimplifiedVGFRecognitionClient implements ISimplifiedVGFRecognition
|
|
|
164
166
|
const needsNewUuid = !initialState.audioUtteranceId ||
|
|
165
167
|
initialState.audioUtteranceId === '' ||
|
|
166
168
|
initialState.transcriptionStatus === TranscriptionStatus.ABORTED ||
|
|
167
|
-
initialState.transcriptionStatus === TranscriptionStatus.FINALIZED
|
|
168
|
-
|
|
169
|
+
initialState.transcriptionStatus === TranscriptionStatus.FINALIZED ||
|
|
170
|
+
initialState.transcriptionStatus === TranscriptionStatus.ERROR ||
|
|
171
|
+
initialState.recognitionActionProcessingState !== RecognitionActionProcessingState.COMPLETED;
|
|
169
172
|
if (needsNewUuid) {
|
|
170
173
|
// Generate new UUID for fresh session
|
|
171
|
-
const newUUID =
|
|
174
|
+
const newUUID = uuidv4();
|
|
172
175
|
|
|
173
176
|
if (clientConfig.logger) {
|
|
174
177
|
const reason = !initialState.audioUtteranceId ? 'Missing UUID' :
|
|
@@ -177,17 +180,13 @@ export class SimplifiedVGFRecognitionClient implements ISimplifiedVGFRecognition
|
|
|
177
180
|
clientConfig.logger('info', `${reason} detected, generating new UUID: ${newUUID}`);
|
|
178
181
|
}
|
|
179
182
|
|
|
180
|
-
// Update state with new UUID and reset session-specific fields
|
|
183
|
+
// Update state with new UUID and reset session-specific fields
|
|
181
184
|
this.state = {
|
|
182
185
|
...initialState,
|
|
183
186
|
audioUtteranceId: newUUID,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
transcriptionStatus: TranscriptionStatus.NOT_STARTED,
|
|
188
|
-
startRecordingStatus: RecordingStatus.READY,
|
|
189
|
-
finalTranscript: undefined
|
|
190
|
-
} : {})
|
|
187
|
+
transcriptionStatus: TranscriptionStatus.NOT_STARTED,
|
|
188
|
+
startRecordingStatus: RecordingStatus.READY,
|
|
189
|
+
finalTranscript: undefined
|
|
191
190
|
};
|
|
192
191
|
|
|
193
192
|
// Use new UUID in client config
|