🎥 Make videos programmatically with React
Add gen types
Vlad M42c5d17f2a4d
diff --git a/packages/template-ai-video/src/generator.ts b/packages/template-ai-video/src/generator.tsnew file mode 100644index 0000000000..1bd7050ef9--- /dev/null+++ b/packages/template-ai-video/src/generator.ts@@ -0,0 +1,14 @@+import { VoiceDescriptor } from "./types";++export const voices: VoiceDescriptor[] = [+ { id: "alloy", name: "Alloy" },+ { id: "ash", name: "Ash" },+ { id: "ballad", name: "Ballad" },+ { id: "coral", name: "Coral" },+ { id: "echo", name: "Echo" },+ { id: "fable", name: "Fable" },+ { id: "nova", name: "Nova" },+ { id: "onyx", name: "Onyx" },+ { id: "sage", name: "Sage" },+ { id: "shimme", name: "Shimme" },+];diff --git a/packages/template-ai-video/src/types.ts b/packages/template-ai-video/src/types.tsindex 0a1bf4b1fb..2a7beab4f2 100644--- a/packages/template-ai-video/src/types.ts+++ b/packages/template-ai-video/src/types.ts@@ -65,3 +65,31 @@ export {AudioElementSchema,TimelineSchema,};++export const AiVideoSlideSchema = z.object({+ uid: z.string(),+ text: z.string(),+ imageDesc: z.string(),+});++export type AiVideoSlide = z.infer<typeof AiVideoSlideSchema>;++export const StoryScript = z.object({+ text: z.string(),+});++export const StoryWithImages = z.object({+ result: z.array(+ z.object({+ text: z.string(),+ imageDescription: z.string(),+ }),+ ),+});++export const VoiceDescriptorSchema = z.object({+ id: z.string(),+ name: z.string(),+});++export type VoiceDescriptor = z.infer<typeof VoiceDescriptorSchema>;