|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.uuid.IdUtils;
|
|
|
import com.fs.fastGpt.domain.FastGptRole;
|
|
|
import com.fs.fastGpt.service.AiHookService;
|
|
|
@@ -322,9 +323,9 @@ public class QwMsgController {
|
|
|
ste.setUuid(wxWorkMsgResp.getUuid());
|
|
|
WxWorkResponseDTO<WxwSpeechToTextEntityRespDTO> dto = wxWorkService.SpeechToTextEntity(ste, serverId);
|
|
|
System.out.println(dto);
|
|
|
- if(dto.getErrcode() != 0){
|
|
|
+ if(dto.getErrcode() != 0 || Objects.isNull(dto.getData()) || StringUtils.isBlank(dto.getData().getText())){
|
|
|
try {
|
|
|
- TimeUnit.SECONDS.sleep(1); // 阻塞1秒
|
|
|
+ TimeUnit.SECONDS.sleep(2); // 阻塞2秒
|
|
|
} catch (InterruptedException e) {
|
|
|
Thread.currentThread().interrupt(); // 处理中断异常
|
|
|
log.info("id:{}, 第一次语音转换失败", id);
|