|
|
|
@ -2,6 +2,7 @@ package com.dsideal.aiSupport.Util.DashScope;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.dsideal.aiSupport.Util.DashScope.Kit.DashScopeCommon;
|
|
|
|
|
import lombok.SneakyThrows;
|
|
|
|
|
import okhttp3.*;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -9,16 +10,14 @@ import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
import static com.dsideal.aiSupport.AiSupportApplication.PropKit;
|
|
|
|
|
/**
|
|
|
|
|
* 阿里云达摩院灵动人像LivePortrait视频合成API工具类
|
|
|
|
|
*/
|
|
|
|
|
public class ImgSpeak {
|
|
|
|
|
public class ImgSpeak extends DashScopeCommon {
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(ImgSpeak.class);
|
|
|
|
|
private static final String API_URL = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis/";
|
|
|
|
|
private static final String FACE_DETECT_URL = "https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect";
|
|
|
|
|
private static final String TASK_URL = "https://dashscope.aliyuncs.com/api/v1/tasks/";
|
|
|
|
|
private static final String API_KEY=PropKit.get("aliyun.API_KEY");
|
|
|
|
|
// 获取项目根目录路径
|
|
|
|
|
protected static String projectRoot = System.getProperty("user.dir").replace("\\", "/") + "/dsAiSupport";
|
|
|
|
|
// 拼接相对路径
|
|
|
|
|