|
@@ -31,17 +31,6 @@ import java.util.*; |
|
|
@Component |
|
|
@Component |
|
|
public class AiVideoHelper { |
|
|
public class AiVideoHelper { |
|
|
|
|
|
|
|
|
// public static String uri = "http://222.128.9.132:22266"; |
|
|
|
|
|
// http://nas.pucao.cn:2001/gen_dh_video |
|
|
|
|
|
public static String uri = "http://nas.pucao.cn:2001"; |
|
|
|
|
|
|
|
|
|
|
|
// public static String url = "http://nas.pucao.cn:2002"; |
|
|
|
|
|
// public static String hy_url = "http://nas.pucao.cn:2002"; |
|
|
|
|
|
// |
|
|
|
|
|
// public static String url = "http://111.198.0.15:22299"; |
|
|
|
|
|
// public static String hy_url = "http://111.198.0.15:22288"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static String url; |
|
|
private static String url; |
|
|
@Value("${photo.url}") |
|
|
@Value("${photo.url}") |
|
|
public void setUrl(String url){ |
|
|
public void setUrl(String url){ |
|
@@ -70,7 +59,7 @@ public class AiVideoHelper { |
|
|
public static AiVideoResult createVideo(AiVideoParam videoParam) { |
|
|
public static AiVideoResult createVideo(AiVideoParam videoParam) { |
|
|
|
|
|
|
|
|
log.info("生成视频start request:" + videoParam.neglectImgString()); |
|
|
log.info("生成视频start request:" + videoParam.neglectImgString()); |
|
|
String response = doPost(uri+"/gen_dh_video", JSONObject.toJSONString(videoParam)); |
|
|
|
|
|
|
|
|
String response = doPost(talk_url+"/gen_dh_video", JSONObject.toJSONString(videoParam)); |
|
|
log.info("生成视频end response:"+response); |
|
|
log.info("生成视频end response:"+response); |
|
|
|
|
|
|
|
|
AiVideoResult result = new AiVideoResult(); |
|
|
AiVideoResult result = new AiVideoResult(); |
|
@@ -127,9 +116,9 @@ public class AiVideoHelper { |
|
|
// } |
|
|
// } |
|
|
} |
|
|
} |
|
|
public static AiPhotoSpeakResult createPhotoSpeakVideo(AiPhotoSpeakParam videoParam) { |
|
|
public static AiPhotoSpeakResult createPhotoSpeakVideo(AiPhotoSpeakParam videoParam) { |
|
|
String response = doPost("http://111.198.0.15:22299" + photo_speak_suffix, JSONObject.toJSONString(videoParam)); |
|
|
|
|
|
|
|
|
String response = doPost(url + photo_speak_suffix, JSONObject.toJSONString(videoParam)); |
|
|
log.info("生成视频end response:" + response); |
|
|
log.info("生成视频end response:" + response); |
|
|
log.info("生成视频的 IP:" + "http://111.198.0.15:22299" + photo_speak_suffix); |
|
|
|
|
|
|
|
|
log.info("生成视频的 IP:" + url + photo_speak_suffix); |
|
|
AiPhotoSpeakResult result = new AiPhotoSpeakResult(); |
|
|
AiPhotoSpeakResult result = new AiPhotoSpeakResult(); |
|
|
if (StringUtils.isBlank(response)) { |
|
|
if (StringUtils.isBlank(response)) { |
|
|
result.setSuccess(false); |
|
|
result.setSuccess(false); |
|
|