返回提交历史
Modified
g4f/gui/client/static/js/chat.v1.js
+2
-3
XFEstudio/gpt4free
Fix SpeechRecognition on Phone
070eeadc
代码差异
1 个文件
+2
-3
@@ -1287,10 +1287,11 @@ if (SpeechRecognition) {
1287
1287
}
1288
1288
};
1289
1289
recognition.onresult = function(event) {
1290
window.clearTimeout(timeoutHandle);
1291
timeoutHandle = window.setTimeout(may_stop, transcript ? 10000 : 8000);
1290
1292
if (!event.results) {
1291
1293
return;
1292
1294
}
1293
window.clearTimeout(timeoutHandle);
1294
1295
1295
1296
let result = event.results[event.resultIndex];
1296
1297
let isFinal = result.isFinal && (result[0].confidence > 0);
@@ -1309,8 +1310,6 @@ if (SpeechRecognition) {
1309
1310
messageInput.style.height = messageInput.scrollHeight + "px";
1310
1311
messageInput.scrollTop = messageInput.scrollHeight;
1311
1312
}
1312
1313
timeoutHandle = window.setTimeout(may_stop, transcript ? 10000 : 8000);
1314
1313
};
1315
1314
1316
1315
microLabel.addEventListener("click", () => {