目前语音合成支持句级时间戳吗,如不支持,是否有计划支持? #2238
-
刚才安装了PaddleSpeech试了下,貌似没有输出句级时间戳信息。 正好手头有一个项目,用了阿里云的语音合成接口,他们支持句级时间戳,这样我就可以根据返回的时间戳生成srt字幕信息,不需要再人工操作了。 但是阿里云的接口很不稳定,经常不测试就上线,出现线上事故,导致返回的句级时间戳和合成语音不匹配。一出问题就要去提工单,所以想自己部署一个tts服务,这应该是一个很常见的需求,希望考虑支持一下。 阿里是按照句号和逗号进行断句的,返回的JSON结构如下: {
"status": 200,
"data": {
"sentences": [
{
"text": "查尔曼致力于解决各种问题性皮肤。",
"begin_time": "0",
"end_time": "3000"
},
{
"text": "我们有着专业的团队。",
"begin_time": "3000",
"end_time": "4000"
},
{
"text": "一流的手法。",
"begin_time": "4000",
"end_time": "5000"
},
{
"text": "贴心的服务。",
"begin_time": "5000",
"end_time": "6000"
},
{
"text": "个性的定制。",
"begin_time": "6000",
"end_time": "7000"
},
{
"text": "改善皮肤暗黄松弛毛孔粗大。",
"begin_time": "7000",
"end_time": "9000"
},
{
"text": "变成更好的自己",
"begin_time": "9000",
"end_time": "10000"
}
],
"task_id": "xxx",
"audio_address": "xxx",
"notify_custom": ""
},
"error_code": 20000000,
"error_message": "SUCCESS",
"request_id": "xxx"
} |
Beta Was this translation helpful? Give feedback.
Answered by
yt605155624
Aug 10, 2022
Replies: 1 comment 1 reply
-
我们现在合成默认按照标点切分分句合成, 我理解你每合成一个分句计算当前 wav 的时长就是句子级别的时间戳? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Sloaix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我们现在合成默认按照标点切分分句合成,
PaddleSpeech/paddlespeech/t2s/exps/synthesize_e2e.py
Line 115 in 092687d