@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
|
@@ -3737,11 +3737,14 @@ var RecognitionProvider;
|
|
|
3737
3737
|
RecognitionProvider2["DEEPGRAM"] = "deepgram";
|
|
3738
3738
|
RecognitionProvider2["ELEVENLABS"] = "elevenlabs";
|
|
3739
3739
|
RecognitionProvider2["FIREWORKS"] = "fireworks";
|
|
3740
|
+
RecognitionProvider2["GLADIA"] = "gladia";
|
|
3740
3741
|
RecognitionProvider2["GOOGLE"] = "google";
|
|
3741
3742
|
RecognitionProvider2["GEMINI_BATCH"] = "gemini-batch";
|
|
3742
3743
|
RecognitionProvider2["OPENAI_BATCH"] = "openai-batch";
|
|
3744
|
+
RecognitionProvider2["SELF_SERVE_VLLM"] = "self-serve-vllm";
|
|
3743
3745
|
RecognitionProvider2["OPENAI_REALTIME"] = "openai-realtime";
|
|
3744
3746
|
RecognitionProvider2["MISTRAL_VOXTRAL"] = "mistral-voxtral";
|
|
3747
|
+
RecognitionProvider2["CARTESIA"] = "cartesia";
|
|
3745
3748
|
RecognitionProvider2["DASHSCOPE"] = "dashscope";
|
|
3746
3749
|
RecognitionProvider2["TEST_ASR_PROVIDER_QUOTA"] = "test-asr-provider-quota";
|
|
3747
3750
|
RecognitionProvider2["TEST_ASR_STREAMING"] = "test-asr-streaming";
|
|
@@ -3783,10 +3786,13 @@ var FireworksModel;
|
|
|
3783
3786
|
FireworksModel2["WHISPER_V3"] = "whisper-v3";
|
|
3784
3787
|
FireworksModel2["WHISPER_V3_TURBO"] = "whisper-v3-turbo";
|
|
3785
3788
|
})(FireworksModel || (FireworksModel = {}));
|
|
3789
|
+
var GladiaModel;
|
|
3790
|
+
(function(GladiaModel2) {
|
|
3791
|
+
GladiaModel2["SOLARIA_1"] = "solaria-1";
|
|
3792
|
+
})(GladiaModel || (GladiaModel = {}));
|
|
3786
3793
|
var ElevenLabsModel;
|
|
3787
3794
|
(function(ElevenLabsModel2) {
|
|
3788
3795
|
ElevenLabsModel2["SCRIBE_V2_REALTIME"] = "scribe_v2_realtime";
|
|
3789
|
-
ElevenLabsModel2["SCRIBE_V1"] = "scribe_v1";
|
|
3790
3796
|
})(ElevenLabsModel || (ElevenLabsModel = {}));
|
|
3791
3797
|
var OpenAIRealtimeModel;
|
|
3792
3798
|
(function(OpenAIRealtimeModel2) {
|
|
@@ -3797,11 +3803,20 @@ var MistralVoxtralModel;
|
|
|
3797
3803
|
(function(MistralVoxtralModel2) {
|
|
3798
3804
|
MistralVoxtralModel2["VOXTRAL_MINI_REALTIME_2602"] = "voxtral-mini-transcribe-realtime-2602";
|
|
3799
3805
|
})(MistralVoxtralModel || (MistralVoxtralModel = {}));
|
|
3806
|
+
var CartesiaModel;
|
|
3807
|
+
(function(CartesiaModel2) {
|
|
3808
|
+
CartesiaModel2["INK_WHISPER"] = "ink-whisper";
|
|
3809
|
+
CartesiaModel2["INK_WHISPER_20250604"] = "ink-whisper-2025-06-04";
|
|
3810
|
+
})(CartesiaModel || (CartesiaModel = {}));
|
|
3800
3811
|
var DashScopeModel;
|
|
3801
3812
|
(function(DashScopeModel2) {
|
|
3802
3813
|
DashScopeModel2["QWEN3_ASR_FLASH_REALTIME_2602"] = "qwen3-asr-flash-realtime-2026-02-10";
|
|
3803
3814
|
DashScopeModel2["QWEN3_ASR_FLASH_REALTIME"] = "qwen3-asr-flash-realtime";
|
|
3804
3815
|
})(DashScopeModel || (DashScopeModel = {}));
|
|
3816
|
+
var SelfServeVllmModel;
|
|
3817
|
+
(function(SelfServeVllmModel2) {
|
|
3818
|
+
SelfServeVllmModel2["QWEN3_ASR_1_7B"] = "qwen3-asr-1.7b";
|
|
3819
|
+
})(SelfServeVllmModel || (SelfServeVllmModel = {}));
|
|
3805
3820
|
|
|
3806
3821
|
// ../../libs/types/dist/recognition-result-v1.types.js
|
|
3807
3822
|
var RecognitionResultTypeV1;
|
|
@@ -3874,6 +3889,9 @@ var MetadataResultSchemaV1 = z.object({
|
|
|
3874
3889
|
costInUSD: z.number().default(0).optional(),
|
|
3875
3890
|
// ASR API Type
|
|
3876
3891
|
apiType: z.nativeEnum(ASRApiType).optional(),
|
|
3892
|
+
// Provider identification
|
|
3893
|
+
provider: z.string().optional(),
|
|
3894
|
+
model: z.string().optional(),
|
|
3877
3895
|
// ASR configuration as JSON string (no type validation)
|
|
3878
3896
|
asrConfig: z.string().optional(),
|
|
3879
3897
|
// Raw ASR metadata payload as provided by the provider (stringified if needed)
|
|
@@ -5181,7 +5199,7 @@ var MessageHandler = class {
|
|
|
5181
5199
|
}
|
|
5182
5200
|
if (msg.data && typeof msg.data !== "object") {
|
|
5183
5201
|
if (this.callbacks.logger) {
|
|
5184
|
-
this.callbacks.logger("
|
|
5202
|
+
this.callbacks.logger("warn", "[RecogSDK] Received primitive msg.data from server", {
|
|
5185
5203
|
dataType: typeof msg.data,
|
|
5186
5204
|
data: msg.data,
|
|
5187
5205
|
fullMessage: msg
|
|
@@ -5503,7 +5521,7 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
5503
5521
|
blobToArrayBuffer(audioData).then((arrayBuffer) => {
|
|
5504
5522
|
this.sendAudioInternal(arrayBuffer);
|
|
5505
5523
|
}).catch((error) => {
|
|
5506
|
-
this.log("
|
|
5524
|
+
this.log("warn", "Failed to convert Blob to ArrayBuffer", error);
|
|
5507
5525
|
});
|
|
5508
5526
|
return;
|
|
5509
5527
|
}
|
|
@@ -5543,7 +5561,7 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
5543
5561
|
*/
|
|
5544
5562
|
async stopRecording() {
|
|
5545
5563
|
if (this.state !== "ready" /* READY */) {
|
|
5546
|
-
this.log("
|
|
5564
|
+
this.log("info", "stopRecording called but not in READY state", { state: this.state });
|
|
5547
5565
|
return;
|
|
5548
5566
|
}
|
|
5549
5567
|
this.log("debug", "Stopping recording");
|
|
@@ -5713,7 +5731,7 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
5713
5731
|
if (this.state === "stopping" /* STOPPING */) {
|
|
5714
5732
|
this.state = "stopped" /* STOPPED */;
|
|
5715
5733
|
} else if (this.state === "connected" /* CONNECTED */ || this.state === "ready" /* READY */ || this.state === "connecting" /* CONNECTING */) {
|
|
5716
|
-
this.log("
|
|
5734
|
+
this.log("warn", "[DIAGNOSTIC] Unexpected disconnection", {
|
|
5717
5735
|
code,
|
|
5718
5736
|
codeDescription: closeCodeDescription,
|
|
5719
5737
|
reason: reason || "(empty)",
|
|
@@ -5835,7 +5853,7 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
5835
5853
|
blobToArrayBuffer(audioData).then((arrayBuffer) => {
|
|
5836
5854
|
this.sendPrefixAudioInternal(arrayBuffer);
|
|
5837
5855
|
}).catch((error) => {
|
|
5838
|
-
this.log("
|
|
5856
|
+
this.log("warn", "Failed to convert Blob to ArrayBuffer for prefix audio", error);
|
|
5839
5857
|
});
|
|
5840
5858
|
return;
|
|
5841
5859
|
}
|