@voctiv/agent-runtime 0.1.0 → 0.2.0

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.
Files changed (154) hide show
  1. package/dist/barge-in/barge-in-module.d.ts +16 -0
  2. package/dist/barge-in/barge-in-module.d.ts.map +1 -1
  3. package/dist/barge-in/barge-in-module.js +26 -5
  4. package/dist/barge-in/barge-in-module.js.map +1 -1
  5. package/dist/barge-in/barge-in-service.d.ts +12 -4
  6. package/dist/barge-in/barge-in-service.d.ts.map +1 -1
  7. package/dist/barge-in/barge-in-service.js +32 -15
  8. package/dist/barge-in/barge-in-service.js.map +1 -1
  9. package/dist/barge-in/barge-in-strategy.d.ts +90 -5
  10. package/dist/barge-in/barge-in-strategy.d.ts.map +1 -1
  11. package/dist/barge-in/barge-in-strategy.js +405 -59
  12. package/dist/barge-in/barge-in-strategy.js.map +1 -1
  13. package/dist/barge-in/echo-cancellation.d.ts +21 -0
  14. package/dist/barge-in/echo-cancellation.d.ts.map +1 -0
  15. package/dist/barge-in/echo-cancellation.js +64 -0
  16. package/dist/barge-in/echo-cancellation.js.map +1 -0
  17. package/dist/barge-in/echo.d.ts +9 -0
  18. package/dist/barge-in/echo.d.ts.map +1 -0
  19. package/dist/barge-in/echo.js +46 -0
  20. package/dist/barge-in/echo.js.map +1 -0
  21. package/dist/barge-in/index.d.ts +9 -3
  22. package/dist/barge-in/index.d.ts.map +1 -1
  23. package/dist/barge-in/index.js +17 -1
  24. package/dist/barge-in/index.js.map +1 -1
  25. package/dist/barge-in/lexicon.d.ts +58 -0
  26. package/dist/barge-in/lexicon.d.ts.map +1 -0
  27. package/dist/barge-in/lexicon.js +140 -0
  28. package/dist/barge-in/lexicon.js.map +1 -0
  29. package/dist/barge-in/lexicons/en.d.ts +2 -0
  30. package/dist/barge-in/lexicons/en.d.ts.map +1 -0
  31. package/dist/barge-in/lexicons/en.js +36 -0
  32. package/dist/barge-in/lexicons/en.js.map +1 -0
  33. package/dist/barge-in/lexicons/id.d.ts +2 -0
  34. package/dist/barge-in/lexicons/id.d.ts.map +1 -0
  35. package/dist/barge-in/lexicons/id.js +39 -0
  36. package/dist/barge-in/lexicons/id.js.map +1 -0
  37. package/dist/barge-in/lexicons/index.d.ts +10 -0
  38. package/dist/barge-in/lexicons/index.d.ts.map +1 -0
  39. package/dist/barge-in/lexicons/index.js +11 -0
  40. package/dist/barge-in/lexicons/index.js.map +1 -0
  41. package/dist/barge-in/lexicons/ru.d.ts +2 -0
  42. package/dist/barge-in/lexicons/ru.d.ts.map +1 -0
  43. package/dist/barge-in/lexicons/ru.js +39 -0
  44. package/dist/barge-in/lexicons/ru.js.map +1 -0
  45. package/dist/barge-in/speech-ledger.d.ts +53 -0
  46. package/dist/barge-in/speech-ledger.d.ts.map +1 -0
  47. package/dist/barge-in/speech-ledger.js +237 -0
  48. package/dist/barge-in/speech-ledger.js.map +1 -0
  49. package/dist/barge-in/word-classifier.d.ts +25 -0
  50. package/dist/barge-in/word-classifier.d.ts.map +1 -0
  51. package/dist/barge-in/word-classifier.js +94 -0
  52. package/dist/barge-in/word-classifier.js.map +1 -0
  53. package/dist/core/container.d.ts +3 -0
  54. package/dist/core/container.d.ts.map +1 -1
  55. package/dist/core/container.js +64 -2
  56. package/dist/core/container.js.map +1 -1
  57. package/dist/core/create-agent-script.d.ts +4 -0
  58. package/dist/core/create-agent-script.d.ts.map +1 -1
  59. package/dist/core/create-agent-script.js +159 -52
  60. package/dist/core/create-agent-script.js.map +1 -1
  61. package/dist/core/define-module.d.ts +23 -0
  62. package/dist/core/define-module.d.ts.map +1 -0
  63. package/dist/core/define-module.js +55 -0
  64. package/dist/core/define-module.js.map +1 -0
  65. package/dist/core/index.d.ts +1 -0
  66. package/dist/core/index.d.ts.map +1 -1
  67. package/dist/core/index.js +1 -0
  68. package/dist/core/index.js.map +1 -1
  69. package/dist/core/media-bootstrap.d.ts +4 -2
  70. package/dist/core/media-bootstrap.d.ts.map +1 -1
  71. package/dist/core/media-bootstrap.js +33 -2
  72. package/dist/core/media-bootstrap.js.map +1 -1
  73. package/dist/core/version.d.ts +1 -1
  74. package/dist/core/version.js +1 -1
  75. package/dist/dialog/basic-ports.d.ts +10 -3
  76. package/dist/dialog/basic-ports.d.ts.map +1 -1
  77. package/dist/dialog/basic-ports.js +73 -9
  78. package/dist/dialog/basic-ports.js.map +1 -1
  79. package/dist/dialog/define-dialog.d.ts +21 -0
  80. package/dist/dialog/define-dialog.d.ts.map +1 -0
  81. package/dist/dialog/define-dialog.js +21 -0
  82. package/dist/dialog/define-dialog.js.map +1 -0
  83. package/dist/dialog/dialog-definition.d.ts +12 -0
  84. package/dist/dialog/dialog-definition.d.ts.map +1 -1
  85. package/dist/dialog/dialog-definition.js.map +1 -1
  86. package/dist/dialog/index.d.ts +1 -0
  87. package/dist/dialog/index.d.ts.map +1 -1
  88. package/dist/dialog/index.js +1 -0
  89. package/dist/dialog/index.js.map +1 -1
  90. package/dist/dialog/online-call-host.d.ts +21 -4
  91. package/dist/dialog/online-call-host.d.ts.map +1 -1
  92. package/dist/dialog/online-call-host.js +170 -31
  93. package/dist/dialog/online-call-host.js.map +1 -1
  94. package/dist/dialog/online-call-module.d.ts +2 -0
  95. package/dist/dialog/online-call-module.d.ts.map +1 -1
  96. package/dist/dialog/online-call-module.js +8 -0
  97. package/dist/dialog/online-call-module.js.map +1 -1
  98. package/dist/dialog-events/active-media.d.ts +30 -4
  99. package/dist/dialog-events/active-media.d.ts.map +1 -1
  100. package/dist/dialog-events/active-media.js +111 -10
  101. package/dist/dialog-events/active-media.js.map +1 -1
  102. package/dist/dialog-events/overtalk-source.d.ts +13 -1
  103. package/dist/dialog-events/overtalk-source.d.ts.map +1 -1
  104. package/dist/dialog-events/overtalk-source.js +79 -10
  105. package/dist/dialog-events/overtalk-source.js.map +1 -1
  106. package/dist/dialog-events/virtual-finals-module.d.ts.map +1 -1
  107. package/dist/dialog-events/virtual-finals-module.js +1 -6
  108. package/dist/dialog-events/virtual-finals-module.js.map +1 -1
  109. package/dist/dialog-events/virtual-finals.d.ts +10 -1
  110. package/dist/dialog-events/virtual-finals.d.ts.map +1 -1
  111. package/dist/dialog-events/virtual-finals.js +4 -6
  112. package/dist/dialog-events/virtual-finals.js.map +1 -1
  113. package/dist/index.d.ts +1 -1
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +2 -1
  116. package/dist/index.js.map +1 -1
  117. package/dist/llm/index.d.ts +3 -1
  118. package/dist/llm/index.d.ts.map +1 -1
  119. package/dist/llm/index.js +5 -1
  120. package/dist/llm/index.js.map +1 -1
  121. package/dist/llm/llm-markers.d.ts +6 -0
  122. package/dist/llm/llm-markers.d.ts.map +1 -1
  123. package/dist/llm/llm-markers.js +22 -14
  124. package/dist/llm/llm-markers.js.map +1 -1
  125. package/dist/llm/llm-module.d.ts +20 -0
  126. package/dist/llm/llm-module.d.ts.map +1 -0
  127. package/dist/llm/llm-module.js +26 -0
  128. package/dist/llm/llm-module.js.map +1 -0
  129. package/dist/match/index.d.ts +1 -1
  130. package/dist/match/index.d.ts.map +1 -1
  131. package/dist/match/index.js +2 -1
  132. package/dist/match/index.js.map +1 -1
  133. package/dist/match/match.d.ts +5 -0
  134. package/dist/match/match.d.ts.map +1 -1
  135. package/dist/match/match.js +18 -1
  136. package/dist/match/match.js.map +1 -1
  137. package/dist/testing/fake-channel.d.ts +20 -0
  138. package/dist/testing/fake-channel.d.ts.map +1 -0
  139. package/dist/testing/fake-channel.js +113 -0
  140. package/dist/testing/fake-channel.js.map +1 -0
  141. package/dist/testing/index.d.ts +2 -0
  142. package/dist/testing/index.d.ts.map +1 -0
  143. package/dist/testing/index.js +6 -0
  144. package/dist/testing/index.js.map +1 -0
  145. package/docs/agents/README.md +6 -2
  146. package/docs/agents/barge-in.md +67 -0
  147. package/docs/agents/dialog.md +4 -2
  148. package/docs/agents/getting-started.md +5 -1
  149. package/docs/agents/modules.md +7 -2
  150. package/docs/agents/phases.md +20 -2
  151. package/docs/framework/README.md +1 -0
  152. package/docs/framework/extending.md +4 -0
  153. package/docs/framework/idn-parity.md +18 -0
  154. package/package.json +7 -2
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EchoCancellationBootstrap = exports.EchoCancelFlag = exports.ECHO_CANCELLATION = void 0;
16
+ const tsyringe_1 = require("tsyringe");
17
+ const decorators_1 = require("../core/decorators");
18
+ const hooks_1 = require("../core/hooks");
19
+ const tokens_1 = require("../core/tokens");
20
+ exports.ECHO_CANCELLATION = 'ECHO_CANCELLATION';
21
+ /**
22
+ * Mutable so barge-in can see the host result after onOnlineEarly
23
+ * and before the strategy attaches on onOnlineCall.
24
+ */
25
+ class EchoCancelFlag {
26
+ constructor(enabled, options) {
27
+ this.enabled = enabled;
28
+ this.options = options;
29
+ this.applied = false;
30
+ }
31
+ }
32
+ exports.EchoCancelFlag = EchoCancelFlag;
33
+ let EchoCancellationBootstrap = class EchoCancellationBootstrap {
34
+ constructor(channel, flag, logger) {
35
+ this.channel = channel;
36
+ this.flag = flag;
37
+ this.logger = logger;
38
+ }
39
+ async onOnlineEarly() {
40
+ const set = this.channel.audio.setEchoCancellation;
41
+ if (typeof set !== 'function')
42
+ return;
43
+ const state = await set.call(this.channel.audio, this.flag.enabled, this.flag.options);
44
+ this.flag.applied = state.enabled === true;
45
+ const log = this.logger?.log;
46
+ if (typeof log === 'function') {
47
+ log.call(this.logger, 'runtime: echo_cancellation', {
48
+ supported: state.supported,
49
+ enabled: state.enabled,
50
+ reason: state.reason,
51
+ });
52
+ }
53
+ }
54
+ };
55
+ exports.EchoCancellationBootstrap = EchoCancellationBootstrap;
56
+ exports.EchoCancellationBootstrap = EchoCancellationBootstrap = __decorate([
57
+ (0, decorators_1.Injectable)(),
58
+ (0, hooks_1.PhaseOrder)(-200),
59
+ __param(0, (0, tsyringe_1.inject)(tokens_1.CHANNEL)),
60
+ __param(1, (0, tsyringe_1.inject)(exports.ECHO_CANCELLATION)),
61
+ __param(2, (0, tsyringe_1.inject)(tokens_1.LOGGER, { isOptional: true })),
62
+ __metadata("design:paramtypes", [Object, EchoCancelFlag, Object])
63
+ ], EchoCancellationBootstrap);
64
+ //# sourceMappingURL=echo-cancellation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echo-cancellation.js","sourceRoot":"","sources":["../../src/barge-in/echo-cancellation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uCAAkC;AAElC,mDAAgD;AAChD,yCAA+D;AAC/D,2CAAiD;AAEpC,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AAErD;;;GAGG;AACH,MAAa,cAAc;IAGzB,YACW,OAAgB,EAChB,OAAiC;QADjC,YAAO,GAAP,OAAO,CAAS;QAChB,YAAO,GAAP,OAAO,CAA0B;QAJ5C,YAAO,GAAG,KAAK,CAAC;IAKb,CAAC;CACL;AAPD,wCAOC;AAIM,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACpC,YACoC,OAAqB,EACX,IAAoB,EAE/C,MAAqB;QAHJ,YAAO,GAAP,OAAO,CAAc;QACX,SAAI,GAAJ,IAAI,CAAgB;QAE/C,WAAM,GAAN,MAAM,CAAe;IACrC,CAAC;IAEJ,KAAK,CAAC,aAAa;QACjB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC;QACnD,IAAI,OAAO,GAAG,KAAK,UAAU;YAAE,OAAO;QACtC,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;QAC7B,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;YAC9B,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,4BAA4B,EAAE;gBAClD,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAA;AAtBY,8DAAyB;oCAAzB,yBAAyB;IAFrC,IAAA,uBAAU,GAAE;IACZ,IAAA,kBAAU,EAAC,CAAC,GAAG,CAAC;IAGZ,WAAA,IAAA,iBAAM,EAAC,gBAAO,CAAC,CAAA;IACf,WAAA,IAAA,iBAAM,EAAC,yBAAiB,CAAC,CAAA;IACzB,WAAA,IAAA,iBAAM,EAAC,eAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;6CADa,cAAc;GAHvD,yBAAyB,CAsBrC"}
@@ -0,0 +1,9 @@
1
+ /** Split normalized speech into words. Punctuation is a separator. */
2
+ export declare function speechWords(text: string): string[];
3
+ /**
4
+ * Drop runs of `minRun` or more consecutive words that also appear, in order, in
5
+ * `agentText`. The partial's last word may be cut mid-word, so a prefix of at least
6
+ * 3 characters counts. Returns the remaining words joined by spaces.
7
+ */
8
+ export declare function stripAgentEcho(partial: string, agentText: string, minRun: number): string;
9
+ //# sourceMappingURL=echo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echo.d.ts","sourceRoot":"","sources":["../../src/barge-in/echo.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAuBR"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripAgentEcho = exports.speechWords = void 0;
4
+ /** Split normalized speech into words. Punctuation is a separator. */
5
+ function speechWords(text) {
6
+ return text
7
+ .toLowerCase()
8
+ .replace(/ё/g, 'е')
9
+ .split(/[^\p{L}\p{N}]+/u)
10
+ .filter((w) => w.length > 0);
11
+ }
12
+ exports.speechWords = speechWords;
13
+ /**
14
+ * Drop runs of `minRun` or more consecutive words that also appear, in order, in
15
+ * `agentText`. The partial's last word may be cut mid-word, so a prefix of at least
16
+ * 3 characters counts. Returns the remaining words joined by spaces.
17
+ */
18
+ function stripAgentEcho(partial, agentText, minRun) {
19
+ const p = speechWords(partial);
20
+ const a = speechWords(agentText);
21
+ if (minRun <= 0 || a.length === 0 || p.length < minRun)
22
+ return p.join(' ');
23
+ const wordMatches = (i, j) => p[i] === a[j] ||
24
+ (i === p.length - 1 && p[i].length >= 3 && a[j].startsWith(p[i]));
25
+ const kept = [];
26
+ let i = 0;
27
+ while (i < p.length) {
28
+ let best = 0;
29
+ for (let j = 0; j < a.length; j++) {
30
+ let k = 0;
31
+ while (i + k < p.length && j + k < a.length && wordMatches(i + k, j + k))
32
+ k++;
33
+ if (k > best)
34
+ best = k;
35
+ }
36
+ if (best >= minRun)
37
+ i += best;
38
+ else {
39
+ kept.push(p[i]);
40
+ i++;
41
+ }
42
+ }
43
+ return kept.join(' ');
44
+ }
45
+ exports.stripAgentEcho = stripAgentEcho;
46
+ //# sourceMappingURL=echo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"echo.js","sourceRoot":"","sources":["../../src/barge-in/echo.ts"],"names":[],"mappings":";;;AAAA,sEAAsE;AACtE,SAAgB,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI;SACR,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;SAClB,KAAK,CAAC,iBAAiB,CAAC;SACxB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC;AAND,kCAMC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,OAAe,EACf,SAAiB,EACjB,MAAc;IAEd,MAAM,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IACjC,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;QAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3E,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,CAAS,EAAW,EAAE,CACpD,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACb,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC;IACvE,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;gBAAE,CAAC,EAAE,CAAC;YAC9E,IAAI,CAAC,GAAG,IAAI;gBAAE,IAAI,GAAG,CAAC,CAAC;QACzB,CAAC;QACD,IAAI,IAAI,IAAI,MAAM;YAAE,CAAC,IAAI,IAAI,CAAC;aACzB,CAAC;YACJ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;YACjB,CAAC,EAAE,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AA3BD,wCA2BC"}
@@ -1,7 +1,13 @@
1
- export { BargeIn } from './barge-in-strategy';
2
- export type { BargeInStrategy, BargeInBinding, BargeInEvent, BargeInAttachCtx, BargeInReason, } from './barge-in-strategy';
3
- export { BargeInService, BargeInRegistry, BARGE_IN_REGISTRY, } from './barge-in-service';
1
+ export { BargeIn, BargePresets } from './barge-in-strategy';
2
+ export type { BargeInStrategy, BargeInBinding, BargeInEvent, BargeInAttachCtx, BargeInReason, BargeInPhase, LexiconInput, } from './barge-in-strategy';
3
+ export { BargeInService, BargeInRegistry, BARGE_IN_REGISTRY, BARGE_LEXICON, } from './barge-in-service';
4
4
  export type { BargeInBindingConfig } from './barge-in-service';
