fix(engine): 修复自定义字幕引擎相关问题

This commit is contained in:
himeditator
2025-07-17 20:52:27 +08:00
parent 5513c7e84c
commit f7d2df938d
18 changed files with 37 additions and 27 deletions

View File

@@ -13,13 +13,13 @@ export class CaptionEngine {
processStatus: 'running' | 'stopping' | 'stopped' = 'stopped'
private getApp(): boolean {
allConfig.controls.customized = false
if (allConfig.controls.customized && allConfig.controls.customizedApp) {
console.log('[INFO] Using customized engine')
this.appPath = allConfig.controls.customizedApp
this.command = [allConfig.controls.customizedCommand]
allConfig.controls.customized = true
this.command = allConfig.controls.customizedCommand.split(' ')
}
else if (allConfig.controls.engine === 'gummy') {
allConfig.controls.customized = false
if(!allConfig.controls.API_KEY && !process.env.DASHSCOPE_API_KEY) {
controlWindow.sendErrorMessage(i18n('gummy.key.missing'))
return false
@@ -51,6 +51,7 @@ export class CaptionEngine {
}
}
else if(allConfig.controls.engine === 'vosk'){
allConfig.controls.customized = false
let voskName = 'main-vosk'
if (process.platform === 'win32') {
voskName += '.exe'

View File

@@ -7,7 +7,7 @@
:value="(customized && customizedApp)?$t('status.customized'):engine"
/>
</a-col>
<a-popover :title="$t('status.engineStatus')">
<a-popover :title="$t('status.engineStatus')">
<template #content>
<a-row class="engine-status">
<a-col :flex="1" :title="$t('status.pid')" style="cursor:pointer;">
@@ -41,8 +41,8 @@
<InfoCircleOutlined style="font-size:18px;color:#1677ff"/>
</template>
</a-statistic>
</a-col>
</a-popover>
</a-col>
</a-popover>
<a-col :span="6">
<a-statistic :title="$t('status.logNumber')" :value="captionData.length" />
</a-col>
@@ -77,7 +77,7 @@
<p class="about-desc">{{ $t('status.about.desc') }}</p>
<a-divider />
<div class="about-info">
<p><b>{{ $t('status.about.version') }}</b><a-tag color="green">v0.5.0</a-tag></p>
<p><b>{{ $t('status.about.version') }}</b><a-tag color="green">v0.5.1</a-tag></p>
<p>
<b>{{ $t('status.about.author') }}</b>
<a

View File

@@ -93,7 +93,7 @@ export default {
"engine": "Caption Engine",
"engineStatus": "Caption Engine Status",
"pid": "Process ID",
"ppid": "Parent Process ID",
"ppid": "Parent Process ID",
"cpu": "CPU Usage",
"mem": "Memory Usage",
"elapsed": "Running Time",
@@ -116,7 +116,7 @@ export default {
"projLink": "Project Link",
"manual": "User Manual",
"engineDoc": "Caption Engine Manual",
"date": "July 15, 2025"
"date": "July 17, 2025"
}
},
log: {

View File

@@ -94,7 +94,7 @@ export default {
"engineStatus": "字幕エンジンの状態",
"pid": "プロセス ID",
"ppid": "親プロセス ID",
"cpu": "CPU 使用率",
"cpu": "CPU 使用率",
"mem": "メモリ使用量",
"elapsed": "稼働時間",
"customized": "カスタマイズ済み",
@@ -116,7 +116,7 @@ export default {
"projLink": "プロジェクトリンク",
"manual": "ユーザーマニュアル",
"engineDoc": "字幕エンジンマニュアル",
"date": "2025 年 7 月 15 日"
"date": "2025 年 7 月 17 日"
}
},
log: {

View File

@@ -116,7 +116,7 @@ export default {
"projLink": "项目链接",
"manual": "用户手册",
"engineDoc": "字幕引擎手册",
"date": "2025 年 7 月 15 日"
"date": "2025 年 7 月 17 日"
}
},
log: {