|
@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiOperationSupport;
|
|
|
import io.swagger.annotations.ApiSort;
|
|
import io.swagger.annotations.ApiSort;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.util.StringUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -39,13 +38,8 @@ public class AiUploadController {
|
|
|
return R.fail("音频文件不能为空");
|
|
return R.fail("音频文件不能为空");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- String accessToken = aiFeedbackAssignUtils.getAccessToken();
|
|
|
|
|
- if (!StringUtils.hasText(accessToken)) {
|
|
|
|
|
- return R.fail("调用AI语音识别接口 登录接口失败");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
try {
|
|
try {
|
|
|
- String speechRecognitionResult = aiFeedbackAssignUtils.getSpeechRecognition1(file, accessToken, language, use_itn, merge_vad);
|
|
|
|
|
|
|
+ String speechRecognitionResult = aiFeedbackAssignUtils.getSpeechRecognition1(file, null, language, use_itn, merge_vad);
|
|
|
if (speechRecognitionResult == null) {
|
|
if (speechRecognitionResult == null) {
|
|
|
return R.fail("语音识别失败");
|
|
return R.fail("语音识别失败");
|
|
|
}
|
|
}
|