5
5
  export { BargeInModule } from './barge-in-module';
6
6
  export type { BargeInModuleOptions } from './barge-in-module';
7
+ export { SpeechLedger } from './speech-ledger';
8
+ export { word, defineBargeLexicon, mergeLexicons, compileLexicon } from './lexicon';
9
+ export type { BargeLexicon, LexiconPart, CompiledLexicon } from './lexicon';
10
+ export { BargeLexicons } from './lexicons';
11
+ export { stripAgentEcho } from './echo';
12
+ export { classifyPartial, assertLexiconSamples } from './word-classifier';
7
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/barge-in/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/barge-in/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpF,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BargeInModule = exports.BARGE_IN_REGISTRY = exports.BargeInRegistry = exports.BargeInService = exports.BargeIn = void 0;
3
+ exports.assertLexiconSamples = exports.classifyPartial = exports.stripAgentEcho = exports.BargeLexicons = exports.compileLexicon = exports.mergeLexicons = exports.defineBargeLexicon = exports.word = exports.SpeechLedger = exports.BargeInModule = exports.BARGE_LEXICON = exports.BARGE_IN_REGISTRY = exports.BargeInRegistry = exports.BargeInService = exports.BargePresets = exports.BargeIn = void 0;
4
4
  var barge_in_strategy_1 = require("./barge-in-strategy");
