调用算法语音合成增加句号

This commit is contained in:
wulin 2023-10-20 16:33:30 +08:00
parent 5ddc7091d4
commit 445b10a97c
2 changed files with 10 additions and 2 deletions

View File

@ -37,6 +37,13 @@ spring:
filters:
# 转发时去掉一层路径
- StripPrefix=1
- id: qiuguo-iot-box-websocket
uri: lb://qiuguo-iot-box-websocket
predicates:
- Path=/websocket/**
filters:
# 转发时去掉一层路径
- StripPrefix=0
globalcors:
corsConfigurations:
'[/**]':

View File

@ -683,11 +683,12 @@ public class BaseWebSocketProcess {
text.startsWith("") ||
text.startsWith("") ||
text.startsWith("") ||
text.startsWith("")){
text.startsWith("") ||
text.startsWith(" ")){
//标点符号起始会导致合成的声音第一句话有杂音
text = text.substring(1);
}
audioService.getAudioUrl(text).map(s ->{
audioService.getAudioUrl(text + "").map(s ->{
BoxMessageResp boxMessageResp = new BoxMessageResp();
BeanUtils.copyProperties(baseMessageResp, boxMessageResp);
boxMessageResp.setAudio(s);