康鲁杰
2025-03-24 edbf2aa3d5651a41ea3c11b7576bd4a5220f62ab
试听
已修改1个文件
37 ■■■■■ 文件已修改
easegen-front/src/views/chooseTemplate/index.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
easegen-front/src/views/chooseTemplate/index.vue
@@ -459,9 +459,9 @@
          >
            <div class="background"></div>
            <div class="host-name">{{ item.name }}</div>
            <el-image
              class="ppt-bg"
              :src="item.pictureUrl"
            <el-image
              class="ppt-bg"
              :src="item.pictureUrl"
              :style="{
                width: '100%',
                height: '100%',
@@ -1131,7 +1131,7 @@
    // 计算总字数 - 修改为去除SSML标签后再计算长度
    videoText.value = val.reduce((prev, curr) => {
      if (!curr.pptRemark) return prev;
      // 去除所有SSML标签,只保留文本内容
      const plainText = curr.pptRemark.replace(/<[^>]+>/g, '');
      return prev + plainText.length;
@@ -1515,7 +1515,7 @@
        message.error('保存失败,请重试后再合成视频')
        return
      }
      // 校验场景数据
      let warningStrArr: any = []
      for (let i = 0; i < PPTArr.value.length; i++) {
@@ -1692,10 +1692,6 @@
    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
@@ -1705,17 +1701,10 @@
        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
@@ -1729,7 +1718,7 @@
          showAudioPlay.value = false
          currentAudio.value = null
        })
        currentAudio.value.play()
      } else {
        // 如果返回结果为空或有错误,关闭弹出框
@@ -1848,26 +1837,26 @@
        const hostInfo = res.scenes[0].components.find((component) => component.category === 2)
        // 先在当前数字人列表中查找
        let foundHost = hostList.value.find(item => item.code === hostInfo.entityId)
        // 如果在当前列表中没找到,且当前是公共数字人列表,则切换到我的数字人列表重新获取
        if (!foundHost && tabs1ActiveNum.value === '0') {
          // 保存公共数字人列表的第一个数字人作为默认值
          const defaultPublicHost = hostList.value[0]
          // 切换到"我的"数字人
          tabs1ActiveNum.value = '1'
          // 重新获取数字人列表
          getList().then(() => {
            // 在新列表中查找
            foundHost = hostList.value.find(item => item.code === hostInfo.entityId)
            // 如果在"我的"数字人中也没找到,则使用默认公共数字人
            if (!foundHost) {
              tabs1ActiveNum.value = '0' // 切回公共数字人tab
              foundHost = defaultPublicHost // 使用之前保存的默认公共数字人
              message.warning('未找到原数字人,已使用默认公共数字人替代')
            }
            // 设置选中的数字人
            selectHost.value = foundHost || hostList.value[0]
          })