@absolutejs/voice 0.0.22-beta.594 → 0.0.22-beta.595
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 +6 -7
- package/dist/testing/index.js +6 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4639,13 +4639,11 @@ var createVoiceSession = (options) => {
|
|
|
4639
4639
|
if (!didComplete) {
|
|
4640
4640
|
return;
|
|
4641
4641
|
}
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
});
|
|
4648
|
-
}
|
|
4642
|
+
const onCompletePromise = shouldInvokeOnComplete ? Promise.resolve(options.route.onComplete({
|
|
4643
|
+
api,
|
|
4644
|
+
context: options.context,
|
|
4645
|
+
session
|
|
4646
|
+
})) : Promise.resolve();
|
|
4649
4647
|
if (disposition === "completed") {
|
|
4650
4648
|
await drainAssistantSpeech(lastTtsSendAt);
|
|
4651
4649
|
await assistantAudioQueue;
|
|
@@ -4708,6 +4706,7 @@ var createVoiceSession = (options) => {
|
|
|
4708
4706
|
session
|
|
4709
4707
|
});
|
|
4710
4708
|
}
|
|
4709
|
+
await onCompletePromise;
|
|
4711
4710
|
await options.route.onCallEnd?.({
|
|
4712
4711
|
api,
|
|
4713
4712
|
context: options.context,
|
package/dist/testing/index.js
CHANGED
|
@@ -6866,13 +6866,11 @@ var createVoiceSession = (options) => {
|
|
|
6866
6866
|
if (!didComplete) {
|
|
6867
6867
|
return;
|
|
6868
6868
|
}
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
});
|
|
6875
|
-
}
|
|
6869
|
+
const onCompletePromise = shouldInvokeOnComplete ? Promise.resolve(options.route.onComplete({
|
|
6870
|
+
api,
|
|
6871
|
+
context: options.context,
|
|
6872
|
+
session
|
|
6873
|
+
})) : Promise.resolve();
|
|
6876
6874
|
if (disposition === "completed") {
|
|
6877
6875
|
await drainAssistantSpeech(lastTtsSendAt);
|
|
6878
6876
|
await assistantAudioQueue;
|
|
@@ -6935,6 +6933,7 @@ var createVoiceSession = (options) => {
|
|
|
6935
6933
|
session
|
|
6936
6934
|
});
|
|
6937
6935
|
}
|
|
6936
|
+
await onCompletePromise;
|
|
6938
6937
|
await options.route.onCallEnd?.({
|
|
6939
6938
|
api,
|
|
6940
6939
|
context: options.context,
|