视频图片儿分析模型。

This commit is contained in:
spllzh
2025-10-12 09:37:43 +08:00
parent b047a3be90
commit 5f2c952a6e
33 changed files with 1935 additions and 104 deletions

View File

@@ -102,6 +102,17 @@ public class DifyWorkflowResponseDto {

View File

@@ -25,12 +25,19 @@ public class VideoSynthesisRequestDto {
@Schema(description = "图片URL", required = true)
private String imageUrl;
@NotBlank(message = "音频URL不能为空")
@Schema(description = "音频URL", required = true)
@NotBlank(message = "音频URL")
@Schema(description = "音频URL")
private String audioUrl;
@Schema(description = "模板ID", example = "normal")
private String templateId = "normal";
@NotBlank(message = "模板URL")
@Schema(description = "模板URL")
private String videoTemplateUrl;
@Schema(description = "使用的模型", example = "liveportrait")
private String model = "liveportrait";
private String model ;
@Schema(description = "图片ID", example = "img-12345")
private String imageId;
@@ -47,8 +54,6 @@ public class VideoSynthesisRequestDto {
@Schema(description = "模型供应商", example = "dashscope")
private String modelProvider;
@Schema(description = "模板ID", example = "normal")
private String templateId = "normal";
@Schema(description = "眼部动作频率", example = "0.5")
private BigDecimal eyeMoveFreq = new BigDecimal("0.5");
@@ -90,11 +95,25 @@ public class VideoSynthesisRequestDto {
if (this.audioUrl != null) {
this.input.put("audio_url", this.audioUrl);
}
if (this.templateId != null) {
this.input.put("template_id", this.templateId);
}
if (this.templateId != null) {
this.input.put("driven_id", "mengwa_kaixin");
}
if (this.faceBbox != null) {
this.input.put("face_bbox", this.faceBbox);
}
if (this.extBbox != null) {
this.input.put("ext_bbox", this.extBbox);
}
// 构建 parameters 属性
this.parameters = new HashMap<>();
if (this.templateId != null) {
this.parameters.put("template_id", this.templateId);
this.parameters.put("video_ratio", "9:16");
}
if (this.eyeMoveFreq != null) {
this.parameters.put("eye_move_freq", this.eyeMoveFreq);