|
@@ -29,9 +29,9 @@
|
|
@startTape="onClickStartRecord"
|
|
@startTape="onClickStartRecord"
|
|
@uploadTape="uploadRecording"
|
|
@uploadTape="uploadRecording"
|
|
:uploadFileLoading="uploadFileLoading"
|
|
:uploadFileLoading="uploadFileLoading"
|
|
- :teacherVoiceprintList="teacherVoiceprintList"
|
|
|
|
- :chosenVoiceprint="chosenVoiceprint"
|
|
|
|
- :controlsStatus="controlsStatus"
|
|
|
|
|
|
+ :teacherVoiceprintList="teacherVoiceprintList"
|
|
|
|
+ :chosenVoiceprint="chosenVoiceprint"
|
|
|
|
+ :controlsStatus="controlsStatus"
|
|
ref="startPageRef"
|
|
ref="startPageRef"
|
|
/>
|
|
/>
|
|
<!-- 原文速递 -->
|
|
<!-- 原文速递 -->
|
|
@@ -64,11 +64,10 @@
|
|
v-if="pageStatus == 2 && !showIndexPage && editorBarData.type == '0'"
|
|
v-if="pageStatus == 2 && !showIndexPage && editorBarData.type == '0'"
|
|
v-loading="uploadFileLoading"
|
|
v-loading="uploadFileLoading"
|
|
>
|
|
>
|
|
-
|
|
|
|
- <el-button
|
|
|
|
|
|
+ <el-button
|
|
style="position: absolute; bottom: 20px; right: 185px; z-index: 10002"
|
|
style="position: absolute; bottom: 20px; right: 185px; z-index: 10002"
|
|
size="small"
|
|
size="small"
|
|
- v-if="wavGetTextLoading"
|
|
|
|
|
|
+ v-if="wavGetTextLoading"
|
|
type="danger"
|
|
type="danger"
|
|
@click.stop="stopWavGetText()"
|
|
@click.stop="stopWavGetText()"
|
|
>终止转译</el-button
|
|
>终止转译</el-button
|
|
@@ -177,7 +176,6 @@
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</template>
|
|
</template>
|
|
<template v-if="recorderProvider === 'shengyang'">
|
|
<template v-if="recorderProvider === 'shengyang'">
|
|
<div class="ca-b-o-h-l-btn">
|
|
<div class="ca-b-o-h-l-btn">
|
|
@@ -242,13 +240,13 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <div
|
|
|
|
- class="ca-b-o-h-l-btn"
|
|
|
|
- @click.stop="uploadRecording()"
|
|
|
|
- v-loading="uploadFileLoading"
|
|
|
|
- >
|
|
|
|
- <div class="ca-b-o-h-b-l-text">上传文件</div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="ca-b-o-h-l-btn"
|
|
|
|
+ @click.stop="uploadRecording()"
|
|
|
|
+ v-loading="uploadFileLoading"
|
|
|
|
+ >
|
|
|
|
+ <div class="ca-b-o-h-b-l-text">上传文件</div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="ca-b-o-h-right">
|
|
<div class="ca-b-o-h-right">
|
|
<div class="ca-b-o-h-r-radio">
|
|
<div class="ca-b-o-h-r-radio">
|
|
@@ -689,7 +687,7 @@ export default {
|
|
textareaLoading: false,
|
|
textareaLoading: false,
|
|
showRoleList: false,
|
|
showRoleList: false,
|
|
showGetTextLoading: false,
|
|
showGetTextLoading: false,
|
|
- wavGetTextLoading:false,
|
|
|
|
|
|
+ wavGetTextLoading: false,
|
|
roleListIndex: 0,
|
|
roleListIndex: 0,
|
|
|
|
|
|
userId: this.$route.query["userid"],
|
|
userId: this.$route.query["userid"],
|
|
@@ -764,7 +762,7 @@ export default {
|
|
recorder: null,
|
|
recorder: null,
|
|
ws: null
|
|
ws: null
|
|
},
|
|
},
|
|
- userName:"",
|
|
|
|
|
|
+ userName: ""
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -832,9 +830,9 @@ export default {
|
|
// this.uploadWavFileAndGetText(file);
|
|
// this.uploadWavFileAndGetText(file);
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- getVideoAudioSuccess(file){
|
|
|
|
- this.uploadFile(file, { changeText: true, flag: true });
|
|
|
|
- },
|
|
|
|
|
|
+ getVideoAudioSuccess(file) {
|
|
|
|
+ this.uploadFile(file, { changeText: true, flag: true });
|
|
|
|
+ },
|
|
cutBar(val) {
|
|
cutBar(val) {
|
|
this.pageStatus = val;
|
|
this.pageStatus = val;
|
|
if (this.pageStatus == 0) {
|
|
if (this.pageStatus == 0) {
|
|
@@ -1483,8 +1481,7 @@ ${JSON.stringify(_list)}
|
|
} else {
|
|
} else {
|
|
_file = audioFile;
|
|
_file = audioFile;
|
|
}
|
|
}
|
|
- let iiframe = this.$refs["iiframe"];
|
|
|
|
- let _this = this;
|
|
|
|
|
|
+
|
|
// this.uploadFile(_file,{changeText:false,flag:true})
|
|
// this.uploadFile(_file,{changeText:false,flag:true})
|
|
// return console.log(_file);
|
|
// return console.log(_file);
|
|
|
|
|
|
@@ -1492,41 +1489,44 @@ ${JSON.stringify(_list)}
|
|
console.log(_file);
|
|
console.log(_file);
|
|
|
|
|
|
try {
|
|
try {
|
|
- this.wavGetTextLoading = true;
|
|
|
|
- iiframe.contentWindow.window.document.getElementById(
|
|
|
|
- "languageOptions"
|
|
|
|
- ).selectedIndex = this.languageRadio;
|
|
|
|
- _this.transcriptionData.content = "";
|
|
|
|
- iiframe.contentWindow.onRecognizedResult = function(e) {
|
|
|
|
- if (flag) {
|
|
|
|
- // 这里上传文件
|
|
|
|
- // _this.uploadWavFile(audioFile);
|
|
|
|
- _this.controlsStatus = 2;
|
|
|
|
- _this.showIndexPage = false;
|
|
|
|
- _this.pageStatus = 2;
|
|
|
|
- _this.editorBarData.type = "0";
|
|
|
|
- flag = false;
|
|
|
|
- _this.uploadFileLoading = false;
|
|
|
|
- _this.transcriptionData.content = "";
|
|
|
|
- _this.editorBarData.content = "";
|
|
|
|
- textList = [];
|
|
|
|
- }
|
|
|
|
- _this.wavGetTextLoading = true;
|
|
|
|
- _this.showGetTextLoading = true;
|
|
|
|
- let privText = e.privText;
|
|
|
|
- console.log("👇转译对象👇");
|
|
|
|
- console.log(e);
|
|
|
|
- console.log("👇转译结果👇");
|
|
|
|
- console.log(privText);
|
|
|
|
- textList.push({
|
|
|
|
- value: privText,
|
|
|
|
- startTime: "",
|
|
|
|
- endTime: "",
|
|
|
|
- time: ""
|
|
|
|
- });
|
|
|
|
- _this.transcriptionData.content += privText;
|
|
|
|
|
|
+ let iiframe = this.$refs["iiframe"];
|
|
|
|
+ let _this = this;
|
|
|
|
+ this.wavGetTextLoading = true;
|
|
|
|
+ iiframe.contentWindow.window.document.getElementById(
|
|
|
|
+ "languageOptions"
|
|
|
|
+ ).selectedIndex = this.languageRadio;
|
|
|
|
+ _this.transcriptionData.content = "";
|
|
|
|
+ iiframe.contentWindow.onRecognizedResult = function(e) {
|
|
|
|
+ if (flag) {
|
|
|
|
+ // 这里上传文件
|
|
|
|
+ // _this.uploadWavFile(audioFile);
|
|
|
|
+ _this.controlsStatus = 2;
|
|
|
|
+ _this.showIndexPage = false;
|
|
|
|
+ _this.pageStatus = 2;
|
|
|
|
+ _this.editorBarData.type = "0";
|
|
|
|
+ flag = false;
|
|
|
|
+ _this.uploadFileLoading = false;
|
|
|
|
+ _this.transcriptionData.content = "";
|
|
|
|
+ _this.editorBarData.content = "";
|
|
|
|
+ textList = [];
|
|
|
|
+ }
|
|
|
|
+ _this.wavGetTextLoading = true;
|
|
|
|
+ _this.showGetTextLoading = true;
|
|
|
|
+ let privText = e.privText;
|
|
|
|
+ console.log("👇转译对象👇");
|
|
|
|
+ console.log(e);
|
|
|
|
+ console.log("👇转译结果👇");
|
|
|
|
+ console.log(privText);
|
|
|
|
+ if(!privText)return;
|
|
|
|
+ textList.push({
|
|
|
|
+ value: privText,
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ time: ""
|
|
|
|
+ });
|
|
|
|
+ _this.transcriptionData.content += privText;
|
|
|
|
|
|
- let _result = `
|
|
|
|
|
|
+ let _result = `
|
|
<table
|
|
<table
|
|
border="0"
|
|
border="0"
|
|
width="100%"
|
|
width="100%"
|
|
@@ -1545,8 +1545,8 @@ ${JSON.stringify(_list)}
|
|
<th>行为编码</th>
|
|
<th>行为编码</th>
|
|
</tr>
|
|
</tr>
|
|
`;
|
|
`;
|
|
- textList.forEach((item, index) => {
|
|
|
|
- _result += `<tr>
|
|
|
|
|
|
+ textList.forEach((item, index) => {
|
|
|
|
+ _result += `<tr>
|
|
<td>${index + 1}</td>
|
|
<td>${index + 1}</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
@@ -1555,8 +1555,8 @@ ${JSON.stringify(_list)}
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>`;
|
|
</tr>`;
|
|
- });
|
|
|
|
- _result += `
|
|
|
|
|
|
+ });
|
|
|
|
+ _result += `
|
|
<tr>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
@@ -1568,42 +1568,41 @@ ${JSON.stringify(_list)}
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
</table>`;
|
|
</table>`;
|
|
- _this.editorBarData.content = _result;
|
|
|
|
- // _this.editorBarData.content += privText;
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- iiframe.contentWindow.onSessionStopped = function(e) {
|
|
|
|
- console.log("转译完成");
|
|
|
|
- console.log(e);
|
|
|
|
- _this.$message.success("转译完成");
|
|
|
|
- _this.showGetTextLoading = false;
|
|
|
|
- _this.wavGetTextLoading = false;
|
|
|
|
- _this.saveEditorBar();
|
|
|
|
- };
|
|
|
|
|
|
+ _this.editorBarData.content = _result;
|
|
|
|
+ // _this.editorBarData.content += privText;
|
|
|
|
+ };
|
|
|
|
|
|
- iiframe.contentWindow.doContinuousPronunciationAssessment("", {
|
|
|
|
- files: [_file]
|
|
|
|
- });
|
|
|
|
- } catch (error) {
|
|
|
|
- this.wavGetTextLoading = false;
|
|
|
|
- this.showGetTextLoading = false;
|
|
|
|
- }
|
|
|
|
|
|
+ iiframe.contentWindow.onSessionStopped = function(e) {
|
|
|
|
+ if(_this.wavFileGetTextLoading)_this.$message.success("转译完成");
|
|
|
|
+ _this.showGetTextLoading = false;
|
|
|
|
+ _this.wavGetTextLoading = false;
|
|
|
|
+ _this.saveEditorBar();
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ iiframe.contentWindow.doContinuousPronunciationAssessment("", {
|
|
|
|
+ files: [_file]
|
|
|
|
+ });
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error)
|
|
|
|
+ this.wavGetTextLoading = false;
|
|
|
|
+ this.showGetTextLoading = false;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ stopWavGetText() {
|
|
|
|
+ if (this.wavGetTextLoading) {
|
|
|
|
+ try {
|
|
|
|
+ let iiframe = this.$refs["iiframe"];
|
|
|
|
+ iiframe.contentWindow.scenarioStopButton.click();
|
|
|
|
+ this.wavGetTextLoading = false;
|
|
|
|
+ this.showGetTextLoading = false;
|
|
|
|
+ this.$message.success("终止转译成功");
|
|
|
|
+ } catch (error) {
|
|
|
|
+ this.$message.error("终止转译失败");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.error("转译未开始");
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- stopWavGetText(){
|
|
|
|
- if(this.wavGetTextLoading){
|
|
|
|
- try {
|
|
|
|
- let iiframe = this.$refs["iiframe"];
|
|
|
|
- iiframe.contentWindow.scenarioStopButton.click();
|
|
|
|
- this.wavGetTextLoading = false;
|
|
|
|
- this.showGetTextLoading = false;
|
|
|
|
- this.$message.success("终止转译成功")
|
|
|
|
- } catch (error) {
|
|
|
|
- this.$message.error("终止转译失败")
|
|
|
|
- }
|
|
|
|
- }else {
|
|
|
|
- this.$message.error("转译未开始")
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
uploadFile(file, { changeText = true, flag = true }) {
|
|
uploadFile(file, { changeText = true, flag = true }) {
|
|
var credentials = {
|
|
var credentials = {
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
accessKeyId: "AKIATLPEDU37QV5CHLMH",
|
|
@@ -2027,7 +2026,7 @@ ${JSON.stringify(_list)}
|
|
getChatList() {
|
|
getChatList() {
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
if (!this.tid) return;
|
|
if (!this.tid) return;
|
|
- let _copyTid = this.tid;
|
|
|
|
|
|
+ let _copyTid = this.tid;
|
|
// if (this.chatLoading) return;
|
|
// if (this.chatLoading) return;
|
|
this.chatList = [];
|
|
this.chatList = [];
|
|
this.chatLoading = true;
|
|
this.chatLoading = true;
|
|
@@ -2040,10 +2039,10 @@ ${JSON.stringify(_list)}
|
|
this.ajax
|
|
this.ajax
|
|
.post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
|
|
.post("https://gpt4.cocorobo.cn/get_agent_park_chat", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
- if(_copyTid!=this.tid)return;
|
|
|
|
- // this.chatLoading = false;
|
|
|
|
- // return this.getChatList()
|
|
|
|
- // };
|
|
|
|
|
|
+ if (_copyTid != this.tid) return;
|
|
|
|
+ // this.chatLoading = false;
|
|
|
|
+ // return this.getChatList()
|
|
|
|
+ // };
|
|
let _data = JSON.parse(res.data.FunctionResponse);
|
|
let _data = JSON.parse(res.data.FunctionResponse);
|
|
if (_data.length > 0) {
|
|
if (_data.length > 0) {
|
|
let _chatList = [];
|
|
let _chatList = [];
|
|
@@ -2085,11 +2084,13 @@ ${JSON.stringify(_list)}
|
|
//保存消息
|
|
//保存消息
|
|
async insertChat(_uid) {
|
|
async insertChat(_uid) {
|
|
let _data = this.chatList.find(i => i.uid == _uid);
|
|
let _data = this.chatList.find(i => i.uid == _uid);
|
|
-
|
|
|
|
|
|
+
|
|
if (!_data) return;
|
|
if (!_data) return;
|
|
let params = {
|
|
let params = {
|
|
userId: this.userId,
|
|
userId: this.userId,
|
|
- userName: this.userName?this.userName:await this.getUser(this.userId),
|
|
|
|
|
|
+ userName: this.userName
|
|
|
|
+ ? this.userName
|
|
|
|
+ : await this.getUser(this.userId),
|
|
groupId: "602def61-005d-11ee-91d8-005056b8q12w",
|
|
groupId: "602def61-005d-11ee-91d8-005056b8q12w",
|
|
answer: _data.aiContent,
|
|
answer: _data.aiContent,
|
|
problem: _data.content,
|
|
problem: _data.content,
|
|
@@ -2110,8 +2111,8 @@ ${JSON.stringify(_list)}
|
|
.get(this.$store.state.api + "getUser", params)
|
|
.get(this.$store.state.api + "getUser", params)
|
|
.then(res => {
|
|
.then(res => {
|
|
let data = res.data[0][0];
|
|
let data = res.data[0][0];
|
|
- this.userName = data.username;
|
|
|
|
- resolve(data.username)
|
|
|
|
|
|
+ this.userName = data.username;
|
|
|
|
+ resolve(data.username);
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
console.error(err);
|
|
console.error(err);
|