Spaces:
Running
Running
Update index.html
Browse files- index.html +8 -7
index.html
CHANGED
@@ -70,11 +70,11 @@
|
|
70 |
}
|
71 |
|
72 |
.video-container {
|
73 |
-
flex: 0 0
|
74 |
}
|
75 |
|
76 |
.asr-container {
|
77 |
-
flex: 0 0
|
78 |
overflow-y: auto;
|
79 |
position: relative;
|
80 |
display: flex;
|
@@ -388,10 +388,10 @@
|
|
388 |
</video>
|
389 |
|
390 |
<!-- Added serverUrl input field -->
|
391 |
-
<div style="margin: 10px 0;">
|
392 |
<label for="serverUrlInput">服务器地址:</label>
|
393 |
<input type="text" id="serverUrlInput" value="https://www.funsound.cn/" class="server-url-input">
|
394 |
-
</div>
|
395 |
|
396 |
<div class="options-container">
|
397 |
<!-- Recognition Model -->
|
@@ -450,8 +450,8 @@
|
|
450 |
<script>
|
451 |
let currentTaskId = null; // 当前任务ID
|
452 |
let asrData = []; // 存储识别结果数据
|
453 |
-
let serverUrl =
|
454 |
-
const chunkSize =
|
455 |
|
456 |
// 监听文件输入更改,预览视频
|
457 |
document.getElementById('videoInput').addEventListener('change', function (event) {
|
@@ -485,7 +485,7 @@
|
|
485 |
document.getElementById('uploadBtn').innerText = '正在转写...';
|
486 |
|
487 |
resetProgress();
|
488 |
-
serverUrl = document.getElementById('serverUrlInput').value.trim();
|
489 |
log('Server URL: ' + serverUrl);
|
490 |
|
491 |
initializeTask(file, speakerRecognition, englishTranslation, selectedPipeline);
|
@@ -826,6 +826,7 @@
|
|
826 |
document.getElementById('videoPlayer').src = `${serverUrl}/video/${taskId}`;
|
827 |
document.getElementById('downloadVideoBtn').style.display = 'inline'; // Show the download button
|
828 |
resetGenerateButton();
|
|
|
829 |
}
|
830 |
} else {
|
831 |
handleProgressError();
|
|
|
70 |
}
|
71 |
|
72 |
.video-container {
|
73 |
+
flex: 0 0 30%;
|
74 |
}
|
75 |
|
76 |
.asr-container {
|
77 |
+
flex: 0 0 70%;
|
78 |
overflow-y: auto;
|
79 |
position: relative;
|
80 |
display: flex;
|
|
|
388 |
</video>
|
389 |
|
390 |
<!-- Added serverUrl input field -->
|
391 |
+
<!-- <div style="margin: 10px 0;">
|
392 |
<label for="serverUrlInput">服务器地址:</label>
|
393 |
<input type="text" id="serverUrlInput" value="https://www.funsound.cn/" class="server-url-input">
|
394 |
+
</div> -->
|
395 |
|
396 |
<div class="options-container">
|
397 |
<!-- Recognition Model -->
|
|
|
450 |
<script>
|
451 |
let currentTaskId = null; // 当前任务ID
|
452 |
let asrData = []; // 存储识别结果数据
|
453 |
+
let serverUrl = "https://www.funsound.cn"; // 服务器地址
|
454 |
+
const chunkSize = 1 * 1024 * 1024; // 分块大小,5MB
|
455 |
|
456 |
// 监听文件输入更改,预览视频
|
457 |
document.getElementById('videoInput').addEventListener('change', function (event) {
|
|
|
485 |
document.getElementById('uploadBtn').innerText = '正在转写...';
|
486 |
|
487 |
resetProgress();
|
488 |
+
// serverUrl = document.getElementById('serverUrlInput').value.trim();
|
489 |
log('Server URL: ' + serverUrl);
|
490 |
|
491 |
initializeTask(file, speakerRecognition, englishTranslation, selectedPipeline);
|
|
|
826 |
document.getElementById('videoPlayer').src = `${serverUrl}/video/${taskId}`;
|
827 |
document.getElementById('downloadVideoBtn').style.display = 'inline'; // Show the download button
|
828 |
resetGenerateButton();
|
829 |
+
log("生成完毕,点击上方播放器进行预览");
|
830 |
}
|
831 |
} else {
|
832 |
handleProgressError();
|