|  | @@ -116,9 +116,28 @@
 | 
	
		
			
				|  |  |          :changeIsPara="changeIsPara"
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  | -    <el-button :loading="CreadMp3loading" size="small" @click="CreadMp3"
 | 
	
		
			
				|  |  | -      >生成音频</el-button
 | 
	
		
			
				|  |  | +    <template
 | 
	
		
			
				|  |  | +      v-if="
 | 
	
		
			
				|  |  | +        curQue.mp3_list &&
 | 
	
		
			
				|  |  | +        curQue.mp3_list.length > 0 &&
 | 
	
		
			
				|  |  | +        curQue.mp3_list[0].source
 | 
	
		
			
				|  |  | +      "
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  | +      <div class="create_mp3_list">
 | 
	
		
			
				|  |  | +        <span>引擎音频:</span>
 | 
	
		
			
				|  |  | +        <span class="mp3_file_name">{{ curQue.mp3_list[0].name }}</span>
 | 
	
		
			
				|  |  | +        <img
 | 
	
		
			
				|  |  | +          src="../../../../assets/adult/del-close.png"
 | 
	
		
			
				|  |  | +          class="mp3_del"
 | 
	
		
			
				|  |  | +          @click="delMp3"
 | 
	
		
			
				|  |  | +        />
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  | +    </template>
 | 
	
		
			
				|  |  | +    <template v-else>
 | 
	
		
			
				|  |  | +      <el-button :loading="CreadMp3loading" size="small" @click="CreadMp3"
 | 
	
		
			
				|  |  | +        >生成音频</el-button
 | 
	
		
			
				|  |  | +      >
 | 
	
		
			
				|  |  | +    </template>
 | 
	
		
			
				|  |  |      <div class="NPC-Book-Paragraph" v-if="isPara">
 | 
	
		
			
				|  |  |        <Paragraph :curQue="curQue" :isClause="isClause" :sureSeg="sureSeg" />
 | 
	
		
			
				|  |  |      </div>
 | 
	
	
		
			
				|  | @@ -332,32 +351,33 @@ export default {
 | 
	
		
			
				|  |  |        this.loading = true;
 | 
	
		
			
				|  |  |        let _this = this;
 | 
	
		
			
				|  |  |        return new Promise(function (resolve, reject) {
 | 
	
		
			
				|  |  | -        let id = "";
 | 
	
		
			
				|  |  | -        if (_this.curQue.mp3_list[0].id.indexOf("#") != -1) {
 | 
	
		
			
				|  |  | -          id = _this.curQue.mp3_list[0].id.substring(
 | 
	
		
			
				|  |  | -            6,
 | 
	
		
			
				|  |  | -            _this.curQue.mp3_list[0].id.length - 6
 | 
	
		
			
				|  |  | -          );
 | 
	
		
			
				|  |  | -        } else {
 | 
	
		
			
				|  |  | -          id = _this.curQue.mp3_list[0].id;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        let Mname = "file_store_manager-GetFileByteBase64Text";
 | 
	
		
			
				|  |  | -        let data = {
 | 
	
		
			
				|  |  | -          file_id: id,
 | 
	
		
			
				|  |  | -        };
 | 
	
		
			
				|  |  | -        getContentFile(Mname, data).then((res) => {
 | 
	
		
			
				|  |  | -          let taskIddata = {
 | 
	
		
			
				|  |  | -            fileName: _this.curQue.mp3_list[0].name,
 | 
	
		
			
				|  |  | -            speechBase64: res.base64_text,
 | 
	
		
			
				|  |  | -            language: "ch",
 | 
	
		
			
				|  |  | +        if (
 | 
	
		
			
				|  |  | +          _this.curQue.mp3_list &&
 | 
	
		
			
				|  |  | +          _this.curQue.mp3_list.length > 0 &&
 | 
	
		
			
				|  |  | +          _this.curQue.mp3_list[0].id
 | 
	
		
			
				|  |  | +        ) {
 | 
	
		
			
				|  |  | +          let Mname = "file_store_manager-GetFileByteBase64Text";
 | 
	
		
			
				|  |  | +          let id = _this.curQue.mp3_list[0].id
 | 
	
		
			
				|  |  | +            .replace("[FID##", "")
 | 
	
		
			
				|  |  | +            .replace("##FID]", "");
 | 
	
		
			
				|  |  | +          let data = {
 | 
	
		
			
				|  |  | +            file_id: id,
 | 
	
		
			
				|  |  |            };
 | 
	
		
			
				|  |  | -          prepareTranscribe(taskIddata).then((res) => {
 | 
	
		
			
				|  |  | -            _this.$set(_this.curQue, "taskId", res.data.taskId);
 | 
	
		
			
				|  |  | -            _this.loading = false;
 | 
	
		
			
				|  |  | -            resolve();
 | 
	
		
			
				|  |  | +          getContentFile(Mname, data).then((res) => {
 | 
	
		
			
				|  |  | +            let taskIddata = {
 | 
	
		
			
				|  |  | +              fileName: _this.curQue.mp3_list[0].name,
 | 
	
		
			
				|  |  | +              speechBase64: res.base64_text,
 | 
	
		
			
				|  |  | +              language: "ch",
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +            prepareTranscribe(taskIddata).then((res) => {
 | 
	
		
			
				|  |  | +              _this.$set(_this.curQue, "taskId", res.data.taskId);
 | 
	
		
			
				|  |  | +              _this.loading = false;
 | 
	
		
			
				|  |  | +              resolve();
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          _this.$message.warning("请先上传音频");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 根据文章生成MP3
 | 
	
	
		
			
				|  | @@ -375,15 +395,18 @@ export default {
 | 
	
		
			
				|  |  |        textCreadMp3({
 | 
	
		
			
				|  |  |          text: _this.curQue.article,
 | 
	
		
			
				|  |  |        }).then((res) => {
 | 
	
		
			
				|  |  | -        res.data.fileInfo.id = res.data.fileInfo.file_id;
 | 
	
		
			
				|  |  | +        res.data.fileInfo.id = "[FID##" + res.data.fileInfo.file_id + "##FID]";
 | 
	
		
			
				|  |  |          res.data.fileInfo.name = res.data.fileInfo.file_name;
 | 
	
		
			
				|  |  |          let fileList = [res.data.fileInfo];
 | 
	
		
			
				|  |  | -        //this.$set(this.curQue, "mp3_file_base64", res.data.fileBase64);
 | 
	
		
			
				|  |  |          _this.$set(_this.curQue, "mp3_list", fileList);
 | 
	
		
			
				|  |  |          _this.CreadMp3loading = false;
 | 
	
		
			
				|  |  |          _this.$message.success("生成成功");
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    //删除生成的mp3
 | 
	
		
			
				|  |  | +    delMp3() {
 | 
	
		
			
				|  |  | +      this.curQue.mp3_list.splice(0, 1);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      // 保存校对
 | 
	
		
			
				|  |  |      saveCompare() {
 | 
	
		
			
				|  |  |        this.compareloading = true;
 | 
	
	
		
			
				|  | @@ -426,7 +449,6 @@ export default {
 | 
	
		
			
				|  |  |              duration: item.response.file_info_list[0].media_duration,
 | 
	
		
			
				|  |  |              url: item.response.file_info_list[0].file_url,
 | 
	
		
			
				|  |  |              id: "[FID##" + item.response.file_info_list[0].file_id + "##FID]",
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              media_duration: item.response.file_info_list[0].media_duration, //音频时长
 | 
	
		
			
				|  |  |            };
 | 
	
		
			
				|  |  |            articleImgRes.push(obj);
 | 
	
	
		
			
				|  | @@ -590,6 +612,7 @@ export default {
 | 
	
		
			
				|  |  |            this.curQue.detail.forEach((item) => {
 | 
	
		
			
				|  |  |              verseList = verseList.concat(item.sentences);
 | 
	
		
			
				|  |  |            });
 | 
	
		
			
				|  |  | +          console.log(verseList);
 | 
	
		
			
				|  |  |            if (verseList.length > 0) {
 | 
	
		
			
				|  |  |              this.isWordTime = true;
 | 
	
		
			
				|  |  |              let data = {
 | 
	
	
		
			
				|  | @@ -683,7 +706,8 @@ export default {
 | 
	
		
			
				|  |  |          this.curQue.mp3_list = [];
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        this.fileCon.img_list = JSON.parse(JSON.stringify(this.curQue.img_list));
 | 
	
		
			
				|  |  | -      this.fileCon.mp3_list = JSON.parse(JSON.stringify(this.curQue.mp3_list));
 | 
	
		
			
				|  |  | +      let mp3_list = JSON.parse(JSON.stringify(this.curQue.mp3_list));
 | 
	
		
			
				|  |  | +      this.fileCon.mp3_list = mp3_list.filter((item) => item.source !== "tts");
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |        this.initCurQueData();
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -699,6 +723,21 @@ export default {
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  <style lang='scss' scoped>
 | 
	
		
			
				|  |  |  //@import url(); 引入公共css类
 | 
	
		
			
				|  |  | +.create_mp3_list {
 | 
	
		
			
				|  |  | +  display: flex;
 | 
	
		
			
				|  |  | +  justify-content: flex-start;
 | 
	
		
			
				|  |  | +  align-items: center;
 | 
	
		
			
				|  |  | +  > span {
 | 
	
		
			
				|  |  | +    font-size: 16px;
 | 
	
		
			
				|  |  | +    font-weight: bold;
 | 
	
		
			
				|  |  | +    margin-right: 10px;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +  > img {
 | 
	
		
			
				|  |  | +    width: 24px;
 | 
	
		
			
				|  |  | +    height: 24px;
 | 
	
		
			
				|  |  | +    cursor: pointer;
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  |  p {
 | 
	
		
			
				|  |  |    margin: 0;
 | 
	
		
			
				|  |  |    padding: 0;
 |