5
5
  Object.defineProperty(exports, "BargeIn", { enumerable: true, get: function () { return barge_in_strategy_1.BargeIn; } });
6
+ Object.defineProperty(exports, "BargePresets", { enumerable: true, get: function () { return barge_in_strategy_1.BargePresets; } });
6
7
  var barge_in_service_1 = require("./barge-in-service");
7
8
  Object.defineProperty(exports, "BargeInService", { enumerable: true, get: function () { return barge_in_service_1.BargeInService; } });
8
9
  Object.defineProperty(exports, "BargeInRegistry", { enumerable: true, get: function () { return barge_in_service_1.BargeInRegistry; } });
9
10
  Object.defineProperty(exports, "BARGE_IN_REGISTRY", { enumerable: true, get: function () { return barge_in_service_1.BARGE_IN_REGISTRY; } });
11
+ Object.defineProperty(exports, "BARGE_LEXICON", { enumerable: true, get: function () { return barge_in_service_1.BARGE_LEXICON; } });
10
12
  var barge_in_module_1 = require("./barge-in-module");
11
13
  Object.defineProperty(exports, "BargeInModule", { enumerable: true, get: function () { return barge_in_module_1.BargeInModule; } });
14
+ var speech_ledger_1 = require("./speech-ledger");
15
+ Object.defineProperty(exports, "SpeechLedger", { enumerable: true, get: function () { return speech_ledger_1.SpeechLedger; } });
16
+ var lexicon_1 = require("./lexicon");
17
+ Object.defineProperty(exports, "word", { enumerable: true, get: function () { return lexicon_1.word; } });
18
+ Object.defineProperty(exports, "defineBargeLexicon", { enumerable: true, get: function () { return lexicon_1.defineBargeLexicon; } });
19
+ Object.defineProperty(exports, "mergeLexicons", { enumerable: true, get: function () { return lexicon_1.mergeLexicons; } });
20
+ Object.defineProperty(exports, "compileLexicon", { enumerable: true, get: function () { return lexicon_1.compileLexicon; } });
21
+ var lexicons_1 = require("./lexicons");
22
+ Object.defineProperty(exports, "BargeLexicons", { enumerable: true, get: function () { return lexicons_1.BargeLexicons; } });
23
+ var echo_1 = require("./echo");
24
+ Object.defineProperty(exports, "stripAgentEcho", { enumerable: true, get: function () { return echo_1.stripAgentEcho; } });
25
+ var word_classifier_1 = require("./word-classifier");
26
+ Object.defineProperty(exports, "classifyPartial", { enumerable: true, get: function () { return word_classifier_1.classifyPartial; } });
27
+ Object.defineProperty(exports, "assertLexiconSamples", { enumerable: true, get: function () { return word_classifier_1.assertLexiconSamples; } });
12
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/barge-in/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8C;AAArC,4GAAA,OAAO,OAAA;AAQhB,uDAI4B;AAH1B,kHAAA,cAAc,OAAA;AACd,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AAGnB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/barge-in/index.ts"],"names":[],"mappings":";;;AAAA,yDAA4D;AAAnD,4GAAA,OAAO,OAAA;AAAE,iHAAA,YAAY,OAAA;AAU9B,uDAK4B;AAJ1B,kHAAA,cAAc,OAAA;AACd,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AACjB,iHAAA,aAAa,OAAA;AAGf,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAEtB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,qCAAoF;AAA3E,+FAAA,IAAI,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,wGAAA,aAAa,OAAA;AAAE,yGAAA,cAAc,OAAA;AAEhE,uCAA2C;AAAlC,yGAAA,aAAa,OAAA;AACtB,+BAAwC;AAA/B,sGAAA,cAAc,OAAA;AACvB,qDAA0E;AAAjE,kHAAA,eAAe,OAAA;AAAE,uHAAA,oBAAoB,OAAA"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Barge-in word lists. Every entry is a RegExp matched against the normalized partial
3
+ * (lowercase, ё→е, punctuation turned into spaces). JS `\b` is ASCII-only, so use {@link word}.
4
+ */
5
+ export interface BargeLexicon {
6
+ readonly language: string;
7
+ /** Any match stops the agent immediately, even a single word. */
8
+ readonly interrupt: readonly RegExp[];
9
+ /** Cut out of the partial. If nothing remains, the partial never stops the agent. */
10
+ readonly backchannel: readonly RegExp[];
11
+ /** Cut out before content words are counted. */
12
+ readonly fillers: readonly RegExp[];
13
+ readonly answers?: {
14
+ yes: readonly RegExp[];
15
+ no: readonly RegExp[];
16
+ };
17
+ /**
18
+ * Checked at startup. Each interrupt sample must match `interrupt`; each backchannel
19
+ * sample must not. This is how overlapping lists are caught — two regexes cannot be
20
+ * compared for overlap in general.
21
+ */
22
+ readonly samples?: {
23
+ interrupt?: readonly string[];
24
+ backchannel?: readonly string[];
25
+ };
26
+ }
27
+ export type LexiconPart = Partial<BargeLexicon> & {
28
+ replace?: boolean;
29
+ };
30
+ /**
31
+ * Unicode-safe whole-word wrapper.
32
+ * `word('подожд\\p{L}*')` does not match inside "стопка".
33
+ * Flags `g` and `y` are dropped so `lastIndex` cannot make repeated tests flaky.
34
+ */
35
+ export declare function word(source: string, flags?: string): RegExp;
36
+ /** Structural check. Sample verdicts are checked by {@link assertLexiconSamples}. */
37
+ export declare function defineBargeLexicon(lex: BargeLexicon): BargeLexicon;
38
+ export declare function mergeLexicons(...parts: Array<BargeLexicon | LexiconPart>): BargeLexicon;
39
+ export interface CompiledLexicon {
40
+ readonly language: string;
41
+ readonly interrupt: readonly RegExp[];
42
+ readonly backchannel: readonly RegExp[];
43
+ readonly fillers: readonly RegExp[];
44
+ /** Global copies used to cut matches out of the partial. */
45
+ readonly backchannelCut: readonly RegExp[];
46
+ readonly fillersCut: readonly RegExp[];
47
+ readonly answers?: {
48
+ yes: readonly RegExp[];
49
+ no: readonly RegExp[];
50
+ };
51
+ readonly samples?: BargeLexicon['samples'];
52
+ }
53
+ /** Clone patterns with `i`+`u`, strip `g`/`y`, and build global copies for cutting. */
54
+ export declare function compileLexicon(lex: BargeLexicon): CompiledLexicon;
55
+ /** Lowercase, ё→е, punctuation to spaces. Regexes run on this string. */
56
+ export declare function normalizePartial(text: string): string;
57
+ export declare function countWords(text: string): number;
58
+ //# sourceMappingURL=lexicon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicon.d.ts","sourceRoot":"","sources":["../../src/barge-in/lexicon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,qFAAqF;IACrF,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,gDAAgD;IAChD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,OAAO,CAAC,E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C;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,GAAG,eAAe,CAmBjE;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/C"}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ /**
3
+ * Barge-in word lists. Every entry is a RegExp matched against the normalized partial
4
+ * (lowercase, ё→е, punctuation turned into spaces). JS `\b` is ASCII-only, so use {@link word}.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.countWords = exports.normalizePartial = exports.compileLexicon = exports.mergeLexicons = exports.defineBargeLexicon = exports.word = void 0;
8
+ const SPOKEN = /[\p{L}\p{N}]/u;
9
+ /**
10
+ * Unicode-safe whole-word wrapper.
11
+ * `word('подожд\\p{L}*')` does not match inside "стопка".
12
+ * Flags `g` and `y` are dropped so `lastIndex` cannot make repeated tests flaky.
13
+ */
14
+ function word(source, flags) {
15
+ const set = new Set([...(flags ?? ''), 'i', 'u']);
16
+ set.delete('g');
17
+ set.delete('y');
18
+ return new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, [...set].join(''));
19
+ }
20
+ exports.word = word;
21
+ /** Structural check. Sample verdicts are checked by {@link assertLexiconSamples}. */
22
+ function defineBargeLexicon(lex) {
23
+ validateList(lex.language, 'interrupt', lex.interrupt);
24
+ validateList(lex.language, 'backchannel', lex.backchannel);
25
+ validateList(lex.language, 'fillers', lex.fillers);
26
+ if (lex.answers) {
27
+ validateList(lex.language, 'answers.yes', lex.answers.yes);
28
+ validateList(lex.language, 'answers.no', lex.answers.no);
29
+ }
30
+ return lex;
31
+ }
32
+ exports.defineBargeLexicon = defineBargeLexicon;
33
+ function mergeLexicons(...parts) {
34
+ let language = 'custom';
35
+ let interrupt = [];
36
+ let backchannel = [];
37
+ let fillers = [];
38
+ let yes = [];
39
+ let no = [];
40
+ let samples;
41
+ for (const part of parts) {
42
+ if (part.language)
43
+ language = part.language;
44
+ const replace = 'replace' in part && part.replace === true;
45
+ if (part.interrupt)
46
+ interrupt = replace ? [...part.interrupt] : [...interrupt, ...part.interrupt];
47
+ if (part.backchannel) {
48
+ backchannel = replace ? [...part.backchannel] : [...backchannel, ...part.backchannel];
49
+ }
50
+ if (part.fillers)
51
+ fillers = replace ? [...part.fillers] : [...fillers, ...part.fillers];
52
+ if (part.answers?.yes)
53
+ yes = replace ? [...part.answers.yes] : [...yes, ...part.answers.yes];
54
+ if (part.answers?.no)
55
+ no = replace ? [...part.answers.no] : [...no, ...part.answers.no];
56
+ if (part.samples)
57
+ samples = part.samples;
58
+ }
59
+ return defineBargeLexicon({
60
+ language,
61
+ interrupt,
62
+ backchannel,
63
+ fillers,
64
+ answers: yes.length || no.length ? { yes, no } : undefined,
65
+ samples,
66
+ });
67
+ }
68
+ exports.mergeLexicons = mergeLexicons;
69
+ /** Clone patterns with `i`+`u`, strip `g`/`y`, and build global copies for cutting. */
70
+ function compileLexicon(lex) {
71
+ const interrupt = lex.interrupt.map((re) => compileOne(re, false));
72
+ const backchannel = lex.backchannel.map((re) => compileOne(re, false));
73
+ const fillers = lex.fillers.map((re) => compileOne(re, false));
74
+ return {
75
+ language: lex.language,
76
+ interrupt,
77
+ backchannel,
78
+ fillers,
79
+ backchannelCut: lex.backchannel.map((re) => compileOne(re, true)),
80
+ fillersCut: lex.fillers.map((re) => compileOne(re, true)),
81
+ answers: lex.answers
82
+ ? {
83
+ yes: lex.answers.yes.map((re) => compileOne(re, false)),
84
+ no: lex.answers.no.map((re) => compileOne(re, false)),
85
+ }
86
+ : undefined,
87
+ samples: lex.samples,
88
+ };
89
+ }
90
+ exports.compileLexicon = compileLexicon;
91
+ /** Lowercase, ё→е, punctuation to spaces. Regexes run on this string. */
92
+ function normalizePartial(text) {
93
+ return text
94
+ .toLowerCase()
95
+ .replace(/ё/g, 'е')
96
+ .replace(/[^\p{L}\p{N}]+/gu, ' ')
97
+ .replace(/\s+/g, ' ')
98
+ .trim();
99
+ }
100
+ exports.normalizePartial = normalizePartial;
101
+ function countWords(text) {
102
+ if (!text || !SPOKEN.test(text))
103
+ return 0;
104
+ return text.split(/\s+/).filter((w) => SPOKEN.test(w)).length;
105
+ }
106
+ exports.countWords = countWords;
107
+ function validateList(language, list, patterns) {
108
+ patterns.forEach((re, index) => {
109
+ if (!(re instanceof RegExp)) {
110
+ throw lexiconError(language, list, index, String(re), 'entry is not a RegExp');
111
+ }
112
+ let flags = re.flags.replace(/[gy]/g, '');
113
+ if (!flags.includes('u'))
114
+ flags += 'u';
115
+ let compiled;
116
+ try {
117
+ compiled = new RegExp(re.source, flags);
118
+ }
119
+ catch (err) {
120
+ throw lexiconError(language, list, index, re.source, err instanceof Error ? err.message : String(err));
121
+ }
122
+ if (compiled.test('')) {
123
+ throw lexiconError(language, list, index, re.source, 'pattern matches the empty string');
124
+ }
125
+ });
126
+ }
127
+ function lexiconError(language, list, index, source, reason) {
128
+ return new Error(`runtime: barge lexicon invalid language=${language} list=${list} index=${index} source=${source} reason=${reason}`);
129
+ }
130
+ function compileOne(re, global) {
131
+ let flags = re.flags.replace(/[gy]/g, '');
132
+ if (!flags.includes('i'))
133
+ flags += 'i';
134
+ if (!flags.includes('u'))
135
+ flags += 'u';
136
+ if (global && !flags.includes('g'))
137
+ flags += 'g';
138
+ return new RegExp(re.source, flags);
139
+ }
140
+ //# sourceMappingURL=lexicon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicon.js","sourceRoot":"","sources":["../../src/barge-in/lexicon.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAqBH,MAAM,MAAM,GAAG,eAAe,CAAC;AAE/B;;;;GAIG;AACH,SAAgB,IAAI,CAAC,MAAc,EAAE,KAAc;IACjD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,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,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,KAAK,IAAI,GAAG,CAAC;IACjD,OAAO,IAAI,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const en: import("../lexicon").BargeLexicon;
2
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/barge-in/lexicons/en.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,mCA8Bb,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.en = void 0;
4
+ const lexicon_1 = require("../lexicon");
5
+ exports.en = (0, lexicon_1.defineBargeLexicon)({
6
+ language: 'en',
7
+ interrupt: [
8
+ (0, lexicon_1.word)('stop'),
9
+ (0, lexicon_1.word)('wait'),
10
+ (0, lexicon_1.word)('hold\\s+on'),
11
+ (0, lexicon_1.word)('hang\\s+on'),
12
+ (0, lexicon_1.word)('one\\s+second'),
13
+ (0, lexicon_1.word)('shut\\s+up'),
14
+ (0, lexicon_1.word)('enough'),
15
+ ],
16
+ backchannel: [
17
+ (0, lexicon_1.word)('uh-?huh'),
18
+ (0, lexicon_1.word)('mhm'),
19
+ (0, lexicon_1.word)('yeah(?:\\s+yeah)+'),
20
+ (0, lexicon_1.word)('yep'),
21
+ (0, lexicon_1.word)('ok(?:ay)?'),
22
+ (0, lexicon_1.word)('right'),
23
+ (0, lexicon_1.word)('i\\s+see'),
24
+ (0, lexicon_1.word)('got\\s+it'),
25
+ ],
26
+ fillers: [(0, lexicon_1.word)('uh+'), (0, lexicon_1.word)('um+'), (0, lexicon_1.word)('er+'), (0, lexicon_1.word)('like')],
27
+ answers: {
28
+ yes: [(0, lexicon_1.word)('yes'), (0, lexicon_1.word)('yeah'), (0, lexicon_1.word)('yep'), (0, lexicon_1.word)('sure')],
29
+ no: [(0, lexicon_1.word)('no'), (0, lexicon_1.word)('nope')],
30
+ },
31
+ samples: {
32
+ interrupt: ['stop', 'hold on', 'wait a minute'],
33
+ backchannel: ['mhm', 'okay', 'yeah yeah'],
34
+ },
35
+ });
36
+ //# sourceMappingURL=en.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/barge-in/lexicons/en.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEzC,QAAA,EAAE,GAAG,IAAA,4BAAkB,EAAC;IACnC,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE;QACT,IAAA,cAAI,EAAC,MAAM,CAAC;QACZ,IAAA,cAAI,EAAC,MAAM,CAAC;QACZ,IAAA,cAAI,EAAC,YAAY,CAAC;QAClB,IAAA,cAAI,EAAC,YAAY,CAAC;QAClB,IAAA,cAAI,EAAC,eAAe,CAAC;QACrB,IAAA,cAAI,EAAC,YAAY,CAAC;QAClB,IAAA,cAAI,EAAC,QAAQ,CAAC;KACf;IACD,WAAW,EAAE;QACX,IAAA,cAAI,EAAC,SAAS,CAAC;QACf,IAAA,cAAI,EAAC,KAAK,CAAC;QACX,IAAA,cAAI,EAAC,mBAAmB,CAAC;QACzB,IAAA,cAAI,EAAC,KAAK,CAAC;QACX,IAAA,cAAI,EAAC,WAAW,CAAC;QACjB,IAAA,cAAI,EAAC,OAAO,CAAC;QACb,IAAA,cAAI,EAAC,UAAU,CAAC;QAChB,IAAA,cAAI,EAAC,WAAW,CAAC;KAClB;IACD,OAAO,EAAE,CAAC,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC,CAAC;IAC9D,OAAO,EAAE;QACP,GAAG,EAAE,CAAC,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC,EAAE,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC,CAAC;QAC3D,EAAE,EAAE,CAAC,IAAA,cAAI,EAAC,IAAI,CAAC,EAAE,IAAA,cAAI,EAAC,MAAM,CAAC,CAAC;KAC/B;IACD,OAAO,EAAE;QACP,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC;QAC/C,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC;KAC1C;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const id: import("../lexicon").BargeLexicon;
2
+ //# sourceMappingURL=id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/barge-in/lexicons/id.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,EAAE,mCAsBb,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.id = void 0;
4
+ const lexicon_1 = require("../lexicon");
5
+ /**
6
+ * Interrupt list is the IDN `BARGE_IN_INTERRUPT_PATTERNS` set (LOTASK-1275), already regexes.
7
+ * A single "halo" does not interrupt; "halo halo" does.
8
+ */
9
+ const INTERRUPT = [
10
+ /(^|\s)(stop|(ber)?henti(kan)?)(\s|$)/i,
11
+ /(^|\s)(tunggu|sebentar|bentar)(?!\slagi)(\s|$)/i,
12
+ /(^|\s)(diam|cukup|permisi)(\s|$)/i,
13
+ /(^|\s)deng[ae]r(in|kan)?\s(dulu|saya|aku)(\s|$)/i,
14
+ /(^|\s)(halo|hai|hey|woi|mas|mbak|pak|bu|ibu|bang|kak)\s(halo|hai|hey|woi|mas|mbak|pak|bu|ibu|bang|kak)(\s(halo|hai|hey|woi|mas|mbak|pak|bu|ibu|bang|kak))?(\s|$)/i,
15
+ ];
16
+ exports.id = (0, lexicon_1.defineBargeLexicon)({
17
+ language: 'id',
18
+ interrupt: INTERRUPT,
19
+ backchannel: [
20
+ (0, lexicon_1.word)('iya+'),
21
+ (0, lexicon_1.word)('ya+'),
22
+ (0, lexicon_1.word)('oke'),
23
+ (0, lexicon_1.word)('ok'),
24
+ (0, lexicon_1.word)('baik'),
25
+ (0, lexicon_1.word)('he+m+'),
26
+ (0, lexicon_1.word)('hm+'),
27
+ (0, lexicon_1.word)('halo'),
28
+ ],
29
+ fillers: [(0, lexicon_1.word)('eh+'), (0, lexicon_1.word)('uh+'), (0, lexicon_1.word)('um+')],
30
+ answers: {
31
+ yes: [(0, lexicon_1.word)('iya'), (0, lexicon_1.word)('ya'), (0, lexicon_1.word)('betul'), (0, lexicon_1.word)('benar')],
32
+ no: [(0, lexicon_1.word)('tidak'), (0, lexicon_1.word)('bukan'), (0, lexicon_1.word)('enggak'), (0, lexicon_1.word)('nggak')],
33
+ },
34
+ samples: {
35
+ interrupt: ['stop', 'tunggu', 'halo halo', 'berhenti'],
36
+ backchannel: ['iya', 'oke', 'halo', 'hm'],
37
+ },
38
+ });
39
+ //# sourceMappingURL=id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../../../src/barge-in/lexicons/id.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEtD;;;GAGG;AACH,MAAM,SAAS,GAAsB;IACnC,uCAAuC;IACvC,iDAAiD;IACjD,mCAAmC;IACnC,kDAAkD;IAClD,mKAAmK;CACpK,CAAC;AAEW,QAAA,EAAE,GAAG,IAAA,4BAAkB,EAAC;IACnC,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE;QACX,IAAA,cAAI,EAAC,MAAM,CAAC;QACZ,IAAA,cAAI,EAAC,KAAK,CAAC;QACX,IAAA,cAAI,EAAC,KAAK,CAAC;QACX,IAAA,cAAI,EAAC,IAAI,CAAC;QACV,IAAA,cAAI,EAAC,MAAM,CAAC;QACZ,IAAA,cAAI,EAAC,OAAO,CAAC;QACb,IAAA,cAAI,EAAC,KAAK,CAAC;QACX,IAAA,cAAI,EAAC,MAAM,CAAC;KACb;IACD,OAAO,EAAE,CAAC,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,KAAK,CAAC,CAAC;IAChD,OAAO,EAAE;QACP,GAAG,EAAE,CAAC,IAAA,cAAI,EAAC,KAAK,CAAC,EAAE,IAAA,cAAI,EAAC,IAAI,CAAC,EAAE,IAAA,cAAI,EAAC,OAAO,CAAC,EAAE,IAAA,cAAI,EAAC,OAAO,CAAC,CAAC;QAC5D,EAAE,EAAE,CAAC,IAAA,cAAI,EAAC,OAAO,CAAC,EAAE,IAAA,cAAI,EAAC,OAAO,CAAC,EAAE,IAAA,cAAI,EAAC,QAAQ,CAAC,EAAE,IAAA,cAAI,EAAC,OAAO,CAAC,CAAC;KAClE;IACD,OAAO,EAAE;QACP,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC;QACtD,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC;KAC1C;CACF,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { en } from './en';
2
+ import { id } from './id';
3
+ import { ru } from './ru';
4
+ export declare const BargeLexicons: {
5
+ ru: import("..").BargeLexicon;
6
+ en: import("..").BargeLexicon;
7
+ id: import("..").BargeLexicon;
8
+ };
9
+ export { ru, en, id };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/barge-in/lexicons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,eAAO,MAAM,aAAa;;;;CAAiB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.id = exports.en = exports.ru = exports.BargeLexicons = void 0;
4
+ const en_1 = require("./en");
5
+ Object.defineProperty(exports, "en", { enumerable: true, get: function () { return en_1.en; } });
6
+ const id_1 = require("./id");
7
+ Object.defineProperty(exports, "id", { enumerable: true, get: function () { return id_1.id; } });
8
+ const ru_1 = require("./ru");
9
+ Object.defineProperty(exports, "ru", { enumerable: true, get: function () { return ru_1.ru; } });
10
+ exports.BargeLexicons = { ru: ru_1.ru, en: en_1.en, id: id_1.id };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/barge-in/lexicons/index.ts"],"names":[],"mappings":";;;AAAA,6BAA0B;AAKb,mFALJ,OAAE,OAKI;AAJf,6BAA0B;AAIT,mFAJR,OAAE,OAIQ;AAHnB,6BAA0B;AAGjB,mFAHA,OAAE,OAGA;AADE,QAAA,aAAa,GAAG,EAAE,EAAE,EAAF,OAAE,EAAE,EAAE,EAAF,OAAE,EAAE,EAAE,EAAF,OAAE,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ru: import("../lexicon").BargeLexicon;
2
+ //# sourceMappingURL=ru.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../src/barge-in/lexicons/ru.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,EAAE,mCAiCb,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ru = void 0;
4
+ const lexicon_1 = require("../lexicon");
5
+ exports.ru = (0, lexicon_1.defineBargeLexicon)({
6
+ language: 'ru',
7
+ interrupt: [
8
+ (0, lexicon_1.word)('стоп'),
9
+ (0, lexicon_1.word)('подожд\\p{L}*'),
10
+ (0, lexicon_1.word)('погод\\p{L}*'),
11
+ (0, lexicon_1.word)('останови\\p{L}*'),
12
+ (0, lexicon_1.word)('хватит'),
13
+ (0, lexicon_1.word)('не\\s+надо'),
14
+ (0, lexicon_1.word)('не\\s+нужно'),
15
+ (0, lexicon_1.word)('секунд\\p{L}*'),
16
+ (0, lexicon_1.word)('помолчи\\p{L}*'),
17
+ ],
18
+ backchannel: [
19
+ (0, lexicon_1.word)('ага'),
20
+ (0, lexicon_1.word)('угу'),
21
+ (0, lexicon_1.word)('да(?:\\s+да)+'),
22
+ (0, lexicon_1.word)('понятно'),
23
+ (0, lexicon_1.word)('ясно'),
24
+ (0, lexicon_1.word)('хорошо'),
25
+ (0, lexicon_1.word)('ну'),
26
+ (0, lexicon_1.word)('так'),
27
+ (0, lexicon_1.word)('слушаю'),
28
+ ],
29
+ fillers: [(0, lexicon_1.word)('э+'), (0, lexicon_1.word)('м+'), (0, lexicon_1.word)('эм+'), (0, lexicon_1.word)('ну\\s+вот'), (0, lexicon_1.word)('типа')],
30
+ answers: {
31
+ yes: [(0, lexicon_1.word)('да'), (0, lexicon_1.word)('конечно'), (0, lexicon_1.word)('верно'), (0, lexicon_1.word)('правильно')],
32
+ no: [(0, lexicon_1.word)('нет'), (0, lexicon_1.word)('неа')],
33
+ },
34
+ samples: {
35
+ interrupt: ['стоп', 'подождите пожалуйста', 'не надо'],
36
+ backchannel: ['ага', 'угу', 'да да', 'понятно'],
37
+ },
38
+ });
39
+ //# sourceMappingURL=ru.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.js","sourceRoot":"","sources":["../../../src/barge-in/lexicons/ru.ts"],"names":[],"mappings":";;;AAAA,wCAAsD;AAEzC,QAAA,EAAE,GAAG,IAAA,4BAAkB,EAAC;IACnC,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE;QACT,IAAA,cAAI,EAAC,MAAM,CAAC;QACZ,IAAA,cAAI,EAAC,eAAe,CA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