|
@@ -22,6 +22,8 @@
|
|
|
@blur="handleMindMap"
|
|
@blur="handleMindMap"
|
|
|
/>
|
|
/>
|
|
|
<el-button @click="identify(item, index)">识别</el-button>
|
|
<el-button @click="identify(item, index)">识别</el-button>
|
|
|
|
|
+ <SoundRecord v-if="item.audio_file_id" :wav-blob.sync="item.audio_file_id" />
|
|
|
|
|
+ <el-button v-else @click="handleMatic(item.content, index)">生成音频</el-button>
|
|
|
<el-button @click="handleDelete(index)">删除此条</el-button>
|
|
<el-button @click="handleDelete(index)">删除此条</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="option-item">
|
|
<div class="option-item">
|
|
@@ -97,10 +99,11 @@ import { getCharacterData, modelList, getOption } from '@/views/book/courseware/
|
|
|
import { GetStaticResources, TextToAudioFile } from '@/api/app';
|
|
import { GetStaticResources, TextToAudioFile } from '@/api/app';
|
|
|
import cnchar from 'cnchar';
|
|
import cnchar from 'cnchar';
|
|
|
import UploadFile from '../../base/common/UploadFile.vue';
|
|
import UploadFile from '../../base/common/UploadFile.vue';
|
|
|
|
|
+import SoundRecord from '@/views/book/courseware/create/components/question/fill/components/SoundRecord.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'CharacterPage',
|
|
name: 'CharacterPage',
|
|
|
- components: { UploadFile },
|
|
|
|
|
|
|
+ components: { UploadFile, SoundRecord },
|
|
|
mixins: [ModuleMixin],
|
|
mixins: [ModuleMixin],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -162,6 +165,8 @@ export default {
|
|
|
handleMatic(con, index) {
|
|
handleMatic(con, index) {
|
|
|
TextToAudioFile({
|
|
TextToAudioFile({
|
|
|
text: con.replace(/<[^>]+>/g, ''),
|
|
text: con.replace(/<[^>]+>/g, ''),
|
|
|
|
|
+ voice_type: this.data.property.voice_type,
|
|
|
|
|
+ emotion: this.data.property.emotion,
|
|
|
})
|
|
})
|
|
|
.then(({ status, file_id, file_url }) => {
|
|
.then(({ status, file_id, file_url }) => {
|
|
|
if (status === 1) {
|
|
if (status === 1) {
|