Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
Merge feat-wulien-video into develop
wulien79ecf42c77f0
diff --cc apps/daemon/src/api/server.tsindex b65796fd,f641e600..bae31f6b--- a/apps/daemon/src/api/server.ts+++ b/apps/daemon/src/api/server.ts@@@ -54,10 -54,11 +54,12 @@@ importcreateFfmpegCoverImageNormalizer,createImageExecutor} from '../creator/image/executor.js';+ import { createVideoExecutor } from '../creator/video/executor.js';import { createClipExecutor } from '../creator/clip/executor.js';import { createStickmanExecutor } from '../creator/stickman/executor.js';+import { createSmartDubbingExecutor } from '../creator/smart-dubbing/executor.js';import { createCreatorProjectCoverService } from '../creator/project-cover.js';+ import { createVideoGenerationService } from '../video-generation/service.js';import {createCreatorReferenceImageUploadService,type CreatorReferenceImageUploadServicediff --cc apps/daemon/src/creator/templates/registry.tsindex a734ead7,dade7b51..5ef8e1e0--- a/apps/daemon/src/creator/templates/registry.ts+++ b/apps/daemon/src/creator/templates/registry.ts@@@ -8,9 -8,9 +8,10 @@@ importcreateImageGenerationTemplate,createLegacyImageGenerationTemplate} from './image-generation.js';+ import { createVideoGenerationTemplate } from './video-generation.js';import { createAutoClipTemplate } from './auto-clip.js';import { createStickmanVideoTemplate } from './stickman-video.js';+import { createSmartDubbingTemplate } from './smart-dubbing.js';import type {CreatorTemplateDefinition,CreatorTemplateRegistry@@@ -22,8 -22,8 +23,9 @@@ exportcreateLegacyCoverTemplate,createImageGenerationTemplate,createLegacyImageGenerationTemplate,+ createVideoGenerationTemplate,createStickmanVideoTemplate,+ createSmartDubbingTemplate,createLegacyVideoDownloadTemplate,createVideoDownloadTemplate,createVideoTranslationTemplate@@@ -38,7 -38,7 +40,8 @@@ export function createDefaultCreatorTemcreateCoverTemplate(),createLegacyImageGenerationTemplate(),createImageGenerationTemplate(),+ createSmartDubbingTemplate(),+ createVideoGenerationTemplate(),createAutoClipTemplate(),createStickmanVideoTemplate()]);diff --cc apps/daemon/test/unit/creator-template-registry.test.tsindex d7349be3,4f2cafcf..550d4aa1--- a/apps/daemon/test/unit/creator-template-registry.test.ts+++ b/apps/daemon/test/unit/creator-template-registry.test.ts@@@ -3,8 -3,8 +3,9 @@@ importcreateCoverTemplate,createImageGenerationTemplate,createCreatorTemplateRegistry,+ createSmartDubbingTemplate,createVideoDownloadTemplate,+ createVideoGenerationTemplate,createVideoTranslationTemplate} from '../../src/creator/templates/registry.js';diff --cc apps/web/src/app/AppController.tsxindex 5534138f,a3b05f36..e75a38c0--- a/apps/web/src/app/AppController.tsx+++ b/apps/web/src/app/AppController.tsx@@@ -144,7 -144,7 +144,6 @@@ import { createRunService } from '../seimport { createRuntimeDependencyService } from '../services/runtime-dependency-service.js';import { createScheduleService } from '../services/schedule-service.js';import { createSearchService } from '../services/search-service.js';- import { createVideoGenerationService } from '../services/video-generation-service.js';-import { createSmartDubbingService } from '../services/smart-dubbing-service.js';import { createSkillMarketService } from '../services/skill-market-service.js';import { createTaskService } from '../services/task-service.js';import { createThreadService } from '../services/thread-service.js';@@@ -508,11 -508,11 +507,7 @@@ export function AppController(props: Apconst videoMetadataService = useMemo(() => runtimeClient === null ? undefined : createVideoMetadataService(runtimeClient),[runtimeClient]- );- const videoGenerationService = useMemo(- () => runtimeClient === null ? undefined : createVideoGenerationService(runtimeClient),- [runtimeClient]);- const smartDubbingService = useMemo(- () => runtimeClient === null ? undefined : createSmartDubbingService(runtimeClient),- [runtimeClient]- );const scheduleService = useMemo(() => runtimeClient === null ? null : createScheduleService(runtimeClient),[runtimeClient]diff --cc apps/web/src/features/dashboard/CreatorCollaborationPanel.test.tsxindex 57e190a6,e1d3b07a..580661ec--- a/apps/web/src/features/dashboard/CreatorCollaborationPanel.test.tsx+++ b/apps/web/src/features/dashboard/CreatorCollaborationPanel.test.tsx@@@ -5,8 -5,8 +5,9 @@@ import { LanguageProvider } from '../..import CreatorCollaborationPanel from './CreatorCollaborationPanel.js';import {coverPanelAdapter,+ smartDubbingPanelAdapter,- videoDownloadPanelAdapter+ videoDownloadPanelAdapter,+ videoGenerationPanelAdapter} from './creator-panel-adapters.js';import { CreatorSessionProvider } from './creator-session-store.js';diff --cc apps/web/src/features/dashboard/DashboardPage.test.tsxindex cf8718b3,0792145c..869fd0af--- a/apps/web/src/features/dashboard/DashboardPage.test.tsx+++ b/apps/web/src/features/dashboard/DashboardPage.test.tsx@@@ -727,18 -649,18 +728,19 @@@ describe('DashboardPage', () =>expect(within(videoTranslationCard).getByText('HOT')).toBeInTheDocument();expect(within(videoTranslationCard).queryByText('NEW')).not.toBeInTheDocument();const appCards = Array.from(container.querySelectorAll('.dashboard-app-card'));-- expect(appCards).toHaveLength(5);++ expect(appCards).toHaveLength(6);expect(appCards.map(card => card.querySelector('strong')?.textContent)).toEqual(['视频翻译','视频下载','封面生成',+ '智能配音',+ '视频生成','图像生成']);expect(screen.queryByRole('button', { name: /^火柴人动画/ })).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: /^自动剪辑/ })).not.toBeInTheDocument();- expect(screen.queryByRole('button', { name: /^智能配音/ })).not.toBeInTheDocument();+ expect(screen.getByRole('button', { name: /^智能配音/ })).toBeInTheDocument();- expect(screen.queryByRole('button', { name: /^视频生成/ })).not.toBeInTheDocument();+ expect(screen.getByRole('button', { name: /^视频生成/ })).toBeInTheDocument();expect(screen.queryByRole('button', { name: /^数字人口播/ })).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: /^视频转格式/ })).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: /^画面扩展/ })).not.toBeInTheDocument();diff --cc apps/web/src/features/dashboard/DashboardPage.tsxindex ec45ed4c,f43da11b..e47871b8--- a/apps/web/src/features/dashboard/DashboardPage.tsx+++ b/apps/web/src/features/dashboard/DashboardPage.tsx@@@ -40,8 -40,8 +40,7 @@@ importisVisibleCreatorWorkspace} from './creator-workspace.js';import type { VideoMetadataService } from '../../services/video-metadata-service.js';-import type { SmartDubbingService } from '../../services/smart-dubbing-service.js';import type { CreatorServicesSettingsService } from '../../services/creator-services-service.js';- import type { VideoGenerationService } from '../../services/video-generation-service.js';type DashboardCategory = '视频创作' | '图像创作' | '音频处理' | '视频编辑' | '数字人';@@@ -161,7 -161,7 +160,7 @@@ const creatorTools: DashboardEntry[] =},];- const categories = ['全部', '视频编辑', '图像创作', '音频处理'] as const;-const categories = ['全部', '视频创作', '视频编辑', '图像创作'] as const;++const categories = ['全部', '视频创作', '视频编辑', '图像创作', '音频处理'] as const;type CategoryFilter = typeof categories[number];const CREATOR_JOB_LOAD_TIMEOUT_MS = 15_000;@@@ -175,8 -175,8 +174,7 @@@ export default function DashboardPage(ponBackToHome?(): void;onWorkspaceModeChange?(active: boolean): void;skillLaunch?: CreatorSkillLaunch;- smartDubbingService?: SmartDubbingService;creatorServicesService?: CreatorServicesSettingsService | null;- videoGenerationService?: VideoGenerationService;videoMetadataService?: VideoMetadataService;workspace?: CreatorWorkspace;jobId?: string;diff --cc apps/web/src/features/dashboard/creator-panel-adapters.tsindex ca4796f0,7e6c1d5b..d047c33f--- a/apps/web/src/features/dashboard/creator-panel-adapters.ts+++ b/apps/web/src/features/dashboard/creator-panel-adapters.ts@@@ -310,54 -310,86 +310,130 @@@ export const videoDownloadPanelAdapter}};+export const smartDubbingPanelAdapter: CreatorPanelAdapter = {+ id: 'smart-dubbing',+ composerPlaceholder: l => l(+ '询问生成状态,或调整文案、音色、风格和语速',+ 'Ask about progress or adjust the script, voice, delivery, and speed'+ ),+ stageLabel(stageId, l) {+ if (stageId === 'tts') return l('生成配音', 'Generate dubbing');+ return l('智能配音任务', 'AI dubbing task');+ },+ phaseLabel(phase, l) {+ const labels: Record<string, string> = {+ validating: l('检查配音设置', 'Checking dubbing settings'),+ generating_voice: l('生成配音音频', 'Generating dubbing audio'),+ finalizing_output: l('整理配音文件', 'Finalizing the dubbing file'),+ completed: l('配音音频已生成', 'Dubbing audio generated')+ };+ return labels[phase] ?? genericPhaseLabel(phase, l);+ },+ activityStageId: readActivityStageId,+ normalizeActivity(activity, l) {+ if (activity.action === 'run-stage') {+ return { label: l('开始生成配音', 'Started generating dubbing'), fields: [] };+ }+ return normalizeCommonActivity(+ activity,+ l,+ smartDubbingPanelAdapter,+ {},+ smartDubbingFieldLabel+ );+ },+ readStageProgress: readStandardProgress,+ runningProgressText(_stage, progress, l) {+ return progress.phase === null+ ? null+ : smartDubbingPanelAdapter.phaseLabel(progress.phase, l);+ },+ succeededProgressText(_stage, l) {+ return l('配音音频已生成', 'Dubbing audio generated');+ }+};++ export const videoGenerationPanelAdapter: CreatorPanelAdapter = {+ id: 'video-generation',+ composerPlaceholder: l => l(+ '询问生成状态,或调整视频内容、服务、模型、画幅和时长',+ 'Ask about progress or adjust the video content, provider, model, format, and duration'+ ),+ stageLabel(stageId, l) {+ if (stageId === 'generate') return l('生成视频', 'Generate video');+ return l('视频生成任务', 'Video generation task');+ },+ phaseLabel(phase, l) {+ const labels: Record<string, string> = {+ validating: l('检查视频生成设置', 'Checking video generation settings'),+ preparing_reference: l('准备视频参考图', 'Preparing the reference image'),+ submitting: l('提交视频生成任务', 'Submitting the video generation task'),+ queued: l('等待视频服务开始生成', 'Waiting for the video provider'),+ generating: l('视频生成中', 'Generating video'),+ downloading: l('下载生成的视频', 'Downloading the generated video'),+ collecting_output: l('整理视频文件', 'Collecting the video file'),+ validating_output: l('检查视频文件', 'Checking the video file'),+ completed: l('视频已生成', 'Video generated'),+ provider_failed: l('视频服务生成失败', 'Video provider failed')+ };+ return labels[phase] ?? genericPhaseLabel(phase, l);+ },+ activityStageId: readActivityStageId,+ normalizeActivity(activity, l) {+ return normalizeCommonActivity(+ activity,+ l,+ videoGenerationPanelAdapter,+ {+ 'register-reference-image': l('上传了视频参考图', 'Uploaded a video reference image')+ },+ videoGenerationFieldLabel+ );+ },+ readStageProgress(stage) {+ const progress = readStandardProgress(stage);+ if (+ progress.percent === null+ && (progress.phase === 'queued' || progress.phase === 'generating')+ ) {+ return {+ ...progress,+ indeterminate: stage.status === 'running'+ };+ }+ return progress;+ },+ runningProgressText(_stage, progress, l) {+ return progress.phase === null+ ? null+ : videoGenerationPanelAdapter.phaseLabel(progress.phase, l);+ },+ failedProgressText(stage, l) {+ if (stage.errorCode === 'creator_video_config_missing') {+ return l(+ '请先在设置的 AI 服务中配置视频生成服务',+ 'Configure a video generation provider in AI Services first.'+ );+ }+ if (stage.errorCode === 'creator_video_model_unavailable') {+ return l(+ '当前账号未开通所选视频模型,请切换模型版本或前往服务商控制台开通',+ 'The selected video model is not enabled for this account. Switch models or enable it in the provider console.'+ );+ }+ return null;+ },+ succeededProgressText(_stage, l) {+ return l('视频已生成,可以预览或下载', 'The video is ready to preview or download');+ }+ };+export function creatorPanelAdapterFor(templateId: string): CreatorPanelAdapter {if (templateId === 'video-translation') return videoTranslationPanelAdapter;if (templateId === 'video-download') return videoDownloadPanelAdapter;+ if (templateId === 'smart-dubbing') return smartDubbingPanelAdapter;if (templateId === 'cover') return coverPanelAdapter;+ if (templateId === 'video-generation') return videoGenerationPanelAdapter;return genericAdapter;}@@@ -470,23 -502,21 +546,38 @@@ function videoDownloadFieldLabelreturn labels[field] ?? null;}+function smartDubbingFieldLabel(+ field: string,+ l: CreatorPanelLocalize+): string | null {+ const labels: Record<string, string> = {+ text: l('配音文案', 'Dubbing script'),+ ttsProvider: l('配音服务', 'TTS provider'),+ ttsModel: l('配音模型', 'TTS model'),+ voiceCode: l('音色', 'Voice'),+ voiceName: l('音色名称', 'Voice name'),+ style: l('表达风格', 'Delivery style'),+ speed: l('语速', 'Speaking rate'),+ format: l('音频格式', 'Audio format')+ };+ return labels[field] ?? null;+}++ function videoGenerationFieldLabel(+ field: string,+ l: CreatorPanelLocalize+ ): string | null {+ const labels: Record<string, string> = {+ prompt: l('视频描述', 'Video prompt'),+ provider: l('视频服务', 'Video provider'),+ model: l('模型版本', 'Model version'),+ size: l('画幅与分辨率', 'Format and resolution'),+ duration: l('视频时长', 'Video duration'),+ referenceImageArtifactId: l('参考图', 'Reference image')+ };+ return labels[field] ?? null;+ }+function readActivityStageId(activity: CreatorActivity): string | null {const structured = readString(activity.details.stageId);if (structured !== null) return structured;diff --cc apps/web/src/features/dashboard/creator-workspace.tsindex 11340012,fc2f2897..356f51c7--- a/apps/web/src/features/dashboard/creator-workspace.ts+++ b/apps/web/src/features/dashboard/creator-workspace.ts@@@ -24,9 -24,9 +24,10 @@@ export const creatorWorkspaces =export const visibleCreatorWorkspaces = ['video-translation','video-download',+ 'smart-dubbing','cover-generator',- 'image-generation'+ 'image-generation',+ 'video-generation'] as const satisfies readonly CreatorWorkspace[];export const creatorRuntimeWorkspaces = [@@@ -34,9 -34,9 +35,10 @@@'video-download','stickman-video','auto-clips',+ 'smart-dubbing','cover-generator',- 'image-generation'+ 'image-generation',+ 'video-generation'] as const satisfies readonly CreatorWorkspace[];export type CreatorRuntimeWorkspace = typeof creatorRuntimeWorkspaces[number];@@@ -46,9 -46,9 +48,10 @@@ const templateByWorkspace: Record<Creat'video-download': 'video-download','stickman-video': 'stickman-video','auto-clips': 'auto-clip',+ 'smart-dubbing': 'smart-dubbing','cover-generator': 'cover',- 'image-generation': 'image-generation'+ 'image-generation': 'image-generation',+ 'video-generation': 'video-generation'};export function isCreatorWorkspace(value: string): value is CreatorWorkspace {