jbilcke-hf HF staff commited on
Commit
90266e1
1 Parent(s): f24ad59

deploy @aitube/client 0.0.12

Browse files
Files changed (1) hide show
  1. src/app/api/v1/create/index.ts +5 -6
src/app/api/v1/create/index.ts CHANGED
@@ -53,7 +53,6 @@ export async function create(request: {
53
  const defaultSegmentDurationInMs = 7000
54
 
55
  let currentElapsedTimeInMs = 0
56
- let currentSegmentDurationInMs = defaultSegmentDurationInMs
57
 
58
  const clap: ClapProject = newClap({
59
  meta: {
@@ -99,7 +98,7 @@ export async function create(request: {
99
 
100
  clap.segments.push(newSegment({
101
  track: 1,
102
- startTimeInMs: currentSegmentDurationInMs,
103
  assetDurationInMs: defaultSegmentDurationInMs,
104
  category: "storyboard",
105
  prompt: image,
@@ -108,7 +107,7 @@ export async function create(request: {
108
 
109
  clap.segments.push(newSegment({
110
  track: 2,
111
- startTimeInMs: currentSegmentDurationInMs,
112
  assetDurationInMs: defaultSegmentDurationInMs,
113
  category: "interface",
114
  prompt: title,
@@ -119,7 +118,7 @@ export async function create(request: {
119
 
120
  clap.segments.push(newSegment({
121
  track: 3,
122
- startTimeInMs: currentSegmentDurationInMs,
123
  assetDurationInMs: defaultSegmentDurationInMs,
124
  category: "dialogue",
125
  prompt: voice,
@@ -129,14 +128,14 @@ export async function create(request: {
129
  // the presence of a camera is mandatory
130
  clap.segments.push(newSegment({
131
  track: 4,
132
- startTimeInMs: currentSegmentDurationInMs,
133
  assetDurationInMs: defaultSegmentDurationInMs,
134
  category: "camera",
135
  prompt: "vertical video",
136
  outputType: "text"
137
  }))
138
 
139
- currentSegmentDurationInMs += defaultSegmentDurationInMs
140
  }
141
 
142
  return clap
 
53
  const defaultSegmentDurationInMs = 7000
54
 
55
  let currentElapsedTimeInMs = 0
 
56
 
57
  const clap: ClapProject = newClap({
58
  meta: {
 
98
 
99
  clap.segments.push(newSegment({
100
  track: 1,
101
+ startTimeInMs: currentElapsedTimeInMs,
102
  assetDurationInMs: defaultSegmentDurationInMs,
103
  category: "storyboard",
104
  prompt: image,
 
107
 
108
  clap.segments.push(newSegment({
109
  track: 2,
110
+ startTimeInMs: currentElapsedTimeInMs,
111
  assetDurationInMs: defaultSegmentDurationInMs,
112
  category: "interface",
113
  prompt: title,
 
118
 
119
  clap.segments.push(newSegment({
120
  track: 3,
121
+ startTimeInMs: currentElapsedTimeInMs,
122
  assetDurationInMs: defaultSegmentDurationInMs,
123
  category: "dialogue",
124
  prompt: voice,
 
128
  // the presence of a camera is mandatory
129
  clap.segments.push(newSegment({
130
  track: 4,
131
+ startTimeInMs: currentElapsedTimeInMs,
132
  assetDurationInMs: defaultSegmentDurationInMs,
133
  category: "camera",
134
  prompt: "vertical video",
135
  outputType: "text"
136
  }))
137
 
138
+ currentElapsedTimeInMs += defaultSegmentDurationInMs
139
  }
140
 
141
  return clap