( videoId: string, userId: string, aiGenerationEnabled: boolean, )
| 495 | } |
| 496 | |
| 497 | async function queueTranscriptionRegeneration( |
| 498 | videoId: string, |
| 499 | userId: string, |
| 500 | aiGenerationEnabled: boolean, |
| 501 | ): Promise<void> { |
| 502 | "use step"; |
| 503 | |
| 504 | try { |
| 505 | const result = await transcribeVideo( |
| 506 | videoId as Video.VideoId, |
| 507 | userId, |
| 508 | aiGenerationEnabled, |
| 509 | ); |
| 510 | |
| 511 | if (!result.success) { |
| 512 | console.warn("[editVideoWorkflow] Failed to queue transcription", { |
| 513 | videoId, |
| 514 | message: result.message, |
| 515 | }); |
| 516 | } |
| 517 | } catch (error) { |
| 518 | console.warn("[editVideoWorkflow] Failed to queue transcription", error); |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | async function clearTranscriptObjects(video: typeof videos.$inferSelect) { |
| 523 | const [bucket] = await Storage.getAccessForVideo( |
no test coverage detected