diff --git a/.gitignore b/.gitignore index 4bea0a5..8096610 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,5 @@ resource/fonts/*.ttf resource/fonts/*.otf resource/srt/*.srt app/models/faster-whisper-large-v2/* +app/models/faster-whisper-large-v3/* app/models/bert/* diff --git a/README-cn.md b/README-en.md similarity index 100% rename from README-cn.md rename to README-en.md diff --git a/README.md b/README.md index b969811..7528267 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

一站式 AI 影视解说+自动化剪辑工具🎬🎞️

-

📖 English | 简体中文 | 日本語

+

📖 English | 简体中文 | 日本語

[//]: # ( harry0703%2FNarratoAI | Trendshift) @@ -83,7 +83,7 @@ _**注意⚠️:近期在 x (推特) 上发现有人冒充作者在 pump.fun ## 配置要求 📦 - 建议最低 CPU 4核或以上,内存 8G 或以上,显卡非必须 -- Windows 10 或 MacOS 11.0 以上系统 +- Windows 10/11 或 MacOS 11.0 以上系统 - [Python 3.10+](https://www.python.org/downloads/) ## 反馈建议 📢 diff --git a/app/services/subtitle.py b/app/services/subtitle.py index e7f037d..b5d9a29 100644 --- a/app/services/subtitle.py +++ b/app/services/subtitle.py @@ -33,7 +33,7 @@ def create(audio_file, subtitle_file: str = ""): """ global model, device, compute_type if not model: - model_path = f"{utils.root_dir()}/app/models/faster-whisper-large-v2" + model_path = f"{utils.root_dir()}/app/models/faster-whisper-large-v3" model_bin_file = f"{model_path}/model.bin" if not os.path.isdir(model_path) or not os.path.isfile(model_bin_file): logger.error( @@ -403,7 +403,7 @@ def extract_audio_and_create_subtitle(video_file: str, subtitle_file: str = "") logger.info("音频提取完成,开始生成字幕") # 使用create函数生成字幕 - create(audio_file, subtitle_file) + create("/Users/apple/Desktop/WhisperX-zhuanlu/1_qyn2-2_Vocals.wav", subtitle_file) # 删除临时音频文件 if os.path.exists(audio_file): @@ -422,8 +422,8 @@ if __name__ == "__main__": task_id = "123456" task_dir = utils.task_dir(task_id) subtitle_file = f"{task_dir}/subtitle_123456.srt" - audio_file = f"{task_dir}/audio.wav" - video_file = "/Users/apple/Desktop/home/NarratoAI/resource/videos/merged_video_1702.mp4" + audio_file = "/Users/apple/Desktop/WhisperX-zhuanlu/1_qyn2-2_Vocals.wav" + video_file = "/Users/apple/Desktop/home/NarratoAI/storage/temp/merge/qyn2-2-720p.mp4" extract_audio_and_create_subtitle(video_file, subtitle_file)