| | |
| | | editorRef.value.move(1); |
| | | } |
| | | const createAudio = async () => { |
| | | if (!audioSelectData.value || audioSelectData.value.length == 0) { |
| | | message.warning('请选择声音模型!') |
| | | return false |
| | | } |
| | | // if (!selectTextarea.value || selectTextarea.value.length == 0) { |
| | | // message.warning('请划选至少一个汉字') |
| | | // return false |
| | |
| | | return false |
| | | } |
| | | // 获取编辑器 HTML 内容 |
| | | const html = editorRef.value.getHtml(); |
| | | const ssllHtml = editorHtml.elemToHtml(html); |
| | | const html = editorRef.value.getText(); |
| | | const params = { |
| | | text: ssllHtml, |
| | | speed: voiceData.speechRate, //语速 |
| | | pitch: 1, // 音高固定为1 |
| | | volume: voiceData.volume, //音量 |
| | | voiceType: 37, |
| | | voiceTypeId: 51, |
| | | voiceId: audioSelectData.value[0].id, |
| | | smartSpeed: 1 //智能语速 预留 |
| | | text: html, |
| | | humans: 1 |
| | | } |
| | | showAudioPlay.value = true |
| | | pptTemplateApi |