@decartai/sdk 0.0.30 → 0.0.32
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/realtime/audio-stream-manager.ts
|
|
2
2
|
/**
|
|
3
|
-
* Manages an audio stream for
|
|
3
|
+
* Manages an audio stream for live_avatar mode.
|
|
4
4
|
* Creates a continuous audio stream that outputs silence by default,
|
|
5
5
|
* and allows playing audio files through the stream.
|
|
6
6
|
*/
|
|
@@ -17,7 +17,7 @@ declare const avatarOptionsSchema: z.ZodObject<{
|
|
|
17
17
|
type AvatarOptions = z.infer<typeof avatarOptionsSchema>;
|
|
18
18
|
declare const realTimeClientConnectOptionsSchema: z.ZodObject<{
|
|
19
19
|
model: z.ZodObject<{
|
|
20
|
-
name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"
|
|
20
|
+
name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
|
|
21
21
|
urlPath: z.ZodString;
|
|
22
22
|
queueUrlPath: z.ZodOptional<z.ZodString>;
|
|
23
23
|
fps: z.ZodNumber;
|
package/dist/realtime/client.js
CHANGED
|
@@ -41,7 +41,7 @@ const createRealTimeClient = (opts) => {
|
|
|
41
41
|
const parsedOptions = realTimeClientConnectOptionsSchema.safeParse(options);
|
|
42
42
|
if (!parsedOptions.success) throw parsedOptions.error;
|
|
43
43
|
const sessionId = v4();
|
|
44
|
-
const isAvatarLive = options.model.name === "
|
|
44
|
+
const isAvatarLive = options.model.name === "live_avatar";
|
|
45
45
|
const { onRemoteStream, initialState, avatar } = parsedOptions.data;
|
|
46
46
|
let audioStreamManager;
|
|
47
47
|
let inputStream;
|
package/dist/shared/model.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/shared/model.d.ts
|
|
4
|
-
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"
|
|
4
|
+
declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>;
|
|
5
5
|
declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>;
|
|
6
6
|
declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>;
|
|
7
|
-
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"
|
|
7
|
+
declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
|
|
8
8
|
type Model = z.infer<typeof modelSchema>;
|
|
9
9
|
type RealTimeModels = z.infer<typeof realtimeModels>;
|
|
10
10
|
type VideoModels = z.infer<typeof videoModels>;
|
package/dist/shared/model.js
CHANGED
|
@@ -6,7 +6,7 @@ const realtimeModels = z.union([
|
|
|
6
6
|
z.literal("mirage"),
|
|
7
7
|
z.literal("mirage_v2"),
|
|
8
8
|
z.literal("lucy_v2v_720p_rt"),
|
|
9
|
-
z.literal("
|
|
9
|
+
z.literal("live_avatar")
|
|
10
10
|
]);
|
|
11
11
|
const videoModels = z.union([
|
|
12
12
|
z.literal("lucy-dev-i2v"),
|
|
@@ -167,9 +167,9 @@ const _models = {
|
|
|
167
167
|
height: 704,
|
|
168
168
|
inputSchema: z.object({})
|
|
169
169
|
},
|
|
170
|
-
|
|
171
|
-
urlPath: "/v1/
|
|
172
|
-
name: "
|
|
170
|
+
live_avatar: {
|
|
171
|
+
urlPath: "/v1/stream",
|
|
172
|
+
name: "live_avatar",
|
|
173
173
|
fps: 25,
|
|
174
174
|
width: 1280,
|
|
175
175
|
height: 720,
|