vargai 0.4.0-alpha89 → 0.4.0-alpha90
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/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill definitions index
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export { definition as talkingCharacter } from "./talking-character";
|
|
6
|
+
export { definition as textToTiktok } from "./text-to-tiktok";
|
|
7
|
+
|
|
8
|
+
// All skill definitions for auto-loading
|
|
9
|
+
import { definition as talkingCharacterDefinition } from "./talking-character";
|
|
10
|
+
import { definition as textToTiktokDefinition } from "./text-to-tiktok";
|
|
11
|
+
|
|
12
|
+
export const allSkills = [talkingCharacterDefinition, textToTiktokDefinition];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Talking Character Skill
|
|
3
|
+
* Create a talking character video with lipsync and captions
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import {
|
|
8
|
+
captionStyleSchema,
|
|
9
|
+
simpleVoiceSchema,
|
|
10
|
+
videoDurationSchema,
|
|
11
|
+
} from "../../core/schema/shared";
|
|
12
|
+
import type { SkillDefinition, ZodSchema } from "../../core/schema/types";
|
|
13
|
+
|
|
14
|
+
// Input schema with Zod
|
|
15
|
+
const talkingCharacterInputSchema = z.object({
|
|
16
|
+
text: z.string().describe("Script/text for the character to say"),
|
|
17
|
+
characterPrompt: z
|
|
18
|
+
.string()
|
|
19
|
+
.default("professional headshot of a friendly person, studio lighting")
|
|
20
|
+
.describe("Prompt to generate the character"),
|
|
21
|
+
voice: simpleVoiceSchema.default("sam").describe("Voice to use for speech"),
|
|
22
|
+
duration: videoDurationSchema.default(5).describe("Video duration"),
|
|
23
|
+
style: captionStyleSchema.default("tiktok").describe("Caption style"),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Output schema with Zod
|
|
27
|
+
const talkingCharacterOutputSchema = z.object({
|
|
28
|
+
videoUrl: z.string(),
|
|
29
|
+
characterImageUrl: z.string().optional(),
|
|
30
|
+
audioPath: z.string().optional(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Schema object for the definition
|
|
34
|
+
const schema: ZodSchema<
|
|
35
|
+
typeof talkingCharacterInputSchema,
|
|
36
|
+
typeof talkingCharacterOutputSchema
|
|
37
|
+
> = {
|
|
38
|
+
input: talkingCharacterInputSchema,
|
|
39
|
+
output: talkingCharacterOutputSchema,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const definition: SkillDefinition<typeof schema> = {
|
|
43
|
+
type: "skill",
|
|
44
|
+
name: "talking-character",
|
|
45
|
+
description: "Create a talking character video with lipsync and captions",
|
|
46
|
+
schema,
|
|
47
|
+
steps: [
|
|
48
|
+
{
|
|
49
|
+
name: "generate-character",
|
|
50
|
+
run: "image",
|
|
51
|
+
inputs: {
|
|
52
|
+
prompt: "$inputs.characterPrompt",
|
|
53
|
+
provider: "higgsfield",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "generate-voice",
|
|
58
|
+
run: "voice",
|
|
59
|
+
inputs: {
|
|
60
|
+
text: "$inputs.text",
|
|
61
|
+
voice: "$inputs.voice",
|
|
62
|
+
output: "output/voiceover.mp3",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "animate-character",
|
|
67
|
+
run: "sync",
|
|
68
|
+
inputs: {
|
|
69
|
+
image: "$results.generate-character.imageUrl",
|
|
70
|
+
audio: "output/voiceover.mp3",
|
|
71
|
+
prompt: "person talking naturally, professional demeanor",
|
|
72
|
+
duration: "$inputs.duration",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "add-captions",
|
|
77
|
+
run: "captions",
|
|
78
|
+
inputs: {
|
|
79
|
+
video: "$results.animate-character.videoUrl",
|
|
80
|
+
output: "output/final.mp4",
|
|
81
|
+
style: "$inputs.style",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default definition;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text to TikTok Skill
|
|
3
|
+
* Turn text into a TikTok with AI-generated looping background and voiceover
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import {
|
|
8
|
+
captionStyleSchema,
|
|
9
|
+
simpleVoiceSchema,
|
|
10
|
+
} from "../../core/schema/shared";
|
|
11
|
+
import type { SkillDefinition, ZodSchema } from "../../core/schema/types";
|
|
12
|
+
|
|
13
|
+
// Input schema with Zod
|
|
14
|
+
const textToTiktokInputSchema = z.object({
|
|
15
|
+
text: z.string().describe("Text content to convert to video"),
|
|
16
|
+
voice: simpleVoiceSchema.default("sam").describe("Voice for narration"),
|
|
17
|
+
backgroundPrompt: z
|
|
18
|
+
.string()
|
|
19
|
+
.default(
|
|
20
|
+
"POV from inside moving car driving through rainy city at night, motion blur on streetlights, cinematic",
|
|
21
|
+
)
|
|
22
|
+
.describe("Prompt for background video"),
|
|
23
|
+
captionStyle: captionStyleSchema.default("tiktok").describe("Caption style"),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Output schema with Zod
|
|
27
|
+
const textToTiktokOutputSchema = z.object({
|
|
28
|
+
videoUrl: z.string(),
|
|
29
|
+
voiceoverPath: z.string().optional(),
|
|
30
|
+
captionsPath: z.string().optional(),
|
|
31
|
+
backgroundVideoUrl: z.string().optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Schema object for the definition
|
|
35
|
+
const schema: ZodSchema<
|
|
36
|
+
typeof textToTiktokInputSchema,
|
|
37
|
+
typeof textToTiktokOutputSchema
|
|
38
|
+
> = {
|
|
39
|
+
input: textToTiktokInputSchema,
|
|
40
|
+
output: textToTiktokOutputSchema,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const definition: SkillDefinition<typeof schema> = {
|
|
44
|
+
type: "skill",
|
|
45
|
+
name: "text-to-tiktok",
|
|
46
|
+
description: "Turn text into a TikTok with looping background and voiceover",
|
|
47
|
+
schema,
|
|
48
|
+
steps: [
|
|
49
|
+
{
|
|
50
|
+
name: "generate-voiceover",
|
|
51
|
+
run: "voice",
|
|
52
|
+
inputs: {
|
|
53
|
+
text: "$inputs.text",
|
|
54
|
+
voice: "$inputs.voice",
|
|
55
|
+
output: "output/voiceover.mp3",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "transcribe",
|
|
60
|
+
run: "transcribe",
|
|
61
|
+
inputs: {
|
|
62
|
+
audio: "output/voiceover.mp3",
|
|
63
|
+
provider: "fireworks",
|
|
64
|
+
output: "output/captions.srt",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "generate-background-frame",
|
|
69
|
+
run: "image",
|
|
70
|
+
inputs: {
|
|
71
|
+
prompt: "$inputs.backgroundPrompt",
|
|
72
|
+
size: "portrait_16_9",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "generate-background-video",
|
|
77
|
+
run: "video",
|
|
78
|
+
inputs: {
|
|
79
|
+
prompt: "$inputs.backgroundPrompt",
|
|
80
|
+
image: "$results.generate-background-frame.imageUrl",
|
|
81
|
+
duration: 10,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "add-captions",
|
|
86
|
+
run: "captions",
|
|
87
|
+
inputs: {
|
|
88
|
+
video: "$results.generate-background-video.videoUrl",
|
|
89
|
+
output: "output/final.mp4",
|
|
90
|
+
srt: "output/captions.srt",
|
|
91
|
+
style: "$inputs.captionStyle",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default definition;
|