@inkibra/voice-sdk 0.1.0 → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Inkibra
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -58,7 +58,7 @@ const { token } = await response.json();
58
58
  Telephone and calling-provider adapters use the server entry point. The adapter supplies PCM16LE mono audio at 24 kHz and maps Inkibra output commands to its provider playback queue.
59
59
 
60
60
  ```ts
61
- import LiveVoice from "@inkibra/voice/server";
61
+ import LiveVoice from "@inkibra/voice-sdk/server";
62
62
 
63
63
  const session = await LiveVoice.connect({
64
64
  apiKey: process.env.INKIBRA_API_KEY!,
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { default } from "./public";
1
+ import LiveVoice from "./public";
2
2
  export * from "./public";
3
+ export default LiveVoice;
package/dist/index.js CHANGED
@@ -668,6 +668,6 @@ class LiveVoice {
668
668
  // src/index.ts
669
669
  var src_default = LiveVoice;
670
670
  export {
671
- LiveVoiceSession,
672
- src_default as default
671
+ src_default as default,
672
+ LiveVoiceSession
673
673
  };
package/dist/public.d.ts CHANGED
@@ -49,6 +49,15 @@ export type LiveVoicePhaseEvent = {
49
49
  previousPhase?: string;
50
50
  source: "initial" | "floor";
51
51
  };
52
+ export type LiveVoiceAssistantEnergyPrediction = {
53
+ startMs: number;
54
+ endMs: number;
55
+ energy: number;
56
+ };
57
+ export type LiveVoiceAssistantEnergyEvent = {
58
+ current: number;
59
+ predictions: LiveVoiceAssistantEnergyPrediction[];
60
+ };
52
61
  export type LiveVoiceEventMap = {
53
62
  "connection": {
54
63
  state: LiveVoiceConnectionState;
@@ -66,6 +75,7 @@ export type LiveVoiceEventMap = {
66
75
  reaction: string;
67
76
  status: "prepared" | "playing" | "completed" | "cancelled";
68
77
  };
78
+ "assistant.energy": LiveVoiceAssistantEnergyEvent;
69
79
  "tool.call": LiveVoiceToolCall;
70
80
  "tool.result": LiveVoiceToolCall & {
71
81
  ok: boolean;
@@ -80,6 +90,9 @@ export type LiveVoiceEventMap = {
80
90
  code: string;
81
91
  message: string;
82
92
  };
93
+ "unknown": {
94
+ message: Record<string, unknown>;
95
+ };
83
96
  };
84
97
  type EventName = keyof LiveVoiceEventMap;
85
98
  type EventHandler<K extends EventName> = (event: LiveVoiceEventMap[K]) => void;
@@ -87,10 +100,6 @@ export declare class LiveVoiceSession {
87
100
  private client;
88
101
  private tools;
89
102
  private listeners;
90
- private previousPartial;
91
- private previousCanonical;
92
- private previousFloor;
93
- private reactionStates;
94
103
  private currentPhase?;
95
104
  private constructor();
96
105
  static connect(options: LiveVoiceConnectOptions): Promise<LiveVoiceSession>;
@@ -99,8 +108,7 @@ export declare class LiveVoiceSession {
99
108
  stop(): void;
100
109
  dispose(): void;
101
110
  private emit;
102
- private acceptApplicationEvent;
103
- private acceptState;
111
+ private acceptPublicEvent;
104
112
  private executeTool;
105
113
  }
106
114
  export default class LiveVoice {
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { LiveVoiceConversationOptions, LiveVoiceEventMap, LiveVoicePlatformVoice, LiveVoiceTools } from "./public";
2
- export type { LiveVoiceCanonicalTurn, LiveVoiceConversationOptions, LiveVoiceEventMap, LiveVoiceFloorState, LiveVoicePhaseEvent, LiveVoicePlatformVoice, LiveVoiceTool, LiveVoiceToolCall, LiveVoiceTools, } from "./public";
2
+ export type { LiveVoiceAssistantEnergyEvent, LiveVoiceAssistantEnergyPrediction, LiveVoiceCanonicalTurn, LiveVoiceConversationOptions, LiveVoiceEventMap, LiveVoiceFloorState, LiveVoicePhaseEvent, LiveVoicePlatformVoice, LiveVoiceTool, LiveVoiceToolCall, LiveVoiceTools, } from "./public";
3
3
  export type LiveVoicePcmFormat = {
4
4
  encoding: "pcm_s16le";
5
5
  sampleRate: 24_000;
@@ -91,13 +91,11 @@ export declare class LiveVoiceServerSession {
91
91
  readonly closed: Promise<void>;
92
92
  private resolveClosed;
93
93
  private listeners;
94
- private previousPartial;
95
- private previousCanonical;
96
- private previousFloor;
97
- private reactionStates;
98
- private state?;
99
94
  private stopped;
100
95
  private prepared?;
96
+ private started?;
97
+ private currentPhase?;
98
+ private acceptingInput;
101
99
  private constructor();
102
100
  static connect(options: LiveVoiceServerConnectOptions): Promise<LiveVoiceServerSession>;
103
101
  on<K extends EventName>(event: K, handler: EventHandler<K>): () => void;
@@ -110,8 +108,7 @@ export declare class LiveVoiceServerSession {
110
108
  private writeInput;
111
109
  private sendReceipt;
112
110
  private executeTool;
113
- private acceptState;
114
- private acceptApplicationEvent;
111
+ private acceptPublicEvent;
115
112
  private emit;
116
113
  private finish;
117
114
  }
package/dist/server.js CHANGED
@@ -386,7 +386,7 @@ function asRecord(value) {
386
386
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
387
387
  }
388
388
  export {
389
- LiveVoiceServerSession,
389
+ liveVoicePcmFormat,
390
390
  LiveVoiceServer as default,
391
- liveVoicePcmFormat
391
+ LiveVoiceServerSession
392
392
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@inkibra/voice-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Browser and server SDK for Inkibra Live Voice",
5
5
  "license": "MIT",
6
- "repository": { "type": "git", "url": "git+https://github.com/inkibra/voice.git", "directory": "packages/sdk" },
6
+ "repository": { "type": "git", "url": "git+https://github.com/inKibra/voice-sdk.git", "directory": "packages/voice-sdk" },
7
7
  "type": "module",
8
8
  "main": "./dist/index.js",
9
9
  "types": "./dist/index.d.ts",