|
|
@@ -243,8 +243,6 @@ const goBack = () => {
|
|
|
const toggleLight = () => {
|
|
|
state.lamp.isLightOn = true;
|
|
|
generateCode('javascript');
|
|
|
- // 在运行前设置为正在录音状态
|
|
|
- startRecordingStatus();
|
|
|
runCode();
|
|
|
};
|
|
|
|
|
|
@@ -267,7 +265,7 @@ function startRecordingStatus() {
|
|
|
countdownInterval = setInterval(() => {
|
|
|
recordingCountdown.value--;
|
|
|
if (recordingCountdown.value <= 0) {
|
|
|
-clearInterval(countdownInterval);
|
|
|
+ clearInterval(countdownInterval);
|
|
|
endRecordingStatus();
|
|
|
}
|
|
|
}, 1000);
|
|
|
@@ -422,6 +420,7 @@ const jsonDataString = computed({
|
|
|
// });
|
|
|
|
|
|
//输出结果
|
|
|
+
|
|
|
const output = ref('');
|
|
|
const statusMessage = ref('');
|
|
|
const statusType = ref('');
|
|
|
@@ -558,7 +557,9 @@ async function pollTaskStatus(taskType, taskIds, fetchApi, onSuccess, onFailure)
|
|
|
const aiService = {
|
|
|
// 语音识别
|
|
|
recognizeVoice: withErrorHandling('语音识别', async function(promptText = "", language = "zh-CN") {
|
|
|
- console.log("语音识别开始");
|
|
|
+ // 在运行前设置为正在录音状态
|
|
|
+ startRecordingStatus();
|
|
|
+ console.log("语音识别开始");
|
|
|
// 前端语音采集
|
|
|
const recognitionResult = await this.captureVoice(language, promptText);
|
|
|
return recognitionResult || "";
|
|
|
@@ -1638,7 +1639,7 @@ const showStatus = (message, type = 'success') => {
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
- z-index: 2000;
|
|
|
+ z-index: 1000;
|
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
|
// backdrop-filter: blur(5px);
|
|
|
overflow: auto;
|