增加对数据库中ttsId的判断来确定是否调用算法语音 合成

This commit is contained in:
wulin 2023-11-21 16:03:38 +08:00
parent 46bcfd0184
commit dc65857564

View File

@ -213,7 +213,7 @@ public class BaseWebSocketService implements IActionSendMessage {
if(userSession != null){ if(userSession != null){
sendMsg(userSession, baseMessageResp); sendMsg(userSession, baseMessageResp);
} }
if(suanfa){ if(suanfa && StringUtils.isNotEmpty(baseSession.getTtsId())){
String text = StringUtils.removeStringChars(baseMessageResp.getText()); String text = StringUtils.removeStringChars(baseMessageResp.getText());
if(text.length() > ONE_MAX_TEXT){ if(text.length() > ONE_MAX_TEXT){
@ -258,7 +258,7 @@ public class BaseWebSocketService implements IActionSendMessage {
} }
} }
if(suanfa){ if(suanfa && StringUtils.isNotEmpty(baseSession.getTtsId())){
String text = StringUtils.removeStringChars(baseMessageResp.getText()); String text = StringUtils.removeStringChars(baseMessageResp.getText());
if(text.length() > ONE_MAX_TEXT){ if(text.length() > ONE_MAX_TEXT){