mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
feat: 实现语音转文字并支持流式输出;
fix: 修复了语音解密失败的问题
This commit is contained in:
@@ -20,7 +20,8 @@ export const CONFIG_KEYS = {
|
||||
IMAGE_AES_KEY: 'imageAesKey',
|
||||
WHISPER_MODEL_NAME: 'whisperModelName',
|
||||
WHISPER_MODEL_DIR: 'whisperModelDir',
|
||||
WHISPER_DOWNLOAD_SOURCE: 'whisperDownloadSource'
|
||||
WHISPER_DOWNLOAD_SOURCE: 'whisperDownloadSource',
|
||||
AUTO_TRANSCRIBE_VOICE: 'autoTranscribeVoice'
|
||||
} as const
|
||||
|
||||
// 获取解密密钥
|
||||
@@ -218,3 +219,14 @@ export async function getOnboardingDone(): Promise<boolean> {
|
||||
export async function setOnboardingDone(done: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.ONBOARDING_DONE, done)
|
||||
}
|
||||
|
||||
// 获取自动语音转文字开关
|
||||
export async function getAutoTranscribeVoice(): Promise<boolean> {
|
||||
const value = await config.get(CONFIG_KEYS.AUTO_TRANSCRIBE_VOICE)
|
||||
return value === true
|
||||
}
|
||||
|
||||
// 设置自动语音转文字开关
|
||||
export async function setAutoTranscribeVoice(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.AUTO_TRANSCRIBE_VOICE, enabled)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user