mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-13 19:23:26 +08:00
fix(engine): 修复自定义字幕引擎相关问题
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user