Spaces:
Running
Running
Commit
·
4486611
1
Parent(s):
f21588d
slightly better logs
Browse files
src/app/api/generators/speech/generateVoiceWithParlerTTS.ts
CHANGED
@@ -17,15 +17,6 @@ export async function generateSpeechWithParlerTTS({
|
|
17 |
neverThrow?: boolean
|
18 |
}): Promise<string> {
|
19 |
|
20 |
-
const result = {
|
21 |
-
filePath: "",
|
22 |
-
fileName: "",
|
23 |
-
format: "mp3",
|
24 |
-
base64: "",
|
25 |
-
durationInSec: 5,
|
26 |
-
durationInMs: 5000
|
27 |
-
}
|
28 |
-
|
29 |
|
30 |
const actualFunction = async () => {
|
31 |
|
|
|
17 |
neverThrow?: boolean
|
18 |
}): Promise<string> {
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
const actualFunction = async () => {
|
22 |
|
src/app/api/v1/edit/dialogues/route.ts
CHANGED
@@ -43,7 +43,7 @@ export async function POST(req: NextRequest) {
|
|
43 |
console.log(`[api/generate/dialogues] shot [${shotSegment.startTimeInMs}:${shotSegment.endTimeInMs}] has ${shotSegments.length} segments (${shotDialogueSegments.length} dialogues)`)
|
44 |
|
45 |
if (shotDialogueSegment && !shotDialogueSegment.assetUrl) {
|
46 |
-
console.log(`[api/generate/dialogues] generating audio..`)
|
47 |
|
48 |
try {
|
49 |
shotDialogueSegment.assetUrl = await generateSpeechWithParlerTTS({
|
@@ -53,8 +53,6 @@ export async function POST(req: NextRequest) {
|
|
53 |
})
|
54 |
shotDialogueSegment.assetSourceType = getClapAssetSourceType(shotDialogueSegment.assetUrl)
|
55 |
|
56 |
-
console.log("TODO julian: properly set the asset type format")
|
57 |
-
|
58 |
} catch (err) {
|
59 |
console.log(`[api/generate/dialogues] failed to generate audio: ${err}`)
|
60 |
throw err
|
@@ -66,7 +64,7 @@ export async function POST(req: NextRequest) {
|
|
66 |
}
|
67 |
}
|
68 |
|
69 |
-
console.log(`[api/generate/dialogues] returning the clap augmented with dialogues`)
|
70 |
|
71 |
return new NextResponse(await serializeClap(clap), {
|
72 |
status: 200,
|
|
|
43 |
console.log(`[api/generate/dialogues] shot [${shotSegment.startTimeInMs}:${shotSegment.endTimeInMs}] has ${shotSegments.length} segments (${shotDialogueSegments.length} dialogues)`)
|
44 |
|
45 |
if (shotDialogueSegment && !shotDialogueSegment.assetUrl) {
|
46 |
+
// console.log(`[api/generate/dialogues] generating audio..`)
|
47 |
|
48 |
try {
|
49 |
shotDialogueSegment.assetUrl = await generateSpeechWithParlerTTS({
|
|
|
53 |
})
|
54 |
shotDialogueSegment.assetSourceType = getClapAssetSourceType(shotDialogueSegment.assetUrl)
|
55 |
|
|
|
|
|
56 |
} catch (err) {
|
57 |
console.log(`[api/generate/dialogues] failed to generate audio: ${err}`)
|
58 |
throw err
|
|
|
64 |
}
|
65 |
}
|
66 |
|
67 |
+
// console.log(`[api/generate/dialogues] returning the clap augmented with dialogues`)
|
68 |
|
69 |
return new NextResponse(await serializeClap(clap), {
|
70 |
status: 200,
|
src/app/api/v1/edit/storyboards/route.ts
CHANGED
@@ -73,7 +73,7 @@ export async function POST(req: NextRequest) {
|
|
73 |
|
74 |
// TASK 3: GENERATE MISSING STORYBOARD BITMAP
|
75 |
if (shotStoryboardSegment && !shotStoryboardSegment.assetUrl) {
|
76 |
-
console.log(`[api/generate/storyboards] generating image..`)
|
77 |
|
78 |
try {
|
79 |
shotStoryboardSegment.assetUrl = await generateStoryboard({
|
@@ -93,7 +93,7 @@ export async function POST(req: NextRequest) {
|
|
93 |
}
|
94 |
}
|
95 |
|
96 |
-
console.log(`[api/generate/storyboards] returning the clap augmented with storyboards`)
|
97 |
|
98 |
return new NextResponse(await serializeClap(clap), {
|
99 |
status: 200,
|
|
|
73 |
|
74 |
// TASK 3: GENERATE MISSING STORYBOARD BITMAP
|
75 |
if (shotStoryboardSegment && !shotStoryboardSegment.assetUrl) {
|
76 |
+
// console.log(`[api/generate/storyboards] generating image..`)
|
77 |
|
78 |
try {
|
79 |
shotStoryboardSegment.assetUrl = await generateStoryboard({
|
|
|
93 |
}
|
94 |
}
|
95 |
|
96 |
+
// console.log(`[api/generate/storyboards] returning the clap augmented with storyboards`)
|
97 |
|
98 |
return new NextResponse(await serializeClap(clap), {
|
99 |
status: 200,
|
src/app/dream/samples.tsx
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
export const theSimps = [
|
3 |
+
"photorealist, photo of Homer Simpson, in the 1950s, medium-shot, cinematic, outside, serious, crisp, sharp, perfect",
|
4 |
+
"photorealist, photo of Marge Simpson, in the 1950s, medium-shot, cinematic, outside, serious, crisp, sharp, perfect",
|
5 |
+
"photorealist, photo of Bart Simpson, in the 1950s, medium-shot, cinematic, outside, serious, crisp, sharp, perfect",
|
6 |
+
"photorealist, photo of Lisa Simpson, in the 1950s, medium-shot, cinematic, outside, serious, crisp, sharp, perfect",
|
7 |
+
]
|
src/components/interface/latent-engine/core/engine.tsx
CHANGED
@@ -14,6 +14,7 @@ import { localStorageKeys } from "@/app/state/localStorageKeys"
|
|
14 |
import { defaultSettings } from "@/app/state/defaultSettings"
|
15 |
import { useStore } from "@/app/state/useStore"
|
16 |
import { ClapProject, generateClapFromSimpleStory, serializeClap } from "@aitube/clap"
|
|
|
17 |
|
18 |
function LatentEngine({
|
19 |
media,
|
@@ -86,7 +87,9 @@ function LatentEngine({
|
|
86 |
// there is a bug, we can't unpack the .clap when it's from a data-uri :/
|
87 |
|
88 |
// open(mediaUrl)
|
89 |
-
const mockClap: ClapProject = generateClapFromSimpleStory(
|
|
|
|
|
90 |
const mockArchive: Blob = await serializeClap(mockClap)
|
91 |
// for some reason conversion to data uri doesn't work
|
92 |
// const mockDataUri = await blobToDataUri(mockArchive, "application/x-gzip")
|
|
|
14 |
import { defaultSettings } from "@/app/state/defaultSettings"
|
15 |
import { useStore } from "@/app/state/useStore"
|
16 |
import { ClapProject, generateClapFromSimpleStory, serializeClap } from "@aitube/clap"
|
17 |
+
import { theSimps } from "@/app/dream/samples"
|
18 |
|
19 |
function LatentEngine({
|
20 |
media,
|
|
|
87 |
// there is a bug, we can't unpack the .clap when it's from a data-uri :/
|
88 |
|
89 |
// open(mediaUrl)
|
90 |
+
const mockClap: ClapProject = generateClapFromSimpleStory({
|
91 |
+
story: theSimps
|
92 |
+
})
|
93 |
const mockArchive: Blob = await serializeClap(mockClap)
|
94 |
// for some reason conversion to data uri doesn't work
|
95 |
// const mockDataUri = await blobToDataUri(mockArchive, "application/x-gzip")
|