使用神气 将带标签的文本当作text参数值丝袜玉足,上传至语音合成行状,以Java SDK为例: SpeechSynthesizer synthesizer = new SpeechSynthesizer(client, getSynthesizerListener());
String text = "<speak>请闭上眼睛休息一下<break time=\"500ms\"/>好了,请睁开眼睛。</speak>";
synthesizer.setText(text); 发送给语音合成行状的央求践诺如下: 爱情电影网{
"payload": {
"volume": 50,
"sample_rate": 16000,
"format": "wav",
"text": "<speak>请闭上眼睛休息一下<break time=\"500ms\"/>好了,请睁开眼睛。</speak>"
},
"context": {
"sdk": {
"name": "nls-sdk-java",
"version": "2.0.4"
}
},
"header": {
"namespace": "SpeechSynthesizer",
"name": "StartSynthesis",
"message_id": "5fdf78c0dd574b6897f3cb204dd0****",
"appkey": "fd4er4aa****",
"task_id": "6e1be78ef5804c50a2c5a8b92de1****"
}
}
|