@volley/recognition-client-sdk 0.1.254 → 0.1.255
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.
|
@@ -234,7 +234,15 @@ var TranscriptMessageSchema = z.object({
|
|
|
234
234
|
* Contains only the unconfirmed interim text
|
|
235
235
|
* @example "I'm doing"
|
|
236
236
|
*/
|
|
237
|
-
newPendingTranscript: z.string().optional()
|
|
237
|
+
newPendingTranscript: z.string().optional(),
|
|
238
|
+
/**
|
|
239
|
+
* Whether this is a fallback transcript (forced due to timeout)
|
|
240
|
+
* True when provider didn't send is_final=true within expected timeframe
|
|
241
|
+
* Used for monitoring/debugging fallback scenarios
|
|
242
|
+
* @example true
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
is_fallback: z.boolean().optional()
|
|
238
246
|
});
|
|
239
247
|
var VADEndSignalSchema = z.object({
|
|
240
248
|
type: z.literal(ProviderMessageType.VAD_END_SIGNAL),
|
|
@@ -1706,8 +1714,8 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
1706
1714
|
const { maxAttempts, delayMs } = this.config.connectionRetry;
|
|
1707
1715
|
const connectionTimeout = 1e4;
|
|
1708
1716
|
let lastError;
|
|
1709
|
-
const originalOnConnected = this.
|
|
1710
|
-
const originalOnError = this.
|
|
1717
|
+
const originalOnConnected = this.onConnected.bind(this);
|
|
1718
|
+
const originalOnError = this.onError.bind(this);
|
|
1711
1719
|
try {
|
|
1712
1720
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
1713
1721
|
const attemptLogLevel = attempt === 1 ? "debug" : "info";
|
|
@@ -1781,8 +1789,8 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
1781
1789
|
}
|
|
1782
1790
|
throw new ConnectionError(`Failed to establish connection after ${maxAttempts} attempts`, maxAttempts, this.config.url, lastError);
|
|
1783
1791
|
} finally {
|
|
1784
|
-
this.
|
|
1785
|
-
this.
|
|
1792
|
+
this.onConnected = originalOnConnected;
|
|
1793
|
+
this.onError = originalOnError;
|
|
1786
1794
|
this.connectionPromise = void 0;
|
|
1787
1795
|
}
|
|
1788
1796
|
}
|