| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -269,8 +269,8 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        }else if(EnumVoiceFrom.FROM_UPD.getCode().equals(voiceFrom)){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            voiceMaterialUrl = photoSpeakVideo.getVoiceMaterialUrl(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            VoiceMaterial voiceMaterial = voiceMaterialService.getById(photoSpeakVideo.getVoiceMaterialId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if(StringUtils.isBlank(voiceMaterialUrl)){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                VoiceMaterial voiceMaterial = voiceMaterialService.getById(photoSpeakVideo.getVoiceMaterialId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                voiceMaterialService.handVideoUrl(voiceMaterial); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                voiceMaterialUrl = voiceMaterial.getMaterial(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                videoUpd.setVoiceMaterialUrl(voiceMaterialUrl); | 
		
		
	
	
		
			
				| 
				
				
				
					
				
				 | 
			
			 | 
			@@ -280,7 +280,7 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            //判断用户时长是否够创建该视频 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(photoSpeakVideo.getVideoId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(voiceMaterial.getVideoId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (videoDetail.isSuccess() && StringUtils.isNotBlank(videoDetail.getDuration()) && !"0.0".equals(videoDetail.getDuration())) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                String duration = videoDetail.getDuration(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                videoTime = Double.valueOf(duration); | 
		
		
	
	
		
			
				| 
				
					
				
				
					
				
				
				 | 
			
			 | 
			@@ -364,12 +364,15 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			        try { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            AiPhotoSpeakParam param = new AiPhotoSpeakParam(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setImg(Base64Util.imageUrlToBase64(photoSpeakVideo.getPersonPhotoUrl())); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setVoice_id(voiceMouldSmId); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setVoice_id(voiceMouldSmId == null ? "default" : voiceMouldSmId); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            String voiceMouldSm = photoSpeakVideo.getVoiceMouldSm(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            JSONObject jsonObject = JSON.parseObject(voiceMouldSm); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            Integer speakType = jsonObject.getInteger("speakType"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setVoice_style(StringUtils.isBlank(voiceType) ? "default" : EnumSpeakType.getEnum(speakType).getType()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            Integer speakType = 0; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (!StringUtils.isBlank(voiceMouldSm)) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                JSONObject jsonObject = JSON.parseObject(voiceMouldSm); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                speakType = jsonObject.getInteger("speakType"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            param.setVoice_style(EnumSpeakType.getEnum(speakType).getType()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            if (EnumVoiceFrom.FROM_MOULD.getCode().equals(voiceFrom)) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                param.setGen_txt(paperwork.replaceAll(str, "[*]")); | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |