|
|
@@ -11,6 +11,7 @@ import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import shop.alien.entity.result.R;
|
|
|
@@ -28,7 +29,11 @@ public class AiUploadController {
|
|
|
@ApiOperation("AI语音识别")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@PostMapping("/GetAIUpload")
|
|
|
- public R<JSONObject> getAiUpload(MultipartFile file, String language, String use_itn, String merge_vad ) {
|
|
|
+ public R<JSONObject> getAiUpload(
|
|
|
+ @RequestParam("file") MultipartFile file,
|
|
|
+ @RequestParam(value = "language", required = false) String language,
|
|
|
+ @RequestParam(value = "use_itn", required = false) String use_itn,
|
|
|
+ @RequestParam(value = "merge_vad", required = false) String merge_vad) {
|
|
|
// 检查文件是否为空
|
|
|
if (file == null || file.isEmpty()) {
|
|
|
return R.fail("音频文件不能为空");
|