Commit e246480e authored by 赵啸非's avatar 赵啸非

修改音频识别结果

parent 01d4dea7
...@@ -97,17 +97,18 @@ public class ApiSendMsgController { ...@@ -97,17 +97,18 @@ public class ApiSendMsgController {
String jsonStr = ""; String jsonStr = "";
try { try {
if (file == null || file.getSize() == 0L) throw new AppException("文件为空!"); if (file == null || file.getSize() == 0L) throw new AppException("文件为空!");
if (!"pcm".equalsIgnoreCase(FileUtil.getSuffix(file.getOriginalFilename()))) // if (!"pcm".equalsIgnoreCase(FileUtil.getSuffix(file.getOriginalFilename())))
throw new AppException("只支持pcm!"); // throw new AppException("只支持pcm!");
//if (file.getOriginalFilename()) // //if (file.getOriginalFilename())
String filePath = uploadService.saveFileUpload(file, prePath, null); // String filePath = uploadService.saveFileUpload(file, prePath, null);
filePath = uploadService.getFilePath(filePath); // filePath = uploadService.getFilePath(filePath);
//
log.info("filePath==>" + filePath); // log.info("filePath==>" + filePath);
// byte[] bytes = file.getBytes(); byte[] bytes = file.getBytes();
IatModelMulUtil iatModelMulUtil = new IatModelMulUtil(filePath, appid); // IatModelMulUtil iatModelMulUtil = new IatModelMulUtil(filePath, appid);
IatModelMulUtil iatModelMulUtil = new IatModelMulUtil(bytes, appid);
String authUrl = IatModelMulUtil.getAuthUrl(hostUrl, apiKey, apiSecret); String authUrl = IatModelMulUtil.getAuthUrl(hostUrl, apiKey, apiSecret);
//log.info("authUrl==>" + authUrl); //log.info("authUrl==>" + authUrl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment