From 8fc8905afcf41d18963c782d1f209bd8c0f5ae71 Mon Sep 17 00:00:00 2001 From: an-lee Date: Fri, 22 Mar 2024 08:44:48 +0800 Subject: [PATCH] Feat: may download files(recording/audio/video/speech) (#431) * may download recording * may download recording/audio/video/speech --- enjoy/src/i18n/en.json | 2 ++ enjoy/src/i18n/zh-CN.json | 2 ++ enjoy/src/main/db/models/audio.ts | 5 +++ enjoy/src/main/db/models/speech.ts | 5 +++ enjoy/src/main/db/models/video.ts | 5 +++ enjoy/src/main/downloader.ts | 12 ++++--- enjoy/src/preload.ts | 2 +- .../medias/media-current-recording.tsx | 33 +++++++++++++++++++ .../components/medias/media-player.tsx | 30 +++++++++++++++++ .../components/messages/assistant-message.tsx | 33 +++++++++++++++++++ enjoy/src/types/audio.d.ts | 1 + enjoy/src/types/enjoy-app.d.ts | 4 +-- enjoy/src/types/video.d.ts | 1 + 13 files changed, 128 insertions(+), 7 deletions(-) diff --git a/enjoy/src/i18n/en.json b/enjoy/src/i18n/en.json index a2cdbbf1..bcb440c0 100644 --- a/enjoy/src/i18n/en.json +++ b/enjoy/src/i18n/en.json @@ -227,6 +227,8 @@ "welcomeBack": "Welcome back! {{name}}", "download": "Download", "downloading": "Downloading {{file}}", + "downloadedSuccessfully": "Downloaded successfully", + "downloadFailed": "Download failed", "chooseAIModelDependingOnYourHardware": "Choose AI Model depending on your hardware.", "areYouSureToDownload": "Are you sure to download {{name}}?", "yourModelsWillBeDownloadedTo": "Your models will be downloaded to {{path}}", diff --git a/enjoy/src/i18n/zh-CN.json b/enjoy/src/i18n/zh-CN.json index f95e72ea..86dc42f5 100644 --- a/enjoy/src/i18n/zh-CN.json +++ b/enjoy/src/i18n/zh-CN.json @@ -227,6 +227,8 @@ "welcomeBack": "欢迎回来, {{name}}", "download": "下载", "downloading": "正在下载 {{file}}", + "downloadedSuccessfully": "下载成功", + "downloadFailed": "下载失败", "chooseAIModelDependingOnYourHardware": "根据您的硬件选择合适的 AI 模型, 以便语音转文本服务正常工作", "areYouSureToDownload": "您确定要下载 {{name}} 吗?", "yourModelsWillBeDownloadedTo": "您的模型将下载到目录 {{path}}", diff --git a/enjoy/src/main/db/models/audio.ts b/enjoy/src/main/db/models/audio.ts index 9bcadbf2..55e34cb1 100644 --- a/enjoy/src/main/db/models/audio.ts +++ b/enjoy/src/main/db/models/audio.ts @@ -134,6 +134,11 @@ export class Audio extends Model