diff --git a/README.md b/README.md index 42b4c12..c208f35 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ ## 交流讨论 💬 - + ## 更新日志 diff --git a/app/config/config.py b/app/config/config.py index 414b444..82c7e9f 100644 --- a/app/config/config.py +++ b/app/config/config.py @@ -56,7 +56,7 @@ listen_port = _cfg.get("listen_port", 8080) project_name = _cfg.get("project_name", "MoneyPrinterTurbo") project_description = _cfg.get("project_description", "https://github.com/harry0703/MoneyPrinterTurbo") -project_version = _cfg.get("project_version", "1.1.2") +project_version = _cfg.get("project_version", "1.1.3") reload_debug = False imagemagick_path = app.get("imagemagick_path", "") diff --git a/app/services/material.py b/app/services/material.py index e2a65cc..2ef348a 100644 --- a/app/services/material.py +++ b/app/services/material.py @@ -51,7 +51,7 @@ def search_videos(search_term: str, logger.info(f"searching videos: {query_url}, with proxies: {proxies}") try: - r = requests.get(query_url, headers=headers, proxies=proxies, verify=False) + r = requests.get(query_url, headers=headers, proxies=proxies, verify=False, timeout=(30, 60)) response = r.json() video_items = [] if "videos" not in response: diff --git a/app/services/voice.py b/app/services/voice.py index 5b6a460..5a9e597 100644 --- a/app/services/voice.py +++ b/app/services/voice.py @@ -15,7 +15,7 @@ from app.utils import utils def get_all_azure_voices(filter_locals=None) -> list[str]: if filter_locals is None: - filter_locals = ["zh-CN", "en-US", "zh-HK", "zh-TW"] + filter_locals = ["zh-CN", "en-US", "zh-HK", "zh-TW", "vi-VN"] voices_str = """ Name: af-ZA-AdriNeural Gender: Female diff --git a/docs/wechat-03.jpg b/docs/wechat-03.jpg deleted file mode 100644 index 401fb6a..0000000 Binary files a/docs/wechat-03.jpg and /dev/null differ diff --git a/docs/wechat-04.jpg b/docs/wechat-04.jpg new file mode 100644 index 0000000..bdecc5e Binary files /dev/null and b/docs/wechat-04.jpg differ diff --git a/resource/fonts/MicrosoftYaHeiBold.ttc b/resource/fonts/MicrosoftYaHeiBold.ttc new file mode 100644 index 0000000..351b10f Binary files /dev/null and b/resource/fonts/MicrosoftYaHeiBold.ttc differ diff --git a/resource/fonts/MicrosoftYaHeiNormal.ttc b/resource/fonts/MicrosoftYaHeiNormal.ttc new file mode 100644 index 0000000..ddc87b9 Binary files /dev/null and b/resource/fonts/MicrosoftYaHeiNormal.ttc differ diff --git a/resource/fonts/UTM Kabel KT.ttf b/resource/fonts/UTM Kabel KT.ttf new file mode 100644 index 0000000..399bd07 Binary files /dev/null and b/resource/fonts/UTM Kabel KT.ttf differ diff --git a/webui/Main.py b/webui/Main.py index 481f78e..5b8716a 100644 --- a/webui/Main.py +++ b/webui/Main.py @@ -223,7 +223,7 @@ left_panel = panel[0] middle_panel = panel[1] right_panel = panel[2] -params = VideoParams() +params = VideoParams(video_subject="") with left_panel: with st.container(border=True): @@ -234,7 +234,7 @@ with left_panel: video_languages = [ (tr("Auto Detect"), ""), ] - for code in ["zh-CN", "zh-TW", "de-DE", "en-US"]: + for code in ["zh-CN", "zh-TW", "de-DE", "en-US", "vi-VN"]: video_languages.append((code, code)) selected_index = st.selectbox(tr("Script Language"), @@ -299,7 +299,8 @@ with middle_panel: index=0) with st.container(border=True): st.write(tr("Audio Settings")) - voices = voice.get_all_azure_voices(filter_locals=["zh-CN", "zh-HK", "zh-TW", "de-DE", "en-US", "fr-FR"]) + voices = voice.get_all_azure_voices( + filter_locals=["zh-CN", "zh-HK", "zh-TW", "de-DE", "en-US", "fr-FR", "vi-VN"]) friendly_names = { v: v. replace("Female", tr("Female")). diff --git a/webui/i18n/vi.json b/webui/i18n/vi.json new file mode 100644 index 0000000..2dbc6ea --- /dev/null +++ b/webui/i18n/vi.json @@ -0,0 +1,66 @@ +{ + "Language": "Tiếng Việt", + "Translation": { + "Video Script Settings": "**Cài Đặt Kịch Bản Video**", + "Video Subject": "Chủ Đề Video (Cung cấp một từ khóa, :red[AI sẽ tự động tạo ra] kịch bản video)", + "Script Language": "Ngôn Ngữ cho Việc Tạo Kịch Bản Video (AI sẽ tự động xuất ra dựa trên ngôn ngữ của chủ đề của bạn)", + "Generate Video Script and Keywords": "Nhấn để sử dụng AI để tạo [Kịch Bản Video] và [Từ Khóa Video] dựa trên **chủ đề**", + "Auto Detect": "Tự Động Phát Hiện", + "Video Script": "Kịch Bản Video (:blue[① Tùy chọn, AI tạo ra ② Dấu câu chính xác giúp việc tạo phụ đề)", + "Generate Video Keywords": "Nhấn để sử dụng AI để tạo [Từ Khóa Video] dựa trên **kịch bản**", + "Please Enter the Video Subject": "Vui lòng Nhập Kịch Bản Video Trước", + "Generating Video Script and Keywords": "AI đang tạo kịch bản video và từ khóa...", + "Generating Video Keywords": "AI đang tạo từ khóa video...", + "Video Keywords": "Từ Khóa Video (:blue[① Tùy chọn, AI tạo ra ② Sử dụng dấu phẩy **Tiếng Anh** để phân tách, chỉ sử dụng Tiếng Anh])", + "Video Settings": "**Cài Đặt Video**", + "Video Concat Mode": "Chế Độ Nối Video", + "Random": "Nối Ngẫu Nhiên (Được Khuyến Nghị)", + "Sequential": "Nối Theo Thứ Tự", + "Video Ratio": "Tỷ Lệ Khung Hình Video", + "Portrait": "Dọc 9:16", + "Landscape": "Ngang 16:9", + "Clip Duration": "Thời Lượng Tối Đa Của Đoạn Video (giây)", + "Number of Videos Generated Simultaneously": "Số Video Được Tạo Ra Đồng Thời", + "Audio Settings": "**Cài Đặt Âm Thanh**", + "Speech Synthesis": "Giọng Đọc Văn Bản", + "Speech Region": "Vùng(:red[Bắt Buộc,[Lấy Vùng](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/SpeechServices)])", + "Speech Key": "Khóa API(:red[Bắt Buộc,[Lấy Khóa API](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/SpeechServices)])", + "Speech Volume": "Âm Lượng Giọng Đọc (1.0 đại diện cho 100%)", + "Male": "Nam", + "Female": "Nữ", + "Background Music": "Âm Nhạc Nền", + "No Background Music": "Không Có Âm Nhạc Nền", + "Random Background Music": "Âm Nhạc Nền Ngẫu Nhiên", + "Custom Background Music": "Âm Nhạc Nền Tùy Chỉnh", + "Custom Background Music File": "Vui lòng nhập đường dẫn tệp cho âm nhạc nền tùy chỉnh:", + "Background Music Volume": "Âm Lượng Âm Nhạc Nền (0.2 đại diện cho 20%, âm nhạc nền không nên quá to)", + "Subtitle Settings": "**Cài Đặt Phụ Đề**", + "Enable Subtitles": "Bật Phụ Đề (Nếu không chọn, các cài đặt dưới đây sẽ không có hiệu lực)", + "Font": "Phông Chữ Phụ Đề", + "Position": "Vị Trí Phụ Đề", + "Top": "Trên", + "Center": "Giữa", + "Bottom": "Dưới (Được Khuyến Nghị)", + "Font Size": "Cỡ Chữ Phụ Đề", + "Font Color": "Màu Chữ Phụ Đề", + "Stroke Color": "Màu Viền Phụ Đề", + "Stroke Width": "Độ Rộng Viền Phụ Đề", + "Generate Video": "Tạo Video", + "Video Script and Subject Cannot Both Be Empty": "Chủ Đề Video và Kịch Bản Video không thể cùng trống", + "Generating Video": "Đang tạo video, vui lòng đợi...", + "Start Generating Video": "Bắt Đầu Tạo Video", + "Video Generation Completed": "Hoàn Tất Tạo Video", + "You can download the generated video from the following links": "Bạn có thể tải video được tạo ra từ các liên kết sau", + "Pexels API Key": "Khóa API Pexels (:red[Bắt Buộc] [Lấy Khóa API](https://www.pexels.com/api/))", + "Basic Settings": "**Cài Đặt Cơ Bản** (:blue[Nhấp để mở rộng])", + "Language": "Ngôn Ngữ", + "LLM Provider": "Nhà Cung Cấp LLM", + "API Key": "Khóa API (:red[Bắt Buộc])", + "Base Url": "Url Cơ Bản", + "Account ID": "ID Tài Khoản (Lấy từ bảng điều khiển Cloudflare)", + "Model Name": "Tên Mô Hình", + "Please Enter the LLM API Key": "Vui lòng Nhập **Khóa API LLM**", + "Please Enter the Pexels API Key": "Vui lòng Nhập **Khóa API Pexels**", + "Get Help": "Nếu bạn cần giúp đỡ hoặc có bất kỳ câu hỏi nào, bạn có thể tham gia discord để được giúp đỡ: https://harryai.cc" + } +}