@volley/recognition-client-sdk 0.1.622 → 0.1.670
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/browser.bundled.d.ts +33 -3
- package/dist/index.bundled.d.ts +34 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -6
- package/dist/index.js.map +3 -3
- package/dist/recog-client-sdk.browser.js +24 -6
- package/dist/recog-client-sdk.browser.js.map +3 -3
- package/package.json +3 -3
- package/src/index.spec.ts +11 -0
- package/src/index.ts +3 -0
- package/src/recognition-client.ts +4 -4
- package/src/utils/message-handler.ts +1 -1
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.670",
|
|
4
4
|
"description": "Recognition Service TypeScript/Node.js Client SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"typescript": "5.1.6",
|
|
57
57
|
"@recog/shared-config": "1.0.0",
|
|
58
58
|
"@recog/shared-types": "1.0.0",
|
|
59
|
-
"@recog/
|
|
60
|
-
"@recog/
|
|
59
|
+
"@recog/shared-utils": "1.0.0",
|
|
60
|
+
"@recog/websocket": "1.0.0"
|
|
61
61
|
},
|
|
62
62
|
"keywords": [
|
|
63
63
|
"recognition",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CartesiaModel, RecognitionProvider, SelfServeVllmModel } from './index.js';
|
|
2
|
+
|
|
3
|
+
describe('SDK top-level exports', () => {
|
|
4
|
+
it('should export Cartesia and self-serve-vllm enums for downstream imports', () => {
|
|
5
|
+
expect(RecognitionProvider.CARTESIA).toBe('cartesia');
|
|
6
|
+
expect(RecognitionProvider.SELF_SERVE_VLLM).toBe('self-serve-vllm');
|
|
7
|
+
expect(CartesiaModel.INK_WHISPER).toBe('ink-whisper');
|
|
8
|
+
expect(CartesiaModel.INK_WHISPER_20250604).toBe('ink-whisper-2025-06-04');
|
|
9
|
+
expect(SelfServeVllmModel.QWEN3_ASR_1_7B).toBe('qwen3-asr-1.7b');
|
|
10
|
+
});
|
|
11
|
+
});
|
package/src/index.ts
CHANGED
|
@@ -100,11 +100,14 @@ export {
|
|
|
100
100
|
DeepgramModel,
|
|
101
101
|
ElevenLabsModel,
|
|
102
102
|
FireworksModel,
|
|
103
|
+
GladiaModel,
|
|
103
104
|
GoogleModel,
|
|
104
105
|
GeminiModel,
|
|
105
106
|
OpenAIModel,
|
|
107
|
+
SelfServeVllmModel,
|
|
106
108
|
OpenAIRealtimeModel,
|
|
107
109
|
MistralVoxtralModel,
|
|
110
|
+
CartesiaModel,
|
|
108
111
|
DashScopeModel,
|
|
109
112
|
Language,
|
|
110
113
|
SampleRate,
|
|
@@ -468,7 +468,7 @@ export class RealTimeTwoWayWebSocketRecognitionClient
|
|
|
468
468
|
this.sendAudioInternal(arrayBuffer);
|
|
469
469
|
})
|
|
470
470
|
.catch((error) => {
|
|
471
|
-
this.log('
|
|
471
|
+
this.log('warn', 'Failed to convert Blob to ArrayBuffer', error);
|
|
472
472
|
});
|
|
473
473
|
return;
|
|
474
474
|
}
|
|
@@ -522,7 +522,7 @@ export class RealTimeTwoWayWebSocketRecognitionClient
|
|
|
522
522
|
|
|
523
523
|
async stopRecording(): Promise<void> {
|
|
524
524
|
if (this.state !== ClientState.READY) {
|
|
525
|
-
this.log('
|
|
525
|
+
this.log('info', 'stopRecording called but not in READY state', { state: this.state });
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
528
|
|
|
@@ -756,7 +756,7 @@ export class RealTimeTwoWayWebSocketRecognitionClient
|
|
|
756
756
|
this.state === ClientState.READY ||
|
|
757
757
|
this.state === ClientState.CONNECTING
|
|
758
758
|
) {
|
|
759
|
-
this.log('
|
|
759
|
+
this.log('warn', '[DIAGNOSTIC] Unexpected disconnection', {
|
|
760
760
|
code,
|
|
761
761
|
codeDescription: closeCodeDescription,
|
|
762
762
|
reason: reason || '(empty)',
|
|
@@ -908,7 +908,7 @@ export class RealTimeTwoWayWebSocketRecognitionClient
|
|
|
908
908
|
this.sendPrefixAudioInternal(arrayBuffer);
|
|
909
909
|
})
|
|
910
910
|
.catch((error) => {
|
|
911
|
-
this.log('
|
|
911
|
+
this.log('warn', 'Failed to convert Blob to ArrayBuffer for prefix audio', error);
|
|
912
912
|
});
|
|
913
913
|
return;
|
|
914
914
|
}
|
|
@@ -55,7 +55,7 @@ export class MessageHandler {
|
|
|
55
55
|
// Log error if we receive primitive data (indicates server issue)
|
|
56
56
|
if (msg.data && typeof msg.data !== 'object') {
|
|
57
57
|
if (this.callbacks.logger) {
|
|
58
|
-
this.callbacks.logger('
|
|
58
|
+
this.callbacks.logger('warn', '[RecogSDK] Received primitive msg.data from server', {
|
|
59
59
|
dataType: typeof msg.data,
|
|
60
60
|
data: msg.data,
|
|
61
61
|
fullMessage: msg
|