音频文件上传 | AI创作模块兼容音频
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-CoDurcdv.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BhcMFup1.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -20,6 +20,7 @@ interface VideoEngine {
|
||||
maxDuration: number;
|
||||
maxImageCount: number;
|
||||
maxVideoCount: number;
|
||||
maxAudioCount: number;
|
||||
supportsFirstLastFrame: boolean;
|
||||
supportsUniversalReference: boolean;
|
||||
isActive: boolean;
|
||||
@@ -74,6 +75,7 @@ const AdminVideoEngines: React.FC = () => {
|
||||
max_duration: values.maxDuration ?? 15,
|
||||
max_image_count: values.maxImageCount ?? 2,
|
||||
max_video_count: values.maxVideoCount ?? 0,
|
||||
max_audio_count: values.maxAudioCount ?? 0,
|
||||
supports_first_last_frame: values.supportsFirstLastFrame ?? false,
|
||||
supports_universal_reference: values.supportsUniversalReference ?? true,
|
||||
is_active: values.isActive ?? true,
|
||||
@@ -116,6 +118,7 @@ const AdminVideoEngines: React.FC = () => {
|
||||
maxDuration: 15,
|
||||
maxImageCount: 2,
|
||||
maxVideoCount: 0,
|
||||
maxAudioCount: 0,
|
||||
supportsFirstLastFrame: false,
|
||||
supportsUniversalReference: true,
|
||||
supportedRatios: ['16:9', '4:3', '1:1', '3:4', '9:16', '21:9'],
|
||||
@@ -165,6 +168,10 @@ const AdminVideoEngines: React.FC = () => {
|
||||
title: '最大视频', dataIndex: 'maxVideoCount', width: 100,
|
||||
render: (v: number) => <Tag color="cyan">{v} 个</Tag>,
|
||||
},
|
||||
{
|
||||
title: '最大音频', dataIndex: 'maxAudioCount', width: 100,
|
||||
render: (v: number) => <Tag color={v > 0 ? 'geekblue' : 'default'}>{v || 0} 段</Tag>,
|
||||
},
|
||||
{
|
||||
title: '首尾帧', dataIndex: 'supportsFirstLastFrame', width: 90,
|
||||
render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '支持' : '不支持'}</Tag>,
|
||||
@@ -210,7 +217,7 @@ const AdminVideoEngines: React.FC = () => {
|
||||
rowKey="id"
|
||||
loading={loading}
|
||||
pagination={false}
|
||||
scroll={{ x: 1100 }}
|
||||
scroll={{ x: 1200 }}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
@@ -276,6 +283,27 @@ const AdminVideoEngines: React.FC = () => {
|
||||
<Input type="number" size="large" />
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 16 }}>
|
||||
<Form.Item
|
||||
name="maxAudioCount"
|
||||
label="最大参考音频数"
|
||||
style={{ flex: 1 }}
|
||||
extra="0 表示不支持音频参考,最大 3 段"
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
const n = Number(value ?? 0);
|
||||
if (!Number.isInteger(n) || n < 0 || n > 3) {
|
||||
return Promise.reject(new Error('最大参考音频数必须为 0-3 的整数'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input type="number" size="large" min={0} max={3} />
|
||||
</Form.Item>
|
||||
</div>
|
||||
<div style={{ display: 'flex', gap: 16 }}>
|
||||
<Form.Item name="supportsFirstLastFrame" label="首尾帧模式" valuePropName="checked" style={{ paddingTop: 30, flex: 1 }}>
|
||||
<Switch checkedChildren="支持" unCheckedChildren="不支持" />
|
||||
|
||||
@@ -287,6 +287,11 @@ export interface GenerationAiVideoEngine {
|
||||
supportedResolutions: string[];
|
||||
supportedDurations: number[];
|
||||
maxDuration: number;
|
||||
maxImageCount?: number;
|
||||
maxVideoCount?: number;
|
||||
maxAudioCount?: number;
|
||||
supportsFirstLastFrame?: boolean;
|
||||
supportsUniversalReference?: boolean;
|
||||
priority: number;
|
||||
}
|
||||
|
||||
@@ -309,6 +314,11 @@ export interface GenerationAiEngineOption {
|
||||
supportedSizes?: Record<string, Record<string, string>>;
|
||||
defaultSize?: string;
|
||||
maxDuration?: number;
|
||||
maxImageCount?: number;
|
||||
maxVideoCount?: number;
|
||||
maxAudioCount?: number;
|
||||
supportsFirstLastFrame?: boolean;
|
||||
supportsUniversalReference?: boolean;
|
||||
priority: number;
|
||||
genType: GenerationAiGenType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user