|
@@ -83,7 +83,7 @@ import UploadAudio from '@/views/book/courseware/create/components/question/fill
|
|
|
import { getPinyinBaseData, funList } from '@/views/book/courseware/data/pinyinBase';
|
|
import { getPinyinBaseData, funList } from '@/views/book/courseware/data/pinyinBase';
|
|
|
import { addTone, handleToneValue } from '@/views/book/courseware/data/common';
|
|
import { addTone, handleToneValue } from '@/views/book/courseware/data/common';
|
|
|
import { getRandomNumber } from '@/utils';
|
|
import { getRandomNumber } from '@/utils';
|
|
|
-import { GetStaticResources, TextToAudioFile } from '@/api/app';
|
|
|
|
|
|
|
+import { TextToAudioFile, PinyinToAudioFile } from '@/api/app';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'PinyinBasePage',
|
|
name: 'PinyinBasePage',
|
|
@@ -129,7 +129,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 自动生成音频
|
|
// 自动生成音频
|
|
|
handleMatically() {
|
|
handleMatically() {
|
|
|
- let MethodName = 'tool-TextToVoiceFile';
|
|
|
|
|
let data = {};
|
|
let data = {};
|
|
|
if (this.data.character.trim() || this.data.content_hz) {
|
|
if (this.data.character.trim() || this.data.content_hz) {
|
|
|
data = {
|
|
data = {
|
|
@@ -150,11 +149,13 @@ export default {
|
|
|
if (!this.matically_pinyin_obj[this.data.mark]) {
|
|
if (!this.matically_pinyin_obj[this.data.mark]) {
|
|
|
this.handleItemAnswer(this.data);
|
|
this.handleItemAnswer(this.data);
|
|
|
}
|
|
}
|
|
|
- MethodName = 'tool-PinyinToVoiceFile';
|
|
|
|
|
data = {
|
|
data = {
|
|
|
pinyin: this.matically_pinyin_obj[this.data.mark],
|
|
pinyin: this.matically_pinyin_obj[this.data.mark],
|
|
|
|
|
+ voice_type: this.data.property.voice_type,
|
|
|
|
|
+ emotion: this.data.property.emotion,
|
|
|
|
|
+ type: 1,
|
|
|
};
|
|
};
|
|
|
- GetStaticResources(MethodName, data)
|
|
|
|
|
|
|
+ PinyinToAudioFile(data)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.status === 1) {
|
|
if (res.status === 1) {
|
|
|
this.data.audio_file_id = res.file_id;
|
|
this.data.audio_file_id = res.file_id;
|