diff --git a/docs/api-docs/electron-ipc.md b/docs/api-docs/electron-ipc.md index f6965dd..eacc673 100644 --- a/docs/api-docs/electron-ipc.md +++ b/docs/api-docs/electron-ipc.md @@ -182,6 +182,16 @@ **数据类型:** 无数据 +### `control.engine.forceKill` + +**介绍:** 强制关闭启动超时的字幕引擎 + +**发起方:** 前端控制窗口 + +**接收方:** 后端控制窗口实例 + +**数据类型:** 无数据 + ### `caption.windowHeight.change` **介绍:** 字幕窗口宽度发生改变 diff --git a/engine/utils/server.py b/engine/utils/server.py index 407c8c8..f16d299 100644 --- a/engine/utils/server.py +++ b/engine/utils/server.py @@ -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() diff --git a/src/renderer/src/components/EngineControl.vue b/src/renderer/src/components/EngineControl.vue index de52b0e..a784f08 100644 --- a/src/renderer/src/components/EngineControl.vue +++ b/src/renderer/src/components/EngineControl.vue @@ -114,7 +114,10 @@ - {{ $t('engine.startTimeout') }} + {{ $t('engine.startTimeout') }} diff --git a/src/renderer/src/components/EngineStatus.vue b/src/renderer/src/components/EngineStatus.vue index 22de500..a05a34a 100644 --- a/src/renderer/src/components/EngineStatus.vue +++ b/src/renderer/src/components/EngineStatus.vue @@ -84,7 +84,7 @@ danger class="control-button" type="primary" - :loading="true" + :icon="h(LoadingOutlined)" >{{ $t('status.forceKillStarting') }} 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) diff --git a/src/renderer/src/i18n/lang/en.ts b/src/renderer/src/i18n/lang/en.ts index 49725e6..a63fa8e 100644 --- a/src/renderer/src/i18n/lang/en.ts +++ b/src/renderer/src/i18n/lang/en.ts @@ -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.", diff --git a/src/renderer/src/i18n/lang/ja.ts b/src/renderer/src/i18n/lang/ja.ts index ccef35f..a6b0486 100644 --- a/src/renderer/src/i18n/lang/ja.ts +++ b/src/renderer/src/i18n/lang/ja.ts @@ -55,7 +55,8 @@ export default { "showMore": "詳細設定", "apikey": "API KEY", "modelPath": "モデルパス", - "startTimeout": "起動タイムアウト", + "startTimeout": "時間制限", + "seconds": "秒", "apikeyInfo": "Gummy 字幕エンジンに必要な API KEY は、アリババクラウド百煉プラットフォームから取得する必要があります。詳細情報はプロジェクトのユーザーマニュアルをご覧ください。", "modelPathInfo": "Vosk 字幕エンジンに必要なモデルのフォルダパスです。必要なモデルを事前にローカルマシンにダウンロードする必要があります。詳細情報はプロジェクトのユーザーマニュアルをご覧ください。", "startTimeoutInfo": "字幕エンジンの起動タイムアウト時間です。この時間を超えると自動的に強制停止されます。10-120秒の範囲で設定することを推奨します。", diff --git a/src/renderer/src/i18n/lang/zh.ts b/src/renderer/src/i18n/lang/zh.ts index fd1b4f9..b981965 100644 --- a/src/renderer/src/i18n/lang/zh.ts +++ b/src/renderer/src/i18n/lang/zh.ts @@ -56,6 +56,7 @@ export default { "apikey": "API KEY", "modelPath": "模型路径", "startTimeout": "启动超时", + "seconds": "秒", "apikeyInfo": "Gummy 字幕引擎需要的 API KEY,需要在阿里云百炼平台获取。详细信息见项目用户手册。", "modelPathInfo": "Vosk 字幕引擎需要的模型的文件夹路径,需要提前下载需要的模型到本地。信息详情见项目用户手册。", "startTimeoutInfo": "字幕引擎启动超时时间,超过此时间将自动强制停止。建议设置为 10-120 秒之间。",