@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.
package/dist/index.js
CHANGED
|
@@ -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),
|
|
@@ -1803,8 +1811,8 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
1803
1811
|
const { maxAttempts, delayMs } = this.config.connectionRetry;
|
|
1804
1812
|
const connectionTimeout = 1e4;
|
|
1805
1813
|
let lastError;
|
|
1806
|
-
const originalOnConnected = this.
|
|
1807
|
-
const originalOnError = this.
|
|
1814
|
+
const originalOnConnected = this.onConnected.bind(this);
|
|
1815
|
+
const originalOnError = this.onError.bind(this);
|
|
1808
1816
|
try {
|
|
1809
1817
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
1810
1818
|
const attemptLogLevel = attempt === 1 ? "debug" : "info";
|
|
@@ -1878,8 +1886,8 @@ var RealTimeTwoWayWebSocketRecognitionClient = class _RealTimeTwoWayWebSocketRec
|
|
|
1878
1886
|
}
|
|
1879
1887
|
throw new ConnectionError(`Failed to establish connection after ${maxAttempts} attempts`, maxAttempts, this.config.url, lastError);
|
|
1880
1888
|
} finally {
|
|
1881
|
-
this.
|
|
1882
|
-
this.
|
|
1889
|
+
this.onConnected = originalOnConnected;
|
|
1890
|
+
this.onError = originalOnError;
|
|
1883
1891
|
this.connectionPromise = void 0;
|
|
1884
1892
|
}
|
|
1885
1893
|
}
|