|
|
@@ -224,18 +224,25 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { |
|
|
|
param.setUrl(voiceMaterialUrl); |
|
|
|
} |
|
|
|
|
|
|
|
AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param); |
|
|
|
if (video.isSuccess()) { |
|
|
|
photoSpeakVideo.setSaveDir(video.getSaveDir()); |
|
|
|
photoSpeakVideo.setAudioPath(video.getAudioPath()); |
|
|
|
photoSpeakVideo.setVideoPath(video.getUrl()); |
|
|
|
try { |
|
|
|
AiPhotoSpeakResult video = AiVideoHelper.createPhotoSpeakVideo(param); |
|
|
|
if (video.isSuccess()) { |
|
|
|
photoSpeakVideo.setSaveDir(video.getSaveDir()); |
|
|
|
photoSpeakVideo.setAudioPath(video.getAudioPath()); |
|
|
|
photoSpeakVideo.setVideoPath(video.getUrl()); |
|
|
|
this.updateById(photoSpeakVideo); |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode()); |
|
|
|
photoSpeakVideo.setVideoMsg(video.getMsg()); |
|
|
|
this.updateById(photoSpeakVideo); |
|
|
|
return new ResultData(); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), video.getMsg()); |
|
|
|
}catch (Exception e){ |
|
|
|
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode()); |
|
|
|
photoSpeakVideo.setVideoMsg("Meta接口请求异常"); |
|
|
|
this.updateById(photoSpeakVideo); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"Meta接口请求异常"); |
|
|
|
} |
|
|
|
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode()); |
|
|
|
photoSpeakVideo.setVideoMsg(video.getMsg()); |
|
|
|
this.updateById(photoSpeakVideo); |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), video.getMsg()); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
photoSpeakVideo.setVideoStatus(EnumVideoStatus.fail.getCode()); |
|
|
|