@livx.cc/agentx 0.96.17 → 0.96.18
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/cli.js +23 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1209,6 +1209,11 @@ declare class VoiceEngineOptions {
|
|
|
1209
1209
|
* as a barge and abort the fresh turn (live: mid-sentence self-interruption + steps=1→steps=0 double
|
|
1210
1210
|
* abort). Short enough that a genuine immediate barge ("no wait—") still lands right after. */
|
|
1211
1211
|
bargeGraceMs: number;
|
|
1212
|
+
/** Barge-in (talk over the assistant to interrupt). true = full-duplex (needs echo cancellation, or
|
|
1213
|
+
* the assistant's own TTS bleeds back and self-interrupts). false = HALF-DUPLEX: the engine is deaf
|
|
1214
|
+
* while audible (speaking + drain tail), so echo can never become a phantom turn — the right mode
|
|
1215
|
+
* when there's no AEC (e.g. the non-VPIO mic fallback) and no headphones. Cost: can't interrupt. */
|
|
1216
|
+
bargeIn: boolean;
|
|
1212
1217
|
/** Filler phrase spoken when holding for an incomplete utterance ('' disables). */
|
|
1213
1218
|
holdFiller: string;
|
|
1214
1219
|
/** Called when the engine holds an incomplete utterance (host can render a visual cue). */
|
|
@@ -1269,6 +1274,8 @@ declare class VoiceEngine {
|
|
|
1269
1274
|
constructor(options?: Partial<VoiceEngineOptions>);
|
|
1270
1275
|
start(): Promise<void>;
|
|
1271
1276
|
get usingAec(): boolean;
|
|
1277
|
+
/** Flip barge-in at runtime (e.g. the mic fell back to non-VPIO → go half-duplex so echo can't leak). */
|
|
1278
|
+
setBargeIn(on: boolean): void;
|
|
1272
1279
|
private idleWaiters;
|
|
1273
1280
|
private setState;
|
|
1274
1281
|
/** Resolve when the engine is no longer speaking (immediate if already idle). */
|
package/dist/index.js
CHANGED
|
@@ -5624,6 +5624,11 @@ var VoiceEngineOptions = class {
|
|
|
5624
5624
|
* as a barge and abort the fresh turn (live: mid-sentence self-interruption + steps=1→steps=0 double
|
|
5625
5625
|
* abort). Short enough that a genuine immediate barge ("no wait—") still lands right after. */
|
|
5626
5626
|
bargeGraceMs = 600;
|
|
5627
|
+
/** Barge-in (talk over the assistant to interrupt). true = full-duplex (needs echo cancellation, or
|
|
5628
|
+
* the assistant's own TTS bleeds back and self-interrupts). false = HALF-DUPLEX: the engine is deaf
|
|
5629
|
+
* while audible (speaking + drain tail), so echo can never become a phantom turn — the right mode
|
|
5630
|
+
* when there's no AEC (e.g. the non-VPIO mic fallback) and no headphones. Cost: can't interrupt. */
|
|
5631
|
+
bargeIn = true;
|
|
5627
5632
|
/** Filler phrase spoken when holding for an incomplete utterance ('' disables). */
|
|
5628
5633
|
holdFiller = "";
|
|
5629
5634
|
/** Called when the engine holds an incomplete utterance (host can render a visual cue). */
|
|
@@ -5717,6 +5722,10 @@ var VoiceEngine = class _VoiceEngine {
|
|
|
5717
5722
|
get usingAec() {
|
|
5718
5723
|
return this.stt.usingAec;
|
|
5719
5724
|
}
|
|
5725
|
+
/** Flip barge-in at runtime (e.g. the mic fell back to non-VPIO → go half-duplex so echo can't leak). */
|
|
5726
|
+
setBargeIn(on) {
|
|
5727
|
+
this.options.bargeIn = on;
|
|
5728
|
+
}
|
|
5720
5729
|
idleWaiters = [];
|
|
5721
5730
|
setState(s) {
|
|
5722
5731
|
if (this.state === s) return;
|
|
@@ -5868,6 +5877,7 @@ var VoiceEngine = class _VoiceEngine {
|
|
|
5868
5877
|
}
|
|
5869
5878
|
handlePartial(text) {
|
|
5870
5879
|
if (this.speaking) {
|
|
5880
|
+
if (!this.options.bargeIn) return;
|
|
5871
5881
|
if (now() < this.bargeGraceUntil) {
|
|
5872
5882
|
if (!this.echoActive() || (this.usingAec ? this.genuine(text) : this.novelWords(text).length >= 1)) this.options.onPartial(text);
|
|
5873
5883
|
return;
|
|
@@ -5943,7 +5953,7 @@ var VoiceEngine = class _VoiceEngine {
|
|
|
5943
5953
|
this.stt.reset();
|
|
5944
5954
|
return;
|
|
5945
5955
|
}
|
|
5946
|
-
if (this.echoActive() && (this.usingAec ? !this.genuine(text) : this.novelWords(text).length < 2)) {
|
|
5956
|
+
if (this.echoActive() && (!this.options.bargeIn || (this.usingAec ? !this.genuine(text) : this.novelWords(text).length < 2))) {
|
|
5947
5957
|
this.stt.reset();
|
|
5948
5958
|
return;
|
|
5949
5959
|
}
|