feat(digital-human): 前端加视频工作流选择器(api_video_workflow)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ type DigitalHumanDraft = {
|
|||||||
refAudioPath?: string;
|
refAudioPath?: string;
|
||||||
previewTtsText?: string;
|
previewTtsText?: string;
|
||||||
imageWorkflow?: string;
|
imageWorkflow?: string;
|
||||||
|
apiVideoWorkflow?: string;
|
||||||
imageWidth?: number;
|
imageWidth?: number;
|
||||||
imageHeight?: number;
|
imageHeight?: number;
|
||||||
promptPrefix?: string;
|
promptPrefix?: string;
|
||||||
@@ -368,6 +369,7 @@ export default function DigitalHuman() {
|
|||||||
const [refAudioPath, setRefAudioPath] = useState(isPrivateWorkspaceMediaUrl(draftRef.current.refAudioPath) ? '' : draftRef.current.refAudioPath || '');
|
const [refAudioPath, setRefAudioPath] = useState(isPrivateWorkspaceMediaUrl(draftRef.current.refAudioPath) ? '' : draftRef.current.refAudioPath || '');
|
||||||
const [previewTtsText, setPreviewTtsText] = useState(draftRef.current.previewTtsText || '你好,欢迎使用 BoosAPI 数字人。');
|
const [previewTtsText, setPreviewTtsText] = useState(draftRef.current.previewTtsText || '你好,欢迎使用 BoosAPI 数字人。');
|
||||||
const [imageWorkflow, setImageWorkflow] = useState(draftRef.current.imageWorkflow || '');
|
const [imageWorkflow, setImageWorkflow] = useState(draftRef.current.imageWorkflow || '');
|
||||||
|
const [apiVideoWorkflow, setApiVideoWorkflow] = useState(draftRef.current.apiVideoWorkflow || '');
|
||||||
const [imageWidth, setImageWidth] = useState(() => normalizeNumber(draftRef.current.imageWidth, 1024, 64));
|
const [imageWidth, setImageWidth] = useState(() => normalizeNumber(draftRef.current.imageWidth, 1024, 64));
|
||||||
const [imageHeight, setImageHeight] = useState(() => normalizeNumber(draftRef.current.imageHeight, 1024, 64));
|
const [imageHeight, setImageHeight] = useState(() => normalizeNumber(draftRef.current.imageHeight, 1024, 64));
|
||||||
const [promptPrefix, setPromptPrefix] = useState(draftRef.current.promptPrefix || DEFAULT_PROMPT_PREFIX);
|
const [promptPrefix, setPromptPrefix] = useState(draftRef.current.promptPrefix || DEFAULT_PROMPT_PREFIX);
|
||||||
@@ -460,6 +462,7 @@ export default function DigitalHuman() {
|
|||||||
refAudioPath,
|
refAudioPath,
|
||||||
previewTtsText,
|
previewTtsText,
|
||||||
imageWorkflow,
|
imageWorkflow,
|
||||||
|
apiVideoWorkflow,
|
||||||
imageWidth,
|
imageWidth,
|
||||||
imageHeight,
|
imageHeight,
|
||||||
promptPrefix,
|
promptPrefix,
|
||||||
@@ -478,6 +481,7 @@ export default function DigitalHuman() {
|
|||||||
refAudioPath,
|
refAudioPath,
|
||||||
previewTtsText,
|
previewTtsText,
|
||||||
imageWorkflow,
|
imageWorkflow,
|
||||||
|
apiVideoWorkflow,
|
||||||
imageWidth,
|
imageWidth,
|
||||||
imageHeight,
|
imageHeight,
|
||||||
promptPrefix,
|
promptPrefix,
|
||||||
@@ -574,6 +578,7 @@ export default function DigitalHuman() {
|
|||||||
title: title.trim() || undefined,
|
title: title.trim() || undefined,
|
||||||
n_scenes: nScenes,
|
n_scenes: nScenes,
|
||||||
media_workflow: imageWorkflow || undefined,
|
media_workflow: imageWorkflow || undefined,
|
||||||
|
api_video_workflow: apiVideoWorkflow || undefined,
|
||||||
tts_workflow: ttsWorkflow || undefined,
|
tts_workflow: ttsWorkflow || undefined,
|
||||||
frame_template: frameTemplate,
|
frame_template: frameTemplate,
|
||||||
ratio: selectedTemplateSize.ratio,
|
ratio: selectedTemplateSize.ratio,
|
||||||
@@ -1010,6 +1015,17 @@ export default function DigitalHuman() {
|
|||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
<label className="digital-human-field">
|
||||||
|
<span>视频工作流(可选,生成说话视频)</span>
|
||||||
|
<select value={apiVideoWorkflow} onChange={(event) => setApiVideoWorkflow(event.target.value)}>
|
||||||
|
<option value="">不生成视频(仅图片合成)</option>
|
||||||
|
{mediaWorkflows
|
||||||
|
.filter((wf) => wf.name.toLowerCase().includes('video'))
|
||||||
|
.map((wf) => (
|
||||||
|
<option key={workflowValue(wf)} value={workflowValue(wf)}>{pickItemLabel(wf)}{wf.source ? ` · ${wf.source}` : ''}</option>
|
||||||
|
))}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
<div className="digital-human-form-grid">
|
<div className="digital-human-form-grid">
|
||||||
<label className="digital-human-field">
|
<label className="digital-human-field">
|
||||||
<span>宽度</span>
|
<span>宽度</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user