mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-04 04:14:42 +08:00
feat(engine): 优化超时启动功能的小问题
- 更新接口文档 - 修改国际化文本使得内容不超过标签长度 - 解决强制关闭按钮点击无效的问题
This commit is contained in:
@@ -182,6 +182,16 @@
|
||||
|
||||
**数据类型:** 无数据
|
||||
|
||||
### `control.engine.forceKill`
|
||||
|
||||
**介绍:** 强制关闭启动超时的字幕引擎
|
||||
|
||||
**发起方:** 前端控制窗口
|
||||
|
||||
**接收方:** 后端控制窗口实例
|
||||
|
||||
**数据类型:** 无数据
|
||||
|
||||
### `caption.windowHeight.change`
|
||||
|
||||
**介绍:** 字幕窗口宽度发生改变
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import socket
|
||||
import threading
|
||||
import json
|
||||
# import time
|
||||
from utils import thread_data, stdout_cmd, stderr
|
||||
|
||||
|
||||
@@ -33,6 +34,7 @@ def start_server(port: int):
|
||||
stderr(str(e))
|
||||
stdout_cmd('kill')
|
||||
return
|
||||
# time.sleep(20)
|
||||
stdout_cmd('connect')
|
||||
|
||||
client, addr = server.accept()
|
||||
|
||||
@@ -114,7 +114,10 @@
|
||||
<template #content>
|
||||
<p class="label-hover-info">{{ $t('engine.startTimeoutInfo') }}</p>
|
||||
</template>
|
||||
<span class="input-label info-label">{{ $t('engine.startTimeout') }}</span>
|
||||
<span
|
||||
class="input-label info-label"
|
||||
style="vertical-align: middle;"
|
||||
>{{ $t('engine.startTimeout') }}</span>
|
||||
</a-popover>
|
||||
<a-input-number
|
||||
class="input-area"
|
||||
@@ -122,7 +125,7 @@
|
||||
:min="10"
|
||||
:max="120"
|
||||
:step="5"
|
||||
addon-after="秒"
|
||||
:addon-after="$t('engine.seconds')"
|
||||
/>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
danger
|
||||
class="control-button"
|
||||
type="primary"
|
||||
:loading="true"
|
||||
:icon="h(LoadingOutlined)"
|
||||
>{{ $t('status.forceKillStarting') }}</a-button>
|
||||
</a-popconfirm>
|
||||
<a-button
|
||||
@@ -143,12 +143,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { EngineInfo } from '@renderer/types'
|
||||
import { ref, watch } from 'vue'
|
||||
import { ref, watch, h } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useCaptionLogStore } from '@renderer/stores/captionLog'
|
||||
import { useSoftwareLogStore } from '@renderer/stores/softwareLog'
|
||||
import { useEngineControlStore } from '@renderer/stores/engineControl'
|
||||
import { GithubOutlined, InfoCircleOutlined } from '@ant-design/icons-vue'
|
||||
import { GithubOutlined, InfoCircleOutlined, LoadingOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
const showAbout = ref(false)
|
||||
const pending = ref(false)
|
||||
|
||||
@@ -55,7 +55,8 @@ export default {
|
||||
"showMore": "More Settings",
|
||||
"apikey": "API KEY",
|
||||
"modelPath": "Model Path",
|
||||
"startTimeout": "Start Timeout",
|
||||
"startTimeout": "Timeout",
|
||||
"seconds": "seconds",
|
||||
"apikeyInfo": "API KEY required for the Gummy subtitle engine, which needs to be obtained from the Alibaba Cloud Bailing platform. For more details, see the project user manual.",
|
||||
"modelPathInfo": "The folder path of the model required by the Vosk subtitle engine. You need to download the required model to your local machine in advance. For more details, see the project user manual.",
|
||||
"startTimeoutInfo": "Caption engine startup timeout duration. Engine will be forcefully stopped if startup exceeds this time. Recommended range: 10-120 seconds.",
|
||||
|
||||
@@ -55,7 +55,8 @@ export default {
|
||||
"showMore": "詳細設定",
|
||||
"apikey": "API KEY",
|
||||
"modelPath": "モデルパス",
|
||||
"startTimeout": "起動タイムアウト",
|
||||
"startTimeout": "時間制限",
|
||||
"seconds": "秒",
|
||||
"apikeyInfo": "Gummy 字幕エンジンに必要な API KEY は、アリババクラウド百煉プラットフォームから取得する必要があります。詳細情報はプロジェクトのユーザーマニュアルをご覧ください。",
|
||||
"modelPathInfo": "Vosk 字幕エンジンに必要なモデルのフォルダパスです。必要なモデルを事前にローカルマシンにダウンロードする必要があります。詳細情報はプロジェクトのユーザーマニュアルをご覧ください。",
|
||||
"startTimeoutInfo": "字幕エンジンの起動タイムアウト時間です。この時間を超えると自動的に強制停止されます。10-120秒の範囲で設定することを推奨します。",
|
||||
|
||||
@@ -56,6 +56,7 @@ export default {
|
||||
"apikey": "API KEY",
|
||||
"modelPath": "模型路径",
|
||||
"startTimeout": "启动超时",
|
||||
"seconds": "秒",
|
||||
"apikeyInfo": "Gummy 字幕引擎需要的 API KEY,需要在阿里云百炼平台获取。详细信息见项目用户手册。",
|
||||
"modelPathInfo": "Vosk 字幕引擎需要的模型的文件夹路径,需要提前下载需要的模型到本地。信息详情见项目用户手册。",
|
||||
"startTimeoutInfo": "字幕引擎启动超时时间,超过此时间将自动强制停止。建议设置为 10-120 秒之间。",
|
||||
|
||||
Reference in New Issue
Block a user