1.新增说话人识别,台标识别,人脸识别配置
2.菜单新增sql提交
This commit is contained in:
@@ -125,6 +125,15 @@ public class MultipartFileIntercepter extends CommonsMultipartResolver{
|
||||
}else if(functionId.equals(31)){ //voip
|
||||
fileTypes=Constants.VOIP_FILE_TYPE;
|
||||
fileMaxSize=Constants.VOIP_SINGLE_FILE_MAX_SIZE;
|
||||
}else if(functionId.equals(630)){ //说话人识别
|
||||
fileTypes=Constants.SPEAKER_FILE_TYPE;
|
||||
fileMaxSize=Constants.SPEAKER_SINGLE_FILE_MAX_SIZE;
|
||||
}else if(functionId.equals(631)){ //台标识别
|
||||
fileTypes=Constants.LOGO_FILE_TYPE;
|
||||
fileMaxSize=Constants.LOGO_SINGLE_FILE_MAX_SIZE;
|
||||
}else if(functionId.equals(632)){ //人脸识别
|
||||
fileTypes=Constants.FACE_FILE_TYPE;
|
||||
fileMaxSize=Constants.FACE_SINGLE_FILE_MAX_SIZE;
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -526,6 +526,14 @@ public final class Constants {
|
||||
* 音频文件限制单个文件大小
|
||||
*/
|
||||
public static final long AUDIO_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("audio_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
* 说话人识别音频文件支持文件类型
|
||||
*/
|
||||
public static final String SPEAKER_FILE_TYPE = Configurations.getStringProperty("speaker_file_type","");
|
||||
/**
|
||||
* 说话人识别音频文件限制单个文件大小
|
||||
*/
|
||||
public static final long SPEAKER_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("speaker_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
* 视频文件支持文件类型
|
||||
*/
|
||||
@@ -534,6 +542,14 @@ public final class Constants {
|
||||
* 视频文件限制单个文件大小
|
||||
*/
|
||||
public static final long VIDEO_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("video_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
*人脸识别视频文件支持文件类型
|
||||
*/
|
||||
public static final String FACE_FILE_TYPE = Configurations.getStringProperty("face_file_type","");
|
||||
/**
|
||||
* 视频文件限制单个文件大小
|
||||
*/
|
||||
public static final long FACE_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("face_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
* 图片文件支持文件类型
|
||||
*/
|
||||
@@ -542,6 +558,14 @@ public final class Constants {
|
||||
* 图片文件限制单个文件大小
|
||||
*/
|
||||
public static final long PICTURE_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("picture_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
* 图片文件支持文件类型
|
||||
*/
|
||||
public static final String LOGO_FILE_TYPE = Configurations.getStringProperty("logo_file_type","");
|
||||
/**
|
||||
* 图片文件限制单个文件大小
|
||||
*/
|
||||
public static final long LOGO_SINGLE_FILE_MAX_SIZE = Configurations.getLongProperty("logo_single_file_max_size",10485760l);//10M
|
||||
/**
|
||||
* voip文件支持文件类型
|
||||
*/
|
||||
@@ -578,6 +602,18 @@ public final class Constants {
|
||||
public static final boolean AUDIO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("audio_sample_proc_param_is_translation", false);
|
||||
public static final boolean VIDEO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("video_sample_proc_param_is_translation", false);
|
||||
public static final boolean PICTURE_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("picture_sample_proc_param_is_translation", false);
|
||||
public static final String MM_SPEAKER_RECOGNIZATION_REGION = Configurations.getStringProperty("mm_speaker_recognization_region", "MM_SPEAKER_RECOGNIZATION");
|
||||
public static final String MM_LOGO_DETECTION_REGION = Configurations.getStringProperty("mm_logo_detection_region", "MM_LOGO_DETECTION");
|
||||
public static final String MM_FACE_RECOGNIZATION_REGION = Configurations.getStringProperty("mm_face_recognization_region", "MM_FACE_RECOGNIZATION");
|
||||
public static final String SPEAKER_SAMPLE_CREATE_PROC = Configurations.getStringProperty("speaker_sample_create_proc", "./audio_convert_proc");
|
||||
public static final String LOGO_SAMPLE_CREATE_PROC = Configurations.getStringProperty("logo_sample_create_proc", "./picture_convert_proc");
|
||||
public static final String FACE_SAMPLE_CREATE_PROC = Configurations.getStringProperty("face_sample_create_proc", "./video_convert_proc");
|
||||
public static final boolean SPEAKER_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("speaker_sample_proc_param_is_quotation", true);
|
||||
public static final boolean LOGO_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("logo_sample_proc_param_is_quotation", true);
|
||||
public static final boolean FACE_SAMPLE_PROC_PARAM_IS_QUOTATION = Configurations.getBooleanProperty("face_sample_proc_param_is_quotation", true);
|
||||
public static final boolean SPEAKER_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("speaker_sample_proc_param_is_translation", false);
|
||||
public static final boolean LOGO_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("logo_sample_proc_param_is_translation", false);
|
||||
public static final boolean FACE_SAMPLE_PROC_PARAM_IS_TRANSLATION = Configurations.getBooleanProperty("face_sample_proc_param_is_translation", false);
|
||||
|
||||
//HTTP自定义域相关参数
|
||||
public static String HTTP_HEADER_USER_REGION_KEY=Configurations.getStringProperty("http_header_user_region_key", "HTTP_HEADER");
|
||||
|
||||
@@ -48,7 +48,7 @@ import com.nis.web.security.UserUtils;
|
||||
public class AvController extends BaseController {
|
||||
|
||||
//音视频文件样例配置列表
|
||||
@RequestMapping(value = {"/sample/fileSampleList"})
|
||||
@RequestMapping(value = {"/sample/fileSampleList","/sample/fileSampleSpeakerList","/sample/fileSampleLogoList","/sample/fileSampleFaceList"})
|
||||
public String fileSampleList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")AvFileSampleCfg entity){
|
||||
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(new Page<AvFileSampleCfg>(request, response,"a"), entity);
|
||||
model.addAttribute("page", page);
|
||||
|
||||
@@ -168,6 +168,30 @@ public class AvCfgService extends BaseService{
|
||||
if(Constants.PICTURE_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}else if(entity.getCfgType().equals(Constants.MM_SPEAKER_RECOGNIZATION_REGION)){//说话人识别音频样例配置
|
||||
sampleCreatelProc = Constants.SPEAKER_SAMPLE_CREATE_PROC;
|
||||
if(Constants.SPEAKER_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.SPEAKER_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}else if(entity.getCfgType().equals(Constants.MM_LOGO_DETECTION_REGION)){//台标识别图片样例配置
|
||||
sampleCreatelProc = Constants.LOGO_SAMPLE_CREATE_PROC;
|
||||
if(Constants.LOGO_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.LOGO_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}else if(entity.getCfgType().equals(Constants.MM_FACE_RECOGNIZATION_REGION)){//人脸识别视频样例配置
|
||||
sampleCreatelProc = Constants.FACE_SAMPLE_CREATE_PROC;
|
||||
if(Constants.FACE_SAMPLE_PROC_PARAM_IS_TRANSLATION){
|
||||
param = StringEscapeUtils.escapeJava(param);
|
||||
}
|
||||
if(Constants.FACE_SAMPLE_PROC_PARAM_IS_QUOTATION){//json参数是否需要前后单引号处理
|
||||
param = "'"+param+"'";
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("调用外部程序输入参数:"+param);
|
||||
|
||||
Reference in New Issue
Block a user