@livekit/agents 1.0.6 → 1.1.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 (96) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2 -1
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/inference/api_protos.cjs +104 -0
  9. package/dist/inference/api_protos.cjs.map +1 -0
  10. package/dist/inference/api_protos.d.cts +222 -0
  11. package/dist/inference/api_protos.d.ts +222 -0
  12. package/dist/inference/api_protos.d.ts.map +1 -0
  13. package/dist/inference/api_protos.js +70 -0
  14. package/dist/inference/api_protos.js.map +1 -0
  15. package/dist/inference/index.cjs +56 -0
  16. package/dist/inference/index.cjs.map +1 -0
  17. package/dist/inference/index.d.cts +9 -0
  18. package/dist/inference/index.d.ts +9 -0
  19. package/dist/inference/index.d.ts.map +1 -0
  20. package/dist/inference/index.js +16 -0
  21. package/dist/inference/index.js.map +1 -0
  22. package/dist/inference/llm.cjs +315 -0
  23. package/dist/inference/llm.cjs.map +1 -0
  24. package/dist/inference/llm.d.cts +92 -0
  25. package/dist/inference/llm.d.ts +92 -0
  26. package/dist/inference/llm.d.ts.map +1 -0
  27. package/dist/inference/llm.js +286 -0
  28. package/dist/inference/llm.js.map +1 -0
  29. package/dist/inference/stt.cjs +305 -0
  30. package/dist/inference/stt.cjs.map +1 -0
  31. package/dist/inference/stt.d.cts +79 -0
  32. package/dist/inference/stt.d.ts +79 -0
  33. package/dist/inference/stt.d.ts.map +1 -0
  34. package/dist/inference/stt.js +284 -0
  35. package/dist/inference/stt.js.map +1 -0
  36. package/dist/inference/tts.cjs +317 -0
  37. package/dist/inference/tts.cjs.map +1 -0
  38. package/dist/inference/tts.d.cts +75 -0
  39. package/dist/inference/tts.d.ts +75 -0
  40. package/dist/inference/tts.d.ts.map +1 -0
  41. package/dist/inference/tts.js +299 -0
  42. package/dist/inference/tts.js.map +1 -0
  43. package/dist/inference/utils.cjs +76 -0
  44. package/dist/inference/utils.cjs.map +1 -0
  45. package/dist/inference/utils.d.cts +5 -0
  46. package/dist/inference/utils.d.ts +5 -0
  47. package/dist/inference/utils.d.ts.map +1 -0
  48. package/dist/inference/utils.js +51 -0
  49. package/dist/inference/utils.js.map +1 -0
  50. package/dist/tts/tts.cjs +1 -1
  51. package/dist/tts/tts.cjs.map +1 -1
  52. package/dist/tts/tts.js +1 -1
  53. package/dist/tts/tts.js.map +1 -1
  54. package/dist/utils.cjs +11 -0
  55. package/dist/utils.cjs.map +1 -1
  56. package/dist/utils.d.cts +1 -0
  57. package/dist/utils.d.ts +1 -0
  58. package/dist/utils.d.ts.map +1 -1
  59. package/dist/utils.js +10 -0
  60. package/dist/utils.js.map +1 -1
  61. package/dist/voice/agent.cjs +16 -3
  62. package/dist/voice/agent.cjs.map +1 -1
  63. package/dist/voice/agent.d.cts +4 -3
  64. package/dist/voice/agent.d.ts +4 -3
  65. package/dist/voice/agent.d.ts.map +1 -1
  66. package/dist/voice/agent.js +20 -3
  67. package/dist/voice/agent.js.map +1 -1
  68. package/dist/voice/agent_session.cjs +16 -3
  69. package/dist/voice/agent_session.cjs.map +1 -1
  70. package/dist/voice/agent_session.d.cts +4 -3
  71. package/dist/voice/agent_session.d.ts +4 -3
  72. package/dist/voice/agent_session.d.ts.map +1 -1
  73. package/dist/voice/agent_session.js +20 -3
  74. package/dist/voice/agent_session.js.map +1 -1
  75. package/dist/voice/room_io/_input.cjs.map +1 -1
  76. package/dist/voice/room_io/_input.d.ts.map +1 -1
  77. package/dist/voice/room_io/_input.js +1 -0
  78. package/dist/voice/room_io/_input.js.map +1 -1
  79. package/dist/worker.cjs.map +1 -1
  80. package/dist/worker.d.ts.map +1 -1
  81. package/dist/worker.js +1 -1
  82. package/dist/worker.js.map +1 -1
  83. package/package.json +3 -2
  84. package/src/index.ts +2 -1
  85. package/src/inference/api_protos.ts +82 -0
  86. package/src/inference/index.ts +12 -0
  87. package/src/inference/llm.ts +485 -0
  88. package/src/inference/stt.ts +414 -0
  89. package/src/inference/tts.ts +421 -0
  90. package/src/inference/utils.ts +66 -0
  91. package/src/tts/tts.ts +1 -1
  92. package/src/utils.ts +11 -0
  93. package/src/voice/agent.ts +30 -6
  94. package/src/voice/agent_session.ts +29 -6
  95. package/src/voice/room_io/_input.ts +1 -1
  96. package/src/worker.ts +2 -7
