|
|
@@ -31,8 +31,11 @@ public class AiVideoHelper { |
|
|
|
// http://nas.pucao.cn:2001/gen_dh_video |
|
|
|
public static String uri = "http://nas.pucao.cn:2001"; |
|
|
|
|
|
|
|
public static String url1 = "http://nas.pucao.cn:2002"; |
|
|
|
public static String url = "http://111.198.0.15:22299"; |
|
|
|
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"; |
|
|
|
|
|
|
|
public static String photo_speak_suffix = "/img_talking"; |
|
|
|
public static String image_quality_suffix = "/image_qualit"; |
|
|
|
public static String voice_preview = "/tts_wav"; |
|
|
@@ -126,9 +129,11 @@ public class AiVideoHelper { |
|
|
|
JSONObject data = jsonObject.getJSONObject("data"); |
|
|
|
String videoUrl = data.getString("url"); |
|
|
|
String saveDir = data.getString("save_dir"); |
|
|
|
String audioPath = data.getString("audio_path"); |
|
|
|
result.setSuccess(true); |
|
|
|
result.setUrl(videoUrl); |
|
|
|
result.setSaveDir(saveDir); |
|
|
|
result.setAudioPath(audioPath); |
|
|
|
String resultMsg = result.getMsgInfo(code, msg); |
|
|
|
result.setMsg(resultMsg); |
|
|
|
} else { |
|
|
@@ -216,7 +221,7 @@ public class AiVideoHelper { |
|
|
|
} |
|
|
|
|
|
|
|
public static AiVideoHqResult videoHq(AiVideoHqParam param) { |
|
|
|
String response = doPost(url + video_hq, JSONObject.toJSONString(param)); |
|
|
|
String response = doPost(hy_url + video_hq, JSONObject.toJSONString(param)); |
|
|
|
log.info("视频超分 end response:" + response); |
|
|
|
AiVideoHqResult result = new AiVideoHqResult(); |
|
|
|
|
|
|
@@ -277,13 +282,22 @@ public class AiVideoHelper { |
|
|
|
// AiVideoResult video = AiVideoHelper.createVideo(videoParam); |
|
|
|
// |
|
|
|
|
|
|
|
// AiPhotoSpeakParam param = new AiPhotoSpeakParam(); |
|
|
|
// param.setGen_txt("人多泰达股份冲冠怒发代发"); |
|
|
|
// param.setImg(Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personphoto/16564099737021232.png")); |
|
|
|
// param.setGender("male"); |
|
|
|
// param.setVoice_id("yue-CN-YunSongNeural"); |
|
|
|
// param.setVoice_style("default"); |
|
|
|
// param.setUrl("None"); |
|
|
|
// AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param); |
|
|
|
|
|
|
|
AiPhotoSpeakParam param = new AiPhotoSpeakParam(); |
|
|
|
param.setGen_txt("人多泰达股份冲冠怒发代发"); |
|
|
|
param.setImg(Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personphoto/16564099737021232.png")); |
|
|
|
param.setGender("male"); |
|
|
|
param.setVoice_id("yue-CN-YunSongNeural"); |
|
|
|
param.setGen_txt("None"); |
|
|
|
param.setImg(Base64Util.imageUrlToBase64("https://suimang.oss-accelerate.aliyuncs.com/builtin/personphoto/seed50258.png")); |
|
|
|
param.setGender("None"); |
|
|
|
param.setVoice_id("default"); |
|
|
|
param.setVoice_style("default"); |
|
|
|
param.setUrl("None"); |
|
|
|
param.setUrl("https://video.metavatar.cc/sv/43a5c16d-189251d6a98/43a5c16d-189251d6a98.mp3"); |
|
|
|
AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param); |
|
|
|
|
|
|
|
// AiCheckPhotoParam param = new AiCheckPhotoParam(); |
|
|
|