Comments (4)
from tts-server-android.
这很明显是文本发过来时就是带空格的
检查阅读APP的净化和本APP的替换设置
from tts-server-android.
谢谢,通过替换空格,可以正常阅读了,文本是正常的,手机系统更新后出现的问题,更新后原先用的tts app也是单字读,不知道是阅读软件还是系统的问题😂。大佬软件好用的!👍👍
from tts-server-android.
我也用的fbreader,也有相同的问题。 咱们“朗读规则” 里 怎么去空格?
我改了下.replace(/ /g, '')
没有效果:
let SpeechRuleJS = {
name: "旁白/对话",
id: "ttsrv.multi_voice",
author: "TTS Server",
version: 4,
tags: {narration: "旁白", dialogue: "对话"},
handleText(text) {
const list = [];
let tmpStr = "";
let endTag = "narration";
text.split("").forEach((char, index) => {
tmpStr += char;
if (char === '“') {
endTag = "dialogue";
list.push({text: tmpStr, tag: "narration"});
tmpStr = "";
} else if (char === '”') {
endTag = "narration";
tmpStr = tmpStr.slice(0, -1)
list.push({text: tmpStr, tag: "dialogue"});
tmpStr = "";
} else if (index === text.length - 1) {
list.push({text: tmpStr, tag: endTag});
}
});
return list;
},
splitText(text) {
let separatorStr = "。??!!;;"
let list = []
let tmpStr = ""
text.split("").forEach((char, index) => {
tmpStr += char
if (separatorStr.includes(char)) {
list.push(tmpStr)
tmpStr = ""
} else if (index === text.length - 1) {
list.push(tmpStr);
}
})
return list.filter(item => item.replace(/[“”]/g, '').replace(/ /g, '').trim().length > 0);
}
};
from tts-server-android.
Related Issues (20)
- Persian appended to rules
- 单人朗读规则 HOT 2
- 可以加个百度的TTS插件吗?
- 最新开发版,拖动有bug, HOT 2
- Samsung a23 phone error on import config HOT 1
- Importing Unicode replacement json files HOT 3
- Voice name is Null!
- 替换规则自定义排序,无法保存排序结果。
- 想要 取消一下请求接口超时 HOT 3
- [Feature Request] sherpa-onnx tts models support HOT 4
- [FR] Accessibility - Reading Rule Editor unusable with TalkBack
- 如何使用离线语音引擎
- 阅读在GitHub找不到,大佬给个链接 HOT 1
- How to add google cloud tts sever
- 建议加入微软开放的tts HOT 1
- 英文文章无法正确发送英文句子
- 請問系統tts轉發器如何使用?若要轉給pc使用可以嗎?
- 长句分割问题
- 音频文件存放位置在哪?
- 旁白/对话规则优化建议
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tts-server-android.