feat(translation): 添加非实时翻译功能用户界面组件

This commit is contained in:
himeditator
2025-09-04 23:41:22 +08:00
parent 14987cbfc5
commit 2b7ce06f04
15 changed files with 193 additions and 77 deletions

View File

@@ -81,7 +81,9 @@ export class CaptionEngine {
}
else if(allConfig.controls.engine === 'vosk'){
this.command.push('-e', 'vosk')
this.command.push('-m', `"${allConfig.controls.modelPath}"`)
this.command.push('-m', `"${allConfig.controls.modelPath}"`)
this.command.push('-tm', allConfig.controls.transModel)
this.command.push('-on', allConfig.controls.ollamaName)
}
}
Log.info('Engine Path:', this.appPath)
@@ -257,6 +259,9 @@ function handleEngineData(data: any) {
else if(data.command === 'info') {
Log.info('Engine Info:', data.content)
}
else if(data.command === 'warn') {
Log.warn('Engine Warn:', data.content)
}
else if(data.command === 'error') {
Log.error('Engine Error:', data.content)
controlWindow.sendErrorMessage(/*i18n('engine.error') +*/ data.content)