feat(renderer): 在用户界面中添加新功能的设置

- 添加录音功能,可保存为 WAV 文件
- 优化字幕引擎设置界面,支持更多配置选项
- 更新多语言翻译,增加模型下载链接等信息
This commit is contained in:
himeditator
2025-09-07 14:35:18 +08:00
parent 6bff978b88
commit 4abd6d0808
12 changed files with 351 additions and 123 deletions

View File

@@ -6,12 +6,18 @@ import { Log } from './Log'
import { app, BrowserWindow } from 'electron'
import * as path from 'path'
import * as fs from 'fs'
import os from 'os'
interface CaptionTranslation {
time_s: string,
translation: string
}
function getDesktopPath() {
const homeDir = os.homedir()
return path.join(homeDir, 'Desktop')
}
const defaultStyles: Styles = {
lineBreak: 1,
fontFamily: 'sans-serif',
@@ -42,8 +48,11 @@ const defaultControls: Controls = {
audio: 0,
engineEnabled: false,
API_KEY: '',
modelPath: '',
voskModelPath: '',
sosvModelPath: '',
recordingPath: getDesktopPath(),
translation: true,
recording: false,
customized: false,
customizedApp: '',
customizedCommand: '',