package/dist/index.cjs CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  cli: () => cli,
33
+ inference: () => inference,
33
34
  ipc: () => ipc,
34
35
  llm: () => llm,
35
36
  metrics: () => metrics,
@@ -41,6 +42,7 @@ __export(index_exports, {
41
42
  });
42
43
  module.exports = __toCommonJS(index_exports);
43
44
  var cli = __toESM(require("./cli.cjs"), 1);
45
+ var inference = __toESM(require("./inference/index.cjs"), 1);
44
46
  var ipc = __toESM(require("./ipc/index.cjs"), 1);
45
47
  var llm = __toESM(require("./llm/index.cjs"), 1);
46
48
  var metrics = __toESM(require("./metrics/index.cjs"), 1);
@@ -65,6 +67,7 @@ __reExport(index_exports, require("./worker.cjs"), module.exports);
65
67
  // Annotate the CommonJS export names for ESM import in node:
66
68
  0 && (module.exports = {
67
69
  cli,
70
+ inference,
68
71
  ipc,
69
72
  llm,
70
73
  metrics,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * LiveKit Agents is a framework for building realtime programmable participants that run on\n * servers.\n *\n * @see {@link https://docs.livekit.io/agents/overview | LiveKit Agents documentation}\n * @packageDocumentation\n */\nimport * as cli from './cli.js';\nimport * as ipc from './ipc/index.js';\nimport * as llm from './llm/index.js';\nimport * as metrics from './metrics/index.js';\nimport * as stream from './stream/index.js';\nimport * as stt from './stt/index.js';\nimport * as tokenize from './tokenize/index.js';\nimport * as tts from './tts/index.js';\nimport * as voice from './voice/index.js';\n\nexport * from './_exceptions.js';\nexport * from './audio.js';\nexport * from './generator.js';\nexport * from './inference_runner.js';\nexport * from './job.js';\nexport * from './log.js';\nexport * from './plugin.js';\nexport * from './transcription.js';\nexport * from './types.js';\nexport * from './utils.js';\nexport * from './vad.js';\nexport * from './version.js';\nexport * from './worker.js';\n\nexport { cli, ipc, llm, metrics, stream, stt, tokenize, tts, voice };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,UAAqB;AACrB,UAAqB;AACrB,UAAqB;AACrB,cAAyB;AACzB,aAAwB;AACxB,UAAqB;AACrB,eAA0B;AAC1B,UAAqB;AACrB,YAAuB;AAEvB,0BAAc,6BArBd;AAsBA,0BAAc,uBAtBd;AAuBA,0BAAc,2BAvBd;AAwBA,0BAAc,kCAxBd;AAyBA,0BAAc,qBAzBd;AA0BA,0BAAc,qBA1Bd;AA2BA,0BAAc,wBA3Bd;AA4BA,0BAAc,+BA5Bd;AA6BA,0BAAc,uBA7Bd;AA8BA,0BAAc,uBA9Bd;AA+BA,0BAAc,qBA/Bd;AAgCA,0BAAc,yBAhCd;AAiCA,0BAAc,wBAjCd;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * LiveKit Agents is a framework for building realtime programmable participants that run on\n * servers.\n *\n * @see {@link https://docs.livekit.io/agents/overview | LiveKit Agents documentation}\n * @packageDocumentation\n */\nimport * as cli from './cli.js';\nimport * as inference from './inference/index.js';\nimport * as ipc from './ipc/index.js';\nimport * as llm from './llm/index.js';\nimport * as metrics from './metrics/index.js';\nimport * as stream from './stream/index.js';\nimport * as stt from './stt/index.js';\nimport * as tokenize from './tokenize/index.js';\nimport * as tts from './tts/index.js';\nimport * as voice from './voice/index.js';\n\nexport * from './_exceptions.js';\nexport * from './audio.js';\nexport * from './generator.js';\nexport * from './inference_runner.js';\nexport * from './job.js';\nexport * from './log.js';\nexport * from './plugin.js';\nexport * from './transcription.js';\nexport * from './types.js';\nexport * from './utils.js';\nexport * from './vad.js';\nexport * from './version.js';\nexport * from './worker.js';\n\nexport { cli, inference, ipc, llm, metrics, stream, stt, tokenize, tts, voice };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,UAAqB;AACrB,gBAA2B;AAC3B,UAAqB;AACrB,UAAqB;AACrB,cAAyB;AACzB,aAAwB;AACxB,UAAqB;AACrB,eAA0B;AAC1B,UAAqB;AACrB,YAAuB;AAEvB,0BAAc,6BAtBd;AAuBA,0BAAc,uBAvBd;AAwBA,0BAAc,2BAxBd;AAyBA,0BAAc,kCAzBd;AA0BA,0BAAc,qBA1Bd;AA2BA,0BAAc,qBA3Bd;AA4BA,0BAAc,wBA5Bd;AA6BA,0BAAc,+BA7Bd;AA8BA,0BAAc,uBA9Bd;AA+BA,0BAAc,uBA/Bd;AAgCA,0BAAc,qBAhCd;AAiCA,0BAAc,yBAjCd;AAkCA,0BAAc,wBAlCd;","names":[]}
package/dist/index.d.cts CHANGED
@@ -6,6 +6,7 @@
6
6
  * @packageDocumentation
7
7
  */
8
8
  import * as cli from './cli.js';
9
+ import * as inference from './inference/index.js';
9
10
  import * as ipc from './ipc/index.js';
10
11
  import * as llm from './llm/index.js';
11
12
  import * as metrics from './metrics/index.js';
@@ -27,5 +28,5 @@ export * from './utils.js';
27
28
  export * from './vad.js';
28
29
  export * from './version.js';
29
30
  export * from './worker.js';
30
- export { cli, ipc, llm, metrics, stream, stt, tokenize, tts, voice };
31
+ export { cli, inference, ipc, llm, metrics, stream, stt, tokenize, tts, voice };
31
32
  //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  * @packageDocumentation
7
7
  */
8
8
  import * as cli from './cli.js';
9
+ import * as inference from './inference/index.js';
9
10
  import * as ipc from './ipc/index.js';
10
11
  import * as llm from './llm/index.js';
11
12
  import * as metrics from './metrics/index.js';
@@ -27,5 +28,5 @@ export * from './utils.js';
27
28
  export * from './vad.js';
28
29
  export * from './version.js';
29
30
  export * from './worker.js';
30
- export { cli, ipc, llm, metrics, stream, stt, tokenize, tts, voice };
31
+ export { cli, inference, ipc, llm, metrics, stream, stt, tokenize, tts, voice };
31
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;AAE1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as cli from "./cli.js";
2
+ import * as inference from "./inference/index.js";
2
3
  import * as ipc from "./ipc/index.js";
3
4
  import * as llm from "./llm/index.js";
4
5
  import * as metrics from "./metrics/index.js";
@@ -22,6 +23,7 @@ export * from "./version.js";
22
23
  export * from "./worker.js";
23
24
  export {
24
25
  cli,
26
+ inference,
25
27
  ipc,
26
28
  llm,
27
29
  metrics,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * LiveKit Agents is a framework for building realtime programmable participants that run on\n * servers.\n *\n * @see {@link https://docs.livekit.io/agents/overview | LiveKit Agents documentation}\n * @packageDocumentation\n */\nimport * as cli from './cli.js';\nimport * as ipc from './ipc/index.js';\nimport * as llm from './llm/index.js';\nimport * as metrics from './metrics/index.js';\nimport * as stream from './stream/index.js';\nimport * as stt from './stt/index.js';\nimport * as tokenize from './tokenize/index.js';\nimport * as tts from './tts/index.js';\nimport * as voice from './voice/index.js';\n\nexport * from './_exceptions.js';\nexport * from './audio.js';\nexport * from './generator.js';\nexport * from './inference_runner.js';\nexport * from './job.js';\nexport * from './log.js';\nexport * from './plugin.js';\nexport * from './transcription.js';\nexport * from './types.js';\nexport * from './utils.js';\nexport * from './vad.js';\nexport * from './version.js';\nexport * from './worker.js';\n\nexport { cli, ipc, llm, metrics, stream, stt, tokenize, tts, voice };\n"],"mappings":"AAWA,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,aAAa;AACzB,YAAY,YAAY;AACxB,YAAY,SAAS;AACrB,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,YAAY,WAAW;AAEvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * LiveKit Agents is a framework for building realtime programmable participants that run on\n * servers.\n *\n * @see {@link https://docs.livekit.io/agents/overview | LiveKit Agents documentation}\n * @packageDocumentation\n */\nimport * as cli from './cli.js';\nimport * as inference from './inference/index.js';\nimport * as ipc from './ipc/index.js';\nimport * as llm from './llm/index.js';\nimport * as metrics from './metrics/index.js';\nimport * as stream from './stream/index.js';\nimport * as stt from './stt/index.js';\nimport * as tokenize from './tokenize/index.js';\nimport * as tts from './tts/index.js';\nimport * as voice from './voice/index.js';\n\nexport * from './_exceptions.js';\nexport * from './audio.js';\nexport * from './generator.js';\nexport * from './inference_runner.js';\nexport * from './job.js';\nexport * from './log.js';\nexport * from './plugin.js';\nexport * from './transcription.js';\nexport * from './types.js';\nexport * from './utils.js';\nexport * from './vad.js';\nexport * from './version.js';\nexport * from './worker.js';\n\nexport { cli, inference, ipc, llm, metrics, stream, stt, tokenize, tts, voice };\n"],"mappings":"AAWA,YAAY,SAAS;AACrB,YAAY,eAAe;AAC3B,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,YAAY,aAAa;AACzB,YAAY,YAAY;AACxB,YAAY,SAAS;AACrB,YAAY,cAAc;AAC1B,YAAY,SAAS;AACrB,YAAY,WAAW;AAEvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var api_protos_exports = {};
20
+ __export(api_protos_exports, {
21
+ ttsClientEventSchema: () => ttsClientEventSchema,
22
+ ttsDoneEventSchema: () => ttsDoneEventSchema,
23
+ ttsErrorEventSchema: () => ttsErrorEventSchema,
24
+ ttsInputTranscriptEventSchema: () => ttsInputTranscriptEventSchema,
25
+ ttsOutputAudioEventSchema: () => ttsOutputAudioEventSchema,
26
+ ttsServerEventSchema: () => ttsServerEventSchema,
27
+ ttsSessionCloseEventSchema: () => ttsSessionCloseEventSchema,
28
+ ttsSessionClosedEventSchema: () => ttsSessionClosedEventSchema,
29
+ ttsSessionCreateEventSchema: () => ttsSessionCreateEventSchema,
30
+ ttsSessionCreatedEventSchema: () => ttsSessionCreatedEventSchema,
31
+ ttsSessionFlushEventSchema: () => ttsSessionFlushEventSchema
32
+ });
33
+ module.exports = __toCommonJS(api_protos_exports);
34
+ var import_zod = require("zod");
35
+ const ttsSessionCreateEventSchema = import_zod.z.object({
36
+ type: import_zod.z.literal("session.create"),
37
+ sample_rate: import_zod.z.string(),
38
+ encoding: import_zod.z.string(),
39
+ model: import_zod.z.string().optional(),
40
+ voice: import_zod.z.string().optional(),
41
+ language: import_zod.z.string().optional(),
42
+ extra: import_zod.z.record(import_zod.z.string(), import_zod.z.unknown()),
43
+ transcript: import_zod.z.string().optional()
44
+ });
45
+ const ttsInputTranscriptEventSchema = import_zod.z.object({
46
+ type: import_zod.z.literal("input_transcript"),
47
+ transcript: import_zod.z.string()
48
+ });
49
+ const ttsSessionFlushEventSchema = import_zod.z.object({
50
+ type: import_zod.z.literal("session.flush")
51
+ });
52
+ const ttsSessionCloseEventSchema = import_zod.z.object({
53
+ type: import_zod.z.literal("session.close")
54
+ });
55
+ const ttsSessionCreatedEventSchema = import_zod.z.object({
56
+ type: import_zod.z.literal("session.created"),
57
+ session_id: import_zod.z.string()
58
+ });
59
+ const ttsOutputAudioEventSchema = import_zod.z.object({
60
+ type: import_zod.z.literal("output_audio"),
61
+ audio: import_zod.z.string(),
62
+ session_id: import_zod.z.string()
63
+ });
64
+ const ttsDoneEventSchema = import_zod.z.object({
65
+ type: import_zod.z.literal("done"),
66
+ session_id: import_zod.z.string()
67
+ });
68
+ const ttsSessionClosedEventSchema = import_zod.z.object({
69
+ type: import_zod.z.literal("session.closed"),
70
+ session_id: import_zod.z.string()
71
+ });
72
+ const ttsErrorEventSchema = import_zod.z.object({
73
+ type: import_zod.z.literal("error"),
74
+ message: import_zod.z.string(),
75
+ session_id: import_zod.z.string()
76
+ });
77
+ const ttsClientEventSchema = import_zod.z.discriminatedUnion("type", [
78
+ ttsSessionCreateEventSchema,
79
+ ttsInputTranscriptEventSchema,
80
+ ttsSessionFlushEventSchema,
81
+ ttsSessionCloseEventSchema
82
+ ]);
83
+ const ttsServerEventSchema = import_zod.z.discriminatedUnion("type", [
84
+ ttsSessionCreatedEventSchema,
85
+ ttsOutputAudioEventSchema,
86
+ ttsDoneEventSchema,
87
+ ttsSessionClosedEventSchema,
88
+ ttsErrorEventSchema
89
+ ]);
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ ttsClientEventSchema,
93
+ ttsDoneEventSchema,
94
+ ttsErrorEventSchema,
95
+ ttsInputTranscriptEventSchema,
96
+ ttsOutputAudioEventSchema,
97
+ ttsServerEventSchema,
98
+ ttsSessionCloseEventSchema,
99
+ ttsSessionClosedEventSchema,
100
+ ttsSessionCreateEventSchema,
101
+ ttsSessionCreatedEventSchema,
102
+ ttsSessionFlushEventSchema
103
+ });
104
+ //# sourceMappingURL=api_protos.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/inference/api_protos.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { z } from 'zod';\n\nexport const ttsSessionCreateEventSchema = z.object({\n type: z.literal('session.create'),\n sample_rate: z.string(),\n encoding: z.string(),\n model: z.string().optional(),\n voice: z.string().optional(),\n language: z.string().optional(),\n extra: z.record(z.string(), z.unknown()),\n transcript: z.string().optional(),\n});\n\nexport const ttsInputTranscriptEventSchema = z.object({\n type: z.literal('input_transcript'),\n transcript: z.string(),\n});\n\nexport const ttsSessionFlushEventSchema = z.object({\n type: z.literal('session.flush'),\n});\n\nexport const ttsSessionCloseEventSchema = z.object({\n type: z.literal('session.close'),\n});\n\nexport const ttsSessionCreatedEventSchema = z.object({\n type: z.literal('session.created'),\n session_id: z.string(),\n});\n\nexport const ttsOutputAudioEventSchema = z.object({\n type: z.literal('output_audio'),\n audio: z.string(),\n session_id: z.string(),\n});\n\nexport const ttsDoneEventSchema = z.object({\n type: z.literal('done'),\n session_id: z.string(),\n});\n\nexport const ttsSessionClosedEventSchema = z.object({\n type: z.literal('session.closed'),\n session_id: z.string(),\n});\n\nexport const ttsErrorEventSchema = z.object({\n type: z.literal('error'),\n message: z.string(),\n session_id: z.string(),\n});\n\nexport const ttsClientEventSchema = z.discriminatedUnion('type', [\n ttsSessionCreateEventSchema,\n ttsInputTranscriptEventSchema,\n ttsSessionFlushEventSchema,\n ttsSessionCloseEventSchema,\n]);\n\nexport const ttsServerEventSchema = z.discriminatedUnion('type', [\n ttsSessionCreatedEventSchema,\n ttsOutputAudioEventSchema,\n ttsDoneEventSchema,\n ttsSessionClosedEventSchema,\n ttsErrorEventSchema,\n]);\n\nexport type TtsSessionCreateEvent = z.infer<typeof ttsSessionCreateEventSchema>;\nexport type TtsInputTranscriptEvent = z.infer<typeof ttsInputTranscriptEventSchema>;\nexport type TtsSessionFlushEvent = z.infer<typeof ttsSessionFlushEventSchema>;\nexport type TtsSessionCloseEvent = z.infer<typeof ttsSessionCloseEventSchema>;\nexport type TtsSessionCreatedEvent = z.infer<typeof ttsSessionCreatedEventSchema>;\nexport type TtsOutputAudioEvent = z.infer<typeof ttsOutputAudioEventSchema>;\nexport type TtsDoneEvent = z.infer<typeof ttsDoneEventSchema>;\nexport type TtsSessionClosedEvent = z.infer<typeof ttsSessionClosedEventSchema>;\nexport type TtsErrorEvent = z.infer<typeof ttsErrorEventSchema>;\nexport type TtsClientEvent = z.infer<typeof ttsClientEventSchema>;\nexport type TtsServerEvent = z.infer<typeof ttsServerEventSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAkB;AAEX,MAAM,8BAA8B,aAAE,OAAO;AAAA,EAClD,MAAM,aAAE,QAAQ,gBAAgB;AAAA,EAChC,aAAa,aAAE,OAAO;AAAA,EACtB,UAAU,aAAE,OAAO;AAAA,EACnB,OAAO,aAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,OAAO,aAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,UAAU,aAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,OAAO,aAAE,OAAO,aAAE,OAAO,GAAG,aAAE,QAAQ,CAAC;AAAA,EACvC,YAAY,aAAE,OAAO,EAAE,SAAS;AAClC,CAAC;AAEM,MAAM,gCAAgC,aAAE,OAAO;AAAA,EACpD,MAAM,aAAE,QAAQ,kBAAkB;AAAA,EAClC,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,6BAA6B,aAAE,OAAO;AAAA,EACjD,MAAM,aAAE,QAAQ,eAAe;AACjC,CAAC;AAEM,MAAM,6BAA6B,aAAE,OAAO;AAAA,EACjD,MAAM,aAAE,QAAQ,eAAe;AACjC,CAAC;AAEM,MAAM,+BAA+B,aAAE,OAAO;AAAA,EACnD,MAAM,aAAE,QAAQ,iBAAiB;AAAA,EACjC,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,4BAA4B,aAAE,OAAO;AAAA,EAChD,MAAM,aAAE,QAAQ,cAAc;AAAA,EAC9B,OAAO,aAAE,OAAO;AAAA,EAChB,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,qBAAqB,aAAE,OAAO;AAAA,EACzC,MAAM,aAAE,QAAQ,MAAM;AAAA,EACtB,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,8BAA8B,aAAE,OAAO;AAAA,EAClD,MAAM,aAAE,QAAQ,gBAAgB;AAAA,EAChC,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,sBAAsB,aAAE,OAAO;AAAA,EAC1C,MAAM,aAAE,QAAQ,OAAO;AAAA,EACvB,SAAS,aAAE,OAAO;AAAA,EAClB,YAAY,aAAE,OAAO;AACvB,CAAC;AAEM,MAAM,uBAAuB,aAAE,mBAAmB,QAAQ;AAAA,EAC/D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,uBAAuB,aAAE,mBAAmB,QAAQ;AAAA,EAC/D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;","names":[]}
@@ -0,0 +1,222 @@
1
+ import { z } from 'zod';
2
+ export declare const ttsSessionCreateEventSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"session.create">;
4
+ sample_rate: z.ZodString;
5
+ encoding: z.ZodString;
6
+ model: z.ZodOptional<z.ZodString>;
7
+ voice: z.ZodOptional<z.ZodString>;
8
+ language: z.ZodOptional<z.ZodString>;
9
+ extra: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
+ transcript: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "session.create";
13
+ encoding: string;
14
+ sample_rate: string;
15
+ extra: Record<string, unknown>;
16
+ language?: string | undefined;
17
+ transcript?: string | undefined;
18
+ model?: string | undefined;
19
+ voice?: string | undefined;
20
+ }, {
21
+ type: "session.create";
22
+ encoding: string;
23
+ sample_rate: string;
24
+ extra: Record<string, unknown>;
25
+ language?: string | undefined;
26
+ transcript?: string | undefined;
27
+ model?: string | undefined;
28
+ voice?: string | undefined;
29
+ }>;
30
+ export declare const ttsInputTranscriptEventSchema: z.ZodObject<{
31
+ type: z.ZodLiteral<"input_transcript">;
32
+ transcript: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ type: "input_transcript";
35
+ transcript: string;
36
+ }, {
37
+ type: "input_transcript";
38
+ transcript: string;
39
+ }>;
40
+ export declare const ttsSessionFlushEventSchema: z.ZodObject<{
41
+ type: z.ZodLiteral<"session.flush">;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "session.flush";
44
+ }, {
45
+ type: "session.flush";
46
+ }>;
47
+ export declare const ttsSessionCloseEventSchema: z.ZodObject<{
48
+ type: z.ZodLiteral<"session.close">;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "session.close";
51
+ }, {
52
+ type: "session.close";
53
+ }>;
54
+ export declare const ttsSessionCreatedEventSchema: z.ZodObject<{
55
+ type: z.ZodLiteral<"session.created">;
56
+ session_id: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ type: "session.created";
59
+ session_id: string;
60
+ }, {
61
+ type: "session.created";
62
+ session_id: string;
63
+ }>;
64
+ export declare const ttsOutputAudioEventSchema: z.ZodObject<{
65
+ type: z.ZodLiteral<"output_audio">;
66
+ audio: z.ZodString;
67
+ session_id: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: "output_audio";
70
+ audio: string;
71
+ session_id: string;
72
+ }, {
73
+ type: "output_audio";
74
+ audio: string;
75
+ session_id: string;
76
+ }>;
77
+ export declare const ttsDoneEventSchema: z.ZodObject<{
78
+ type: z.ZodLiteral<"done">;
79
+ session_id: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: "done";
82
+ session_id: string;
83
+ }, {
84
+ type: "done";
85
+ session_id: string;
86
+ }>;
87
+ export declare const ttsSessionClosedEventSchema: z.ZodObject<{
88
+ type: z.ZodLiteral<"session.closed">;
89
+ session_id: z.ZodString;
90
+ }, "strip", z.ZodTypeAny, {
91
+ type: "session.closed";
92
+ session_id: string;
93
+ }, {
94
+ type: "session.closed";
95
+ session_id: string;
96
+ }>;
97
+ export declare const ttsErrorEventSchema: z.ZodObject<{
98
+ type: z.ZodLiteral<"error">;
99
+ message: z.ZodString;
100
+ session_id: z.ZodString;
101
+ }, "strip", z.ZodTypeAny, {
102
+ message: string;
103
+ type: "error";
104
+ session_id: string;
105
+ }, {
106
+ message: string;
107
+ type: "error";
108
+ session_id: string;
109
+ }>;
110
+ export declare const ttsClientEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
111
+ type: z.ZodLiteral<"session.create">;
112
+ sample_rate: z.ZodString;
113
+ encoding: z.ZodString;
114
+ model: z.ZodOptional<z.ZodString>;
115
+ voice: z.ZodOptional<z.ZodString>;
116
+ language: z.ZodOptional<z.ZodString>;
117
+ extra: z.ZodRecord<z.ZodString, z.ZodUnknown>;
118
+ transcript: z.ZodOptional<z.ZodString>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ type: "session.create";
121
+ encoding: string;
122
+ sample_rate: string;
123
+ extra: Record<string, unknown>;
124
+ language?: string | undefined;
125
+ transcript?: string | undefined;
126
+ model?: string | undefined;
127
+ voice?: string | undefined;
128
+ }, {
129
+ type: "session.create";
130
+ encoding: string;
131
+ sample_rate: string;
132
+ extra: Record<string, unknown>;
133
+ language?: string | undefined;
134
+ transcript?: string | undefined;
135
+ model?: string | undefined;
136
+ voice?: string | undefined;
137
+ }>, z.ZodObject<{
138
+ type: z.ZodLiteral<"input_transcript">;
139
+ transcript: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ type: "input_transcript";
142
+ transcript: string;
143
+ }, {
144
+ type: "input_transcript";
145
+ transcript: string;
146
+ }>, z.ZodObject<{
147
+ type: z.ZodLiteral<"session.flush">;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type: "session.flush";
150
+ }, {
151
+ type: "session.flush";
152
+ }>, z.ZodObject<{
153
+ type: z.ZodLiteral<"session.close">;
154
+ }, "strip", z.ZodTypeAny, {
155
+ type: "session.close";
156
+ }, {
157
+ type: "session.close";
158
+ }>]>;
159
+ export declare const ttsServerEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
160
+ type: z.ZodLiteral<"session.created">;
161
+ session_id: z.ZodString;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: "session.created";
164
+ session_id: string;
165
+ }, {
166
+ type: "session.created";
167
+ session_id: string;
168
+ }>, z.ZodObject<{
169
+ type: z.ZodLiteral<"output_audio">;
170
+ audio: z.ZodString;
171
+ session_id: z.ZodString;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type: "output_audio";
174
+ audio: string;
175
+ session_id: string;
176
+ }, {
177
+ type: "output_audio";
178
+ audio: string;
179
+ session_id: string;
180
+ }>, z.ZodObject<{
181
+ type: z.ZodLiteral<"done">;
182
+ session_id: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ type: "done";
185
+ session_id: string;
186
+ }, {
187
+ type: "done";
188
+ session_id: string;
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"session.closed">;
191
+ session_id: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "session.closed";
194
+ session_id: string;
195
+ }, {
196
+ type: "session.closed";
197
+ session_id: string;
198
+ }>, z.ZodObject<{
199
+ type: z.ZodLiteral<"error">;
200
+ message: z.ZodString;
201
+ session_id: z.ZodString;
202
+ }, "strip", z.ZodTypeAny, {
203
+ message: string;
204
+ type: "error";
205
+ session_id: string;
206
+ }, {
207
+ message: string;
208
+ type: "error";
209
+ session_id: string;
210
+ }>]>;
211
+ export type TtsSessionCreateEvent = z.infer<typeof ttsSessionCreateEventSchema>;
212
+ export type TtsInputTranscriptEvent = z.infer<typeof ttsInputTranscriptEventSchema>;
213
+ export type TtsSessionFlushEvent = z.infer<typeof ttsSessionFlushEventSchema>;
214
+ export type TtsSessionCloseEvent = z.infer<typeof ttsSessionCloseEventSchema>;
215
+ export type TtsSessionCreatedEvent = z.infer<typeof ttsSessionCreatedEventSchema>;
216
+ export type TtsOutputAudioEvent = z.infer<typeof ttsOutputAudioEventSchema>;
217
+ export type TtsDoneEvent = z.infer<typeof ttsDoneEventSchema>;
218
+ export type TtsSessionClosedEvent = z.infer<typeof ttsSessionClosedEventSchema>;
219
+ export type TtsErrorEvent = z.infer<typeof ttsErrorEventSchema>;
220
+ export type TtsClientEvent = z.infer<typeof ttsClientEventSchema>;
221
+ export type TtsServerEvent = z.infer<typeof ttsServerEventSchema>;
222
+ //# sourceMappingURL=api_protos.d.ts.map
@@ -0,0 +1,222 @@
1
+ import { z } from 'zod';
2
+ export declare const ttsSessionCreateEventSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"session.create">;
4
+ sample_rate: z.ZodString;
5
+ encoding: z.ZodString;
6
+ model: z.ZodOptional<z.ZodString>;
7
+ voice: z.ZodOptional<z.ZodString>;
8
+ language: z.ZodOptional<z.ZodString>;
9
+ extra: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
+ transcript: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "session.create";
13
+ encoding: string;
14
+ sample_rate: string;
15
+ extra: Record<string, unknown>;
16
+ language?: string | undefined;
17
+ transcript?: string | undefined;
18
+ model?: string | undefined;
19
+ voice?: string | undefined;
20
+ }, {
21
+ type: "session.create";
22
+ encoding: string;
23
+ sample_rate: string;
24
+ extra: Record<string, unknown>;
25
+ language?: string | undefined;
26
+ transcript?: string | undefined;
27
+ model?: string | undefined;
28
+ voice?: string | undefined;
29
+ }>;
30
+ export declare const ttsInputTranscriptEventSchema: z.ZodObject<{
31
+ type: z.ZodLiteral<"input_transcript">;
32
+ transcript: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ type: "input_transcript";
35
+ transcript: string;
36
+ }, {
37
+ type: "input_transcript";
38
+ transcript: string;
39
+ }>;
40
+ export declare const ttsSessionFlushEventSchema: z.ZodObject<{
41
+ type: z.ZodLiteral<"session.flush">;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "session.flush";
44
+ }, {
45
+ type: "session.flush";
46
+ }>;
47
+ export declare const ttsSessionCloseEventSchema: z.ZodObject<{
48
+ type: z.ZodLiteral<"session.close">;
49
+ }, "strip", z.ZodTypeAny, {
50
+ type: "session.close";
51
+ }, {
52
+ type: "session.close";
53
+ }>;
54
+ export declare const ttsSessionCreatedEventSchema: z.ZodObject<{
55
+ type: z.ZodLiteral<"session.created">;
56
+ session_id: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ type: "session.created";
59
+ session_id: string;
60
+ }, {
61
+ type: "session.created";
62
+ session_id: string;
63
+ }>;
64
+ export declare const ttsOutputAudioEventSchema: z.ZodObject<{
65
+ type: z.ZodLiteral<"output_audio">;
66
+ audio: z.ZodString;
67
+ session_id: z.ZodString;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: "output_audio";
70
+ audio: string;
71
+ session_id: string;
72
+ }, {
73
+ type: "output_audio";
74
+ audio: string;
75
+ session_id: string;
76
+ }>;
77
+ export declare const ttsDoneEventSchema: z.ZodObject<{
78
+ type: z.ZodLiteral<"done">;
79
+ session_id: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ type: "done";
82
+ session_id: string;
83
+ }, {
84
+ type: "done";
85
+ session_id: string;
86
+ }>;
87
+ export declare const ttsSessionClosedEventSchema: z.ZodObject<{
88
+ type: z.ZodLiteral<"session.closed">;
89
+ session_id: z.ZodString;
90
+ }, "strip", z.ZodTypeAny, {
91
+ type: "session.closed";
92
+ session_id: string;
93
+ }, {
94
+ type: "session.closed";
95
+ session_id: string;
96
+ }>;
97
+ export declare const ttsErrorEventSchema: z.ZodObject<{
98
+ type: z.ZodLiteral<"error">;
99
+ message: z.ZodString;
100
+ session_id: z.ZodString;
101
+ }, "strip", z.ZodTypeAny, {
102
+ message: string;
103
+ type: "error";
104
+ session_id: string;
105
+ }, {
106
+ message: string;
107
+ type: "error";
108
+ session_id: string;
109
+ }>;
110
+ export declare const ttsClientEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
111
+ type: z.ZodLiteral<"session.create">;
112
+ sample_rate: z.ZodString;
113
+ encoding: z.ZodString;
114
+ model: z.ZodOptional<z.ZodString>;
115
+ voice: z.ZodOptional<z.ZodString>;
116
+ language: z.ZodOptional<z.ZodString>;
117
+ extra: z.ZodRecord<z.ZodString, z.ZodUnknown>;
118
+ transcript: z.ZodOptional<z.ZodString>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ type: "session.create";
121
+ encoding: string;
122
+ sample_rate: string;
123
+ extra: Record<string, unknown>;
124
+ language?: string | undefined;
125
+ transcript?: string | undefined;
126
+ model?: string | undefined;
127
+ voice?: string | undefined;
128
+ }, {
129
+ type: "session.create";
130
+ encoding: string;
131
+ sample_rate: string;
132
+ extra: Record<string, unknown>;
133
+ language?: string | undefined;
134
+ transcript?: string | undefined;
135
+ model?: string | undefined;
136
+ voice?: string | undefined;
137
+ }>, z.ZodObject<{
138
+ type: z.ZodLiteral<"input_transcript">;
139
+ transcript: z.ZodString;
140
+ }, "strip", z.ZodTypeAny, {
141
+ type: "input_transcript";
142
+ transcript: string;
143
+ }, {
144
+ type: "input_transcript";
145
+ transcript: string;
146
+ }>, z.ZodObject<{
147
+ type: z.ZodLiteral<"session.flush">;
148
+ }, "strip", z.ZodTypeAny, {
149
+ type: "session.flush";
150
+ }, {
151
+ type: "session.flush";
152
+ }>, z.ZodObject<{
153
+ type: z.ZodLiteral<"session.close">;
154
+ }, "strip", z.ZodTypeAny, {
155
+ type: "session.close";
156
+ }, {
157
+ type: "session.close";
158
+ }>]>;
159
+ export declare const ttsServerEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
160
+ type: z.ZodLiteral<"session.created">;
161
+ session_id: z.ZodString;
162
+ }, "strip", z.ZodTypeAny, {
163
+ type: "session.created";
164
+ session_id: string;
165
+ }, {
166
+ type: "session.created";
167
+ session_id: string;
168
+ }>, z.ZodObject<{
169
+ type: z.ZodLiteral<"output_audio">;
170
+ audio: z.ZodString;
171
+ session_id: z.ZodString;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type: "output_audio";
174
+ audio: string;
175
+ session_id: string;
176
+ }, {
177
+ type: "output_audio";
178
+ audio: string;
179
+ session_id: string;
180
+ }>, z.ZodObject<{
181
+ type: z.ZodLiteral<"done">;
182
+ session_id: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ type: "done";
185
+ session_id: string;
186
+ }, {
187
+ type: "done";
188
+ session_id: string;
189
+ }>, z.ZodObject<{
190
+ type: z.ZodLiteral<"session.closed">;
191
+ session_id: z.ZodString;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "session.closed";
194
+ session_id: string;
195
+ }, {
196
+ type: "session.closed";
197
+ session_id: string;
198
+ }>, z.ZodObject<{
199
+ type: z.ZodLiteral<"error">;
200
+ message: z.ZodString;
201
+ session_id: z.ZodString;
202
+ }, "strip", z.ZodTypeAny, {
203
+ message: string;
204
+ type: "error";
205
+ session_id: string;
206
+ }, {
207
+ message: string;
208
+ type: "error";
209
+ session_id: string;
210
+ }>]>;
211
+ export type TtsSessionCreateEvent = z.infer<typeof ttsSessionCreateEventSchema>;
212
+ export type TtsInputTranscriptEvent = z.infer<typeof ttsInputTranscriptEventSchema>;
213
+ export type TtsSessionFlushEvent = z.infer<typeof ttsSessionFlushEventSchema>;
214
+ export type TtsSessionCloseEvent = z.infer<typeof ttsSessionCloseEventSchema>;
215
+ export type TtsSessionCreatedEvent = z.infer<typeof ttsSessionCreatedEventSchema>;
216
+ export type TtsOutputAudioEvent = z.infer<typeof ttsOutputAudioEventSchema>;
217
+ export type TtsDoneEvent = z.infer<typeof ttsDoneEventSchema>;
218
+ export type TtsSessionClosedEvent = z.infer<typeof ttsSessionClosedEventSchema>;
219
+ export type TtsErrorEvent = z.infer<typeof ttsErrorEventSchema>;
220
+ export type TtsClientEvent = z.infer<typeof ttsClientEventSchema>;
221
+ export type TtsServerEvent = z.infer<typeof ttsServerEventSchema>;
222
+ //# sourceMappingURL=api_protos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api_protos.d.ts","sourceRoot":"","sources":["../../src/inference/api_protos.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;EAStC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;EAGvC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;EAGtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM/B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}