添加了 TTS 相关服务并更新了设置

This commit is contained in:
1600822305
2025-04-11 00:43:13 +08:00
parent 0f55b92f0e
commit 8e1ebf29b2
28 changed files with 1859 additions and 1276 deletions
+6 -1
View File
@@ -64,7 +64,7 @@ const api = {
binaryFile: (fileId: string) => ipcRenderer.invoke(IpcChannel.File_BinaryFile, fileId)
},
fs: {
read: (path: string) => ipcRenderer.invoke(IpcChannel.Fs_Read, path)
read: (path: string, encoding?: BufferEncoding) => ipcRenderer.invoke(IpcChannel.Fs_Read, path, encoding)
},
export: {
toWord: (markdown: string, fileName: string) => ipcRenderer.invoke(IpcChannel.Export_Word, markdown, fileName)
@@ -119,6 +119,11 @@ const api = {
toggle: () => ipcRenderer.invoke(IpcChannel.MiniWindow_Toggle),
setPin: (isPinned: boolean) => ipcRenderer.invoke(IpcChannel.MiniWindow_SetPin, isPinned)
},
msTTS: {
getVoices: () => ipcRenderer.invoke(IpcChannel.MsTTS_GetVoices),
synthesize: (text: string, voice: string, outputFormat: string) =>
ipcRenderer.invoke(IpcChannel.MsTTS_Synthesize, text, voice, outputFormat)
},
aes: {
encrypt: (text: string, secretKey: string, iv: string) =>
ipcRenderer.invoke(IpcChannel.Aes_Encrypt, text, secretKey, iv),