调用算法语音合成增加句号
This commit is contained in:
parent
5ddc7091d4
commit
445b10a97c
@ -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:
|
||||
'[/**]':
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user