diff --git a/.gitignore b/.gitignore index c1b698b..a23eeec 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules dist out project +tts/* resources/scripts/build* resources/scripts/dist resources/scripts/model diff --git a/package-lock.json b/package-lock.json index 430cd5a..97f6c35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "laitool", - "version": "3.0.1-preview.4", + "version": "3.0.1-preview.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "laitool", - "version": "3.0.1-preview.4", + "version": "3.0.1-preview.5", "hasInstallScript": true, "dependencies": { "@alicloud/alimt20181012": "^1.2.0", @@ -1927,13 +1927,18 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.1.0", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.13.0" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.13.0", + "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==" + }, "node_modules/@types/responselike": { "version": "1.0.3", "license": "MIT", @@ -5732,6 +5737,14 @@ "debug": "^4.1.1" } }, + "node_modules/httpx/node_modules/@types/node": { + "version": "20.14.14", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.14.14.tgz", + "integrity": "sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/iconv-lite": { "version": "0.6.3", "license": "MIT", @@ -11679,9 +11692,10 @@ "integrity": "sha512-Ka0DBegjuV9IPYFT1h0Qqk5U4pccebNIJCGl8C5uU7xtOs+jpJvKGAY4fHGK25hTmXZOEUl9Cnsg5cS6K/b5DA==" }, "node_modules/typescript": { - "version": "5.3.3", + "version": "5.5.4", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "devOptional": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index a3f912f..d31b1f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "laitool", - "version": "3.0.1-preview.4", + "version": "3.0.1-preview.5", "description": "An AI tool for image processing, video processing, and other functions.", "main": "./out/main/index.js", "author": "laitool.cn", diff --git a/resources/image/c_s/7f403066-7722-4423-853e-17bac07c5565.png b/resources/image/c_s/7f403066-7722-4423-853e-17bac07c5565.png index a867917..7eb99ea 100644 Binary files a/resources/image/c_s/7f403066-7722-4423-853e-17bac07c5565.png and b/resources/image/c_s/7f403066-7722-4423-853e-17bac07c5565.png differ diff --git a/resources/scripts/db/software.realm.lock b/resources/scripts/db/software.realm.lock index 79b6f5d..04f0ae3 100644 Binary files a/resources/scripts/db/software.realm.lock and b/resources/scripts/db/software.realm.lock differ diff --git a/resources/scripts/db/tts.realm b/resources/scripts/db/tts.realm new file mode 100644 index 0000000..0f1cc0b Binary files /dev/null and b/resources/scripts/db/tts.realm differ diff --git a/resources/scripts/db/tts.realm.lock b/resources/scripts/db/tts.realm.lock new file mode 100644 index 0000000..5f5ccef Binary files /dev/null and b/resources/scripts/db/tts.realm.lock differ diff --git a/resources/tmp/config/clip_setting.json b/resources/tmp/config/clip_setting.json index a2283fc..fe5b380 100644 --- a/resources/tmp/config/clip_setting.json +++ b/resources/tmp/config/clip_setting.json @@ -1,79 +1 @@ -{ - "text_style": [ - { - "name": "无", - "id": "0", - "style": [], - "font_size": 7, - "fonts": "新青年体", - "style_name": "黄字黑边", - "clip": { - "alpha": 1, - "flip": { - "horizontal": false, - "vertical": false - }, - "rotation": 0, - "scale": { - "x": 1, - "y": 1 - }, - "transform": { - "x": 0, - "y": -0.8333333333333334 - } - }, - "ratio": "4:3" - }, - { - "name": "随机", - "id": "1", - "style": [], - "font_size": 7, - "fonts": "新青年体", - "style_name": "黄字黑边", - "clip": { - "alpha": 1, - "flip": { - "horizontal": false, - "vertical": false - }, - "rotation": 0, - "scale": { - "x": 1, - "y": 1 - }, - "transform": { - "x": 0, - "y": -0.8333333333333334 - } - }, - "ratio": "4:3" - } - ], - "background_music_setting": [ - { - "name": "女频-甜文", - "folder_path": "D:\\甜文", - "id": "741f52af-a8a2-4e26-85e9-e2326d91e28d" - } - ], - "friendly_reminder_setting": [ - { - "id": "0", - "name": "无", - "material_animations": {}, - "texts": {}, - "tracks": {}, - "text_value": "无" - }, - { - "id": "1", - "name": "随机", - "material_animations": {}, - "texts": {}, - "tracks": {}, - "text_value": "下面的数据随机生成(不包含这条啊)" - } - ] -} \ No newline at end of file +{"text_style":[{"name":"无","id":"0","style":[],"font_size":7,"fonts":"新青年体","style_name":"黄字黑边","clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":1,"y":1},"transform":{"x":0,"y":-0.8333333333333334}},"ratio":"4:3"},{"name":"随机","id":"1","style":[],"font_size":7,"fonts":"新青年体","style_name":"黄字黑边","clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":1,"y":1},"transform":{"x":0,"y":-0.8333333333333334}},"ratio":"4:3"},{"name":"test3","id":"8d5b03e5-552a-485f-852f-b3df99e3fc25","style":[{"fill":{"content":{"solid":{"color":[1,0.870588,0]}}},"font":{"path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.1.0.11009/Resources/Font/新青年体.ttf","id":"6740435892441190919"},"strokes":[{"content":{"solid":{"color":[0,0,0]}},"width":0.08}],"size":7,"range":[0,4]}],"font_size":7,"fonts":"新青年体","style_name":"黄字黑边","clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":1,"y":1},"transform":{"x":0,"y":-0.8333333333333334}},"ratio":"4:3"},{"name":"金陵体_黑字白边","id":"2074d84c-7ac1-455d-a1ef-4d4453bb0ef7","style":[{"bold":true,"fill":{"content":{"render_type":"solid","solid":{"alpha":1,"color":[0,0,0]}}},"font":{"id":"7086699209738424840","path":"C:/Users/27698/AppData/Local/JianyingPro/User Data/Cache/effect/1698067/599831579b8aa5b5f0608d5e7d4ec5ce/FZCuJinLJW.ttf"},"range":[0,4],"size":7,"strokes":[{"alpha":1,"content":{"render_type":"solid","solid":{"alpha":1,"color":[1,1,1]}},"width":0.08}],"useLetterColor":true}],"font_size":7,"fonts":"金陵体","style_name":"","clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":1,"y":1},"transform":{"x":0,"y":-0.8333333333333334}},"ratio":"4:3"}],"background_music_setting":[],"friendly_reminder_setting":[{"id":"0","name":"无","material_animations":{},"texts":{},"tracks":{},"text_value":"无"},{"id":"1","name":"随机","material_animations":{},"texts":{},"tracks":{},"text_value":"下面的数据随机生成(不包含这条啊)"},{"id":"f4862857-1db6-428f-88e5-53473609fa18","name":"虚拟内容 请勿模仿","material_animations":{"animations":[],"id":"B1AFE531-0139-4beb-A950-23AFFA5B889C","type":"sticker_animation"},"texts":{"add_type":0,"alignment":1,"background_alpha":1,"background_color":"","background_height":0.14,"background_horizontal_offset":0,"background_round_radius":0,"background_style":0,"background_vertical_offset":0,"background_width":0.14,"bold_width":0,"border_alpha":1,"border_color":"","border_width":0.08,"caption_template_info":{"category_id":"","category_name":"","effect_id":"","resource_id":"","resource_name":""},"check_flag":7,"combo_info":{"text_templates":[]},"content":"{\"styles\":[{\"fill\":{\"alpha\":1.0,\"content\":{\"render_type\":\"solid\",\"solid\":{\"alpha\":1.0,\"color\":[1.0,1.0,1.0]}}},\"font\":{\"id\":\"\",\"path\":\"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf\"},\"range\":[0,9],\"size\":15.0}],\"text\":\"虚拟内容\\n请勿模仿\"}","fixed_height":-1,"fixed_width":-1,"font_category_id":"","font_category_name":"","font_id":"","font_name":"","font_path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf","font_resource_id":"","font_size":15,"font_source_platform":0,"font_team_id":"","font_title":"none","font_url":"","fonts":[],"force_apply_line_max_width":false,"global_alpha":1,"group_id":"","has_shadow":false,"id":"83F79AF1-A749-4aa8-B059-F11108F70A6E","initial_scale":1,"is_rich_text":false,"italic_degree":0,"ktv_color":"","language":"","layer_weight":1,"letter_spacing":0,"line_feed":1,"line_max_width":0.82,"line_spacing":0.02,"name":"","original_size":[],"preset_category":"","preset_category_id":"","preset_has_set_alignment":false,"preset_id":"","preset_index":0,"preset_name":"","recognize_task_id":"","recognize_type":0,"relevance_segment":[],"shadow_alpha":0.8,"shadow_angle":-45,"shadow_color":"","shadow_distance":8,"shadow_point":{"x":1.0182337649086284,"y":-1.0182337649086284},"shadow_smoothing":1,"shape_clip_x":false,"shape_clip_y":false,"style_name":"","sub_type":0,"subtitle_keywords":null,"text_alpha":1,"text_color":"#ffffff","text_curve":null,"text_preset_resource_id":"","text_size":30,"text_to_audio_ids":[],"tts_auto_update":false,"type":"text","typesetting":0,"underline":false,"underline_offset":0.22,"underline_width":0.05,"use_effect_default_color":true,"words":{"end_time":[],"start_time":[],"text":[]}},"tracks":{"attribute":0,"flag":0,"id":"CC71B371-480D-424f-8980-546C68EAEB6F","is_default_name":true,"name":"","segments":[{"cartoon":false,"clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":0.39049561306183955,"y":0.39049561306183955},"transform":{"x":0.8192161820480404,"y":0.8473861720067454}},"common_keyframes":[],"enable_adjust":false,"enable_color_curves":true,"enable_color_match_adjust":false,"enable_color_wheels":true,"enable_lut":false,"enable_smart_color_adjust":false,"extra_material_refs":["B1AFE531-0139-4beb-A950-23AFFA5B889C"],"group_id":"","hdr_settings":null,"id":"5AC3F57F-92E5-4249-AA7F-F3D7D84F3759","intensifies_audio":false,"is_placeholder":false,"is_tone_modify":false,"keyframe_refs":[],"last_nonzero_volume":1,"material_id":"83F79AF1-A749-4aa8-B059-F11108F70A6E","render_index":14000,"responsive_layout":{"enable":false,"horizontal_pos_layout":0,"size_layout":0,"target_follow":"","vertical_pos_layout":0},"reverse":false,"source_timerange":null,"speed":1,"target_timerange":{"duration":3000000,"start":0},"template_id":"","template_scene":"default","track_attribute":0,"track_render_index":0,"uniform_scale":{"on":true,"value":1},"visible":true,"volume":1}],"type":"text"},"text_value":"虚拟内容\n请勿模仿"},{"id":"78f7cbcf-bbe5-4f08-9b8c-747d2e582ab8","name":"虚拟小说内容 请勿模仿","material_animations":{"animations":[],"id":"B0B9928C-5394-4af8-83B1-FB124F86C3CF","type":"sticker_animation"},"texts":{"add_type":0,"alignment":1,"background_alpha":1,"background_color":"","background_height":0.14,"background_horizontal_offset":0,"background_round_radius":0,"background_style":0,"background_vertical_offset":0,"background_width":0.14,"bold_width":0,"border_alpha":1,"border_color":"","border_width":0.08,"caption_template_info":{"category_id":"","category_name":"","effect_id":"","resource_id":"","resource_name":""},"check_flag":7,"combo_info":{"text_templates":[]},"content":"{\"styles\":[{\"fill\":{\"alpha\":1.0,\"content\":{\"render_type\":\"solid\",\"solid\":{\"alpha\":1.0,\"color\":[1.0,1.0,1.0]}}},\"font\":{\"id\":\"\",\"path\":\"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf\"},\"range\":[0,11],\"size\":15.0}],\"text\":\"虚拟小说内容 请勿模仿\"}","fixed_height":-1,"fixed_width":-1,"font_category_id":"","font_category_name":"","font_id":"","font_name":"","font_path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf","font_resource_id":"","font_size":15,"font_source_platform":0,"font_team_id":"","font_title":"none","font_url":"","fonts":[],"force_apply_line_max_width":false,"global_alpha":1,"group_id":"","has_shadow":false,"id":"3D8C3AC4-2926-4b69-B1A7-ED0031B5EE47","initial_scale":1,"is_rich_text":false,"italic_degree":0,"ktv_color":"","language":"","layer_weight":1,"letter_spacing":0,"line_feed":1,"line_max_width":0.82,"line_spacing":0.02,"name":"","original_size":[],"preset_category":"","preset_category_id":"","preset_has_set_alignment":false,"preset_id":"","preset_index":0,"preset_name":"","recognize_task_id":"","recognize_type":0,"relevance_segment":[],"shadow_alpha":0.8,"shadow_angle":-45,"shadow_color":"","shadow_distance":8,"shadow_point":{"x":1.0182337649086284,"y":-1.0182337649086284},"shadow_smoothing":1,"shape_clip_x":false,"shape_clip_y":false,"style_name":"","sub_type":0,"subtitle_keywords":null,"text_alpha":1,"text_color":"#ffffff","text_curve":null,"text_preset_resource_id":"","text_size":30,"text_to_audio_ids":[],"tts_auto_update":false,"type":"text","typesetting":0,"underline":false,"underline_offset":0.22,"underline_width":0.05,"use_effect_default_color":true,"words":{"end_time":[],"start_time":[],"text":[]}},"tracks":{"attribute":0,"flag":0,"id":"C6D7DD2A-8431-4fee-93D2-7E503C847BD7","is_default_name":true,"name":"","segments":[{"cartoon":false,"clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":0.3341015354334309,"y":0.3341015354334309},"transform":{"x":0.663716814159292,"y":0.918212478920742}},"common_keyframes":[],"enable_adjust":false,"enable_color_curves":true,"enable_color_match_adjust":false,"enable_color_wheels":true,"enable_lut":false,"enable_smart_color_adjust":false,"extra_material_refs":["B0B9928C-5394-4af8-83B1-FB124F86C3CF"],"group_id":"","hdr_settings":null,"id":"A40D04ED-C36A-45bf-97D8-D574EBC74B04","intensifies_audio":false,"is_placeholder":false,"is_tone_modify":false,"keyframe_refs":[],"last_nonzero_volume":1,"material_id":"3D8C3AC4-2926-4b69-B1A7-ED0031B5EE47","render_index":14002,"responsive_layout":{"enable":false,"horizontal_pos_layout":0,"size_layout":0,"target_follow":"","vertical_pos_layout":0},"reverse":false,"source_timerange":null,"speed":1,"target_timerange":{"duration":3000000,"start":0},"template_id":"","template_scene":"default","track_attribute":0,"track_render_index":0,"uniform_scale":{"on":true,"value":1},"visible":true,"volume":1}],"type":"text"},"text_value":"虚拟小说内容 请勿模仿"},{"id":"b093fac1-06c5-4293-8fd8-76cf07e2aa42","name":"故事纯属虚构,请勿模仿","material_animations":{"animations":[],"id":"AD6528B5-8A30-4856-959A-9DDD508A7774","type":"sticker_animation"},"texts":{"add_type":0,"alignment":1,"background_alpha":1,"background_color":"","background_height":0.14,"background_horizontal_offset":0,"background_round_radius":0,"background_style":0,"background_vertical_offset":0,"background_width":0.14,"bold_width":0,"border_alpha":1,"border_color":"","border_width":0.08,"caption_template_info":{"category_id":"","category_name":"","effect_id":"","resource_id":"","resource_name":""},"check_flag":7,"combo_info":{"text_templates":[]},"content":"{\"styles\":[{\"fill\":{\"alpha\":1.0,\"content\":{\"render_type\":\"solid\",\"solid\":{\"alpha\":1.0,\"color\":[1.0,1.0,1.0]}}},\"font\":{\"id\":\"6740435892441190919\",\"path\":\"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/新青年体.ttf\"},\"range\":[0,11],\"size\":15.0}],\"text\":\"故事纯属虚构,请勿模仿\"}","fixed_height":-1,"fixed_width":-1,"font_category_id":"","font_category_name":"","font_id":"","font_name":"","font_path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/新青年体.ttf","font_resource_id":"6740435892441190919","font_size":15,"font_source_platform":0,"font_team_id":"","font_title":"none","font_url":"","fonts":[],"force_apply_line_max_width":false,"global_alpha":1,"group_id":"","has_shadow":false,"id":"54E1F74E-FC64-4795-94D3-B29B5071CDAD","initial_scale":1,"is_rich_text":false,"italic_degree":0,"ktv_color":"","language":"","layer_weight":1,"letter_spacing":0,"line_feed":1,"line_max_width":0.82,"line_spacing":0.02,"name":"","original_size":[],"preset_category":"","preset_category_id":"","preset_has_set_alignment":false,"preset_id":"","preset_index":0,"preset_name":"","recognize_task_id":"","recognize_type":0,"relevance_segment":[],"shadow_alpha":0.8,"shadow_angle":-45,"shadow_color":"","shadow_distance":8,"shadow_point":{"x":1.0182337649086284,"y":-1.0182337649086284},"shadow_smoothing":1,"shape_clip_x":false,"shape_clip_y":false,"style_name":"","sub_type":0,"subtitle_keywords":null,"text_alpha":1,"text_color":"#ffffff","text_curve":null,"text_preset_resource_id":"","text_size":30,"text_to_audio_ids":[],"tts_auto_update":false,"type":"text","typesetting":0,"underline":false,"underline_offset":0.22,"underline_width":0.05,"use_effect_default_color":true,"words":{"end_time":[],"start_time":[],"text":[]}},"tracks":{"attribute":0,"flag":0,"id":"783E0C53-B36E-4a7b-A880-F05E758FD2DB","is_default_name":true,"name":"","segments":[{"cartoon":false,"clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":0.2860491929811744,"y":0.2860491929811744},"transform":{"x":0.7124542124542124,"y":0.9087947882736158}},"common_keyframes":[],"enable_adjust":false,"enable_color_curves":true,"enable_color_match_adjust":false,"enable_color_wheels":true,"enable_lut":false,"enable_smart_color_adjust":false,"extra_material_refs":["AD6528B5-8A30-4856-959A-9DDD508A7774"],"group_id":"","hdr_settings":null,"id":"A5557348-B228-4222-BDA7-2798283A0F68","intensifies_audio":false,"is_placeholder":false,"is_tone_modify":false,"keyframe_refs":[],"last_nonzero_volume":1,"material_id":"54E1F74E-FC64-4795-94D3-B29B5071CDAD","render_index":14002,"responsive_layout":{"enable":false,"horizontal_pos_layout":0,"size_layout":0,"target_follow":"","vertical_pos_layout":0},"reverse":false,"source_timerange":null,"speed":1,"target_timerange":{"duration":3000000,"start":0},"template_id":"","template_scene":"default","track_attribute":0,"track_render_index":0,"uniform_scale":{"on":true,"value":1},"visible":true,"volume":1}],"type":"text"},"text_value":"故事纯属虚构,请勿模仿"},{"id":"f0d739ad-2ef5-443f-a598-b58c6cab0a58","name":"AI生成画面 无不良引导","material_animations":{"animations":[],"id":"CFA0E8D8-1B2B-4b3a-8CF5-64A1A252D953","type":"sticker_animation"},"texts":{"add_type":0,"alignment":1,"background_alpha":1,"background_color":"","background_height":0.14,"background_horizontal_offset":0,"background_round_radius":0,"background_style":0,"background_vertical_offset":0,"background_width":0.14,"bold_width":0,"border_alpha":1,"border_color":"","border_width":0.08,"caption_template_info":{"category_id":"","category_name":"","effect_id":"","resource_id":"","resource_name":""},"check_flag":7,"combo_info":{"text_templates":[]},"content":"{\"styles\":[{\"fill\":{\"alpha\":1.0,\"content\":{\"render_type\":\"solid\",\"solid\":{\"alpha\":1.0,\"color\":[1.0,1.0,1.0]}}},\"font\":{\"id\":\"\",\"path\":\"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf\"},\"range\":[0,12],\"size\":15.0,\"useLetterColor\":true}],\"text\":\"AI生成画面\\n无不良引导\"}","fixed_height":-1,"fixed_width":-1,"font_category_id":"","font_category_name":"","font_id":"","font_name":"","font_path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf","font_resource_id":"","font_size":15,"font_source_platform":0,"font_team_id":"","font_title":"none","font_url":"","fonts":[],"force_apply_line_max_width":false,"global_alpha":1,"group_id":"","has_shadow":false,"id":"1AE8EF5E-6380-4130-B164-709E2160BFD0","initial_scale":1,"is_rich_text":false,"italic_degree":0,"ktv_color":"","language":"","layer_weight":1,"letter_spacing":0,"line_feed":1,"line_max_width":0.82,"line_spacing":0.02,"name":"","original_size":[],"preset_category":"","preset_category_id":"","preset_has_set_alignment":false,"preset_id":"","preset_index":0,"preset_name":"","recognize_task_id":"","recognize_type":0,"relevance_segment":[],"shadow_alpha":0.8,"shadow_angle":-45,"shadow_color":"","shadow_distance":8,"shadow_point":{"x":1.0182337649086284,"y":-1.0182337649086284},"shadow_smoothing":1,"shape_clip_x":false,"shape_clip_y":false,"style_name":"","sub_type":0,"subtitle_keywords":null,"text_alpha":1,"text_color":"#ffffff","text_curve":null,"text_preset_resource_id":"","text_size":30,"text_to_audio_ids":[],"tts_auto_update":false,"type":"text","typesetting":0,"underline":false,"underline_offset":0.22,"underline_width":0.05,"use_effect_default_color":false,"words":{"end_time":[],"start_time":[],"text":[]}},"tracks":{"attribute":0,"flag":0,"id":"B468156C-B4B6-4949-91E3-FBDB56839C48","is_default_name":true,"name":"","segments":[{"cartoon":false,"clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":0.40831670575608614,"y":0.40831670575608614},"transform":{"x":0.8086015433073044,"y":0.8607584675000406}},"common_keyframes":[],"enable_adjust":false,"enable_color_curves":true,"enable_color_match_adjust":false,"enable_color_wheels":true,"enable_lut":false,"enable_smart_color_adjust":false,"extra_material_refs":["CFA0E8D8-1B2B-4b3a-8CF5-64A1A252D953"],"group_id":"","hdr_settings":null,"id":"ACEDF876-5665-4c6c-AC88-95B3AE49352E","intensifies_audio":false,"is_placeholder":false,"is_tone_modify":false,"keyframe_refs":[],"last_nonzero_volume":1,"material_id":"1AE8EF5E-6380-4130-B164-709E2160BFD0","render_index":14000,"responsive_layout":{"enable":false,"horizontal_pos_layout":0,"size_layout":0,"target_follow":"","vertical_pos_layout":0},"reverse":false,"source_timerange":null,"speed":1,"target_timerange":{"duration":3000000,"start":0},"template_id":"","template_scene":"default","track_attribute":0,"track_render_index":0,"uniform_scale":{"on":true,"value":1},"visible":true,"volume":1}],"type":"text"},"text_value":"AI生成画面\n无不良引导"},{"id":"b422ce35-d439-46d7-9b51-e0d21e72e99d","name":"小说内容 请勿模仿","material_animations":{"animations":[],"id":"96F35048-8837-43de-8E83-4F3C3683FBEC","type":"sticker_animation"},"texts":{"add_type":0,"alignment":1,"background_alpha":1,"background_color":"","background_height":0.14,"background_horizontal_offset":0,"background_round_radius":0,"background_style":0,"background_vertical_offset":0,"background_width":0.14,"bold_width":0,"border_alpha":1,"border_color":"","border_width":0.08,"caption_template_info":{"category_id":"","category_name":"","effect_id":"","resource_id":"","resource_name":""},"check_flag":7,"combo_info":{"text_templates":[]},"content":"{\"styles\":[{\"fill\":{\"alpha\":1.0,\"content\":{\"render_type\":\"solid\",\"solid\":{\"alpha\":1.0,\"color\":[1.0,1.0,1.0]}}},\"font\":{\"id\":\"\",\"path\":\"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf\"},\"range\":[0,9],\"size\":15.0,\"useLetterColor\":true}],\"text\":\"小说内容\\n请勿模仿\"}","fixed_height":-1,"fixed_width":-1,"font_category_id":"","font_category_name":"","font_id":"","font_name":"","font_path":"C:/Users/27698/AppData/Local/JianyingPro/Apps/5.3.0.11154/Resources/Font/SystemFont/zh-hans.ttf","font_resource_id":"","font_size":15,"font_source_platform":0,"font_team_id":"","font_title":"none","font_url":"","fonts":[],"force_apply_line_max_width":false,"global_alpha":1,"group_id":"","has_shadow":false,"id":"92C492B0-944F-48e5-8C99-40FAB82B9648","initial_scale":1,"is_rich_text":false,"italic_degree":0,"ktv_color":"","language":"","layer_weight":1,"letter_spacing":0,"line_feed":1,"line_max_width":0.82,"line_spacing":0.02,"name":"","original_size":[],"preset_category":"","preset_category_id":"","preset_has_set_alignment":false,"preset_id":"","preset_index":0,"preset_name":"","recognize_task_id":"","recognize_type":0,"relevance_segment":[],"shadow_alpha":0.8,"shadow_angle":-45,"shadow_color":"","shadow_distance":8,"shadow_point":{"x":1.0182337649086284,"y":-1.0182337649086284},"shadow_smoothing":1,"shape_clip_x":false,"shape_clip_y":false,"style_name":"","sub_type":0,"subtitle_keywords":null,"text_alpha":1,"text_color":"#ffffff","text_curve":null,"text_preset_resource_id":"","text_size":30,"text_to_audio_ids":[],"tts_auto_update":false,"type":"text","typesetting":0,"underline":false,"underline_offset":0.22,"underline_width":0.05,"use_effect_default_color":false,"words":{"end_time":[],"start_time":[],"text":[]}},"tracks":{"attribute":0,"flag":0,"id":"DAB33387-452D-4597-9A10-932E1FC1B47E","is_default_name":true,"name":"","segments":[{"cartoon":false,"clip":{"alpha":1,"flip":{"horizontal":false,"vertical":false},"rotation":0,"scale":{"x":0.40831670575608614,"y":0.40831670575608614},"transform":{"x":0.8238636363636365,"y":0.8535353535353536}},"common_keyframes":[],"enable_adjust":false,"enable_color_curves":true,"enable_color_match_adjust":false,"enable_color_wheels":true,"enable_lut":false,"enable_smart_color_adjust":false,"extra_material_refs":["96F35048-8837-43de-8E83-4F3C3683FBEC"],"group_id":"","hdr_settings":null,"id":"D31C287B-9E51-475a-8843-37BFC7C07CF9","intensifies_audio":false,"is_placeholder":false,"is_tone_modify":false,"keyframe_refs":[],"last_nonzero_volume":1,"material_id":"92C492B0-944F-48e5-8C99-40FAB82B9648","render_index":14006,"responsive_layout":{"enable":false,"horizontal_pos_layout":0,"size_layout":0,"target_follow":"","vertical_pos_layout":0},"reverse":false,"source_timerange":null,"speed":1,"target_timerange":{"duration":3000000,"start":0},"template_id":"","template_scene":"default","track_attribute":0,"track_render_index":0,"uniform_scale":{"on":true,"value":1},"visible":true,"volume":1}],"type":"text"},"text_value":"小说内容\n请勿模仿"}],"key_frame":{"key_frame":"KFTypePositionY","isFixedSpeed":true,"key_frame_time":4,"up_down_key_frame":{"default_scale":133,"start_position":275,"end_position":275},"left_right_key_frame":{"default_scale":133,"start_position":275,"end_position":275},"scale_key_frame":{"default_scale":100,"start_position":210,"end_position":133}},"write_setting":{"split_char":"。,“”‘’!?【】「」《》()…—;,''\"\"!?[]<>()-:;╰*°▽°*╯′,ノ﹏<o‵゚Д゚,ノ,へ ̄工╬▔皿","merge_count":5,"merge_char":",","end_char":"。"}} \ No newline at end of file diff --git a/resources/tmp/config/global_setting.json b/resources/tmp/config/global_setting.json index 4e08ac9..192a9a2 100644 --- a/resources/tmp/config/global_setting.json +++ b/resources/tmp/config/global_setting.json @@ -2,7 +2,7 @@ "draft_path": "你的剪映草稿地址", "project_path": "你的项目文件地址(存放图片视频等数据的文件夹)", "project_name": "你的项目名字", - "gpt_business": "b8866543-8c27-4888-869c-00aa1eb31272", + "gpt_business": "b44c6f24-59e4-4a71-b2c7-3df0c4e35e65", "gpt_model": "gpt-3.5-turbo", "task_number": 1, "translation_business": "https://fanyi-api.baidu.com/api/trans/vip/translate", diff --git a/resources/tmp/config/video_config.json b/resources/tmp/config/video_config.json index f821446..8955ac3 100644 --- a/resources/tmp/config/video_config.json +++ b/resources/tmp/config/video_config.json @@ -1,1188 +1 @@ -{ - "offsetValue": 300, - "frameRate": 60, - "bitRate": 5000, - "assConfig": [{ - "fontName": "方正字迹-龙吟体 简", - "fontSize": 80, - "fontColor": "#F9E00C", - "transparent": 100, - "positionX": 720, - "positionY": 980, - "id": "7cf21712-9a48-4f93-afa3-4c9585b60e05" - }, { - "fontName": "文悦新青年体 (非商用) W8", - "fontSize": 75, - "fontColor": "#F9E00C", - "transparent": 100, - "positionX": 720, - "positionY": 980, - "id": "b464e56b-bab4-4771-bcfa-0978569b3730" - }, { - "fontName": "文悦新青年体 (非商用) W8", - "fontSize": 75, - "fontColor": "#FFFFFF", - "transparent": 100, - "positionX": 720, - "positionY": 980, - "id": "e9995be7-1d26-466c-80a2-30a5ca0fb324" - }, { - "fontName": "方正字迹-龙吟体 简", - "fontSize": 75, - "fontColor": "#FFFFFF", - "transparent": 100, - "positionX": 720, - "positionY": 980, - "id": "272d1d18-09fd-456c-94fd-c40a17eef671" - }, { - "fontName": "方正字迹-龙吟体 简", - "fontSize": 75, - "fontColor": "#F9E00C", - "transparent": 100, - "positionX": 720, - "positionY": 980, - "id": "9db756b3-01b3-446f-bd73-995138a24d28" - }], - "watermarkConfig": [{ - "showText": "虚拟内容 请勿模仿", - "fontName": "方正字迹-龙吟体 简", - "fontSize": 30, - "fontColor": "#FFFFFF", - "transparent": 80, - "positionX": 1250, - "positionY": 20, - "id": "51415f2f-0632-4001-95a5-b61ef9bd6d79" - }, { - "showText": "内容纯属虚构 请勿模仿", - "fontName": "文悦新青年体 (非商用) W8", - "fontSize": 30, - "fontColor": "#FFFFFF", - "transparent": 80, - "positionX": 1250, - "positionY": 20, - "id": "b88d00ad-bea5-4a91-852e-898229f622bf" - }, { - "showText": "小说内容 请勿模仿", - "fontName": "文悦新青年体 (非商用) W8", - "fontSize": 30, - "fontColor": "#FFFFFF", - "transparent": 80, - "positionX": 1250, - "positionY": 20, - "id": "26c20a2b-f338-48c9-b5f2-82f0e9370027" - }], - "font_name_list": [{ - "label": "Lucida Sans Unicode", - "value": "Lucida Sans Unicode" - }, { - "label": "Mistral", - "value": "Mistral" - }, { - "label": "Microsoft JhengHei Bold & Microsoft JhengHei UI Bold", - "value": "Microsoft JhengHei Bold & Microsoft JhengHei UI Bold" - }, { - "label": "文悦新青年体 (非商用) W8", - "value": "文悦新青年体 (非商用) W8" - }, { - "label": "French Script MT", - "value": "French Script MT" - }, { - "label": "Franklin Gothic Demi Cond", - "value": "Franklin Gothic Demi Cond" - }, { - "label": "Palatino Linotype", - "value": "Palatino Linotype" - }, { - "label": "Garamond", - "value": "Garamond" - }, { - "label": "Tw Cen MT Bold Italic", - "value": "Tw Cen MT Bold Italic" - }, { - "label": "Dubai Medium", - "value": "Dubai Medium" - }, { - "label": "Courier New Italic", - "value": "Courier New Italic" - }, { - "label": "Ravie", - "value": "Ravie" - }, { - "label": "Gill Sans Ultra Bold Condensed", - "value": "Gill Sans Ultra Bold Condensed" - }, { - "label": "Onyx", - "value": "Onyx" - }, { - "label": "Microsoft New Tai Lue Bold", - "value": "Microsoft New Tai Lue Bold" - }, { - "label": "Imprint MT Shadow", - "value": "Imprint MT Shadow" - }, { - "label": "Ebrima", - "value": "Ebrima" - }, { - "label": "Garamond Italic", - "value": "Garamond Italic" - }, { - "label": "Microsoft Himalaya", - "value": "Microsoft Himalaya" - }, { - "label": "Constantia Italic", - "value": "Constantia Italic" - }, { - "label": "Symbol", - "value": "Symbol" - }, { - "label": "Tempus Sans ITC", - "value": "Tempus Sans ITC" - }, { - "label": "Segoe UI Black Italic", - "value": "Segoe UI Black Italic" - }, { - "label": "Verdana Italic", - "value": "Verdana Italic" - }, { - "label": "Cambria Bold Italic", - "value": "Cambria Bold Italic" - }, { - "label": "Palatino Linotype Bold", - "value": "Palatino Linotype Bold" - }, { - "label": "Franklin Gothic Medium Cond", - "value": "Franklin Gothic Medium Cond" - }, { - "label": "Lucida Bright Demibold Italic", - "value": "Lucida Bright Demibold Italic" - }, { - "label": "幼圆", - "value": "幼圆" - }, { - "label": "Nirmala UI Bold", - "value": "Nirmala UI Bold" - }, { - "label": "Agency FB Bold", - "value": "Agency FB Bold" - }, { - "label": "FangSong", - "value": "FangSong" - }, { - "label": "Segoe UI Bold Italic", - "value": "Segoe UI Bold Italic" - }, { - "label": "Webdings", - "value": "Webdings" - }, { - "label": "Times New Roman Italic", - "value": "Times New Roman Italic" - }, { - "label": "Bodoni MT", - "value": "Bodoni MT" - }, { - "label": "Bernard MT Condensed", - "value": "Bernard MT Condensed" - }, { - "label": "Kunstler Script", - "value": "Kunstler Script" - }, { - "label": "Calisto MT Bold Italic", - "value": "Calisto MT Bold Italic" - }, { - "label": "Lucida Handwriting Italic", - "value": "Lucida Handwriting Italic" - }, { - "label": "Book Antiqua Bold Italic", - "value": "Book Antiqua Bold Italic" - }, { - "label": "Microsoft Sans Serif", - "value": "Microsoft Sans Serif" - }, { - "label": "MS Reference Sans Serif", - "value": "MS Reference Sans Serif" - }, { - "label": "Segoe UI Variable", - "value": "Segoe UI Variable" - }, { - "label": "Engravers MT", - "value": "Engravers MT" - }, { - "label": "Corbel", - "value": "Corbel" - }, { - "label": "Gadugi", - "value": "Gadugi" - }, { - "label": "Segoe UI Light", - "value": "Segoe UI Light" - }, { - "label": "Consolas Bold", - "value": "Consolas Bold" - }, { - "label": "Gill Sans MT Condensed", - "value": "Gill Sans MT Condensed" - }, { - "label": "Book Antiqua Bold", - "value": "Book Antiqua Bold" - }, { - "label": "Wingdings", - "value": "Wingdings" - }, { - "label": "Small Fonts", - "value": "Small Fonts" - }, { - "label": "Curlz MT", - "value": "Curlz MT" - }, { - "label": "Franklin Gothic Medium", - "value": "Franklin Gothic Medium" - }, { - "label": "华文隶书", - "value": "华文隶书" - }, { - "label": "Niagara Engraved", - "value": "Niagara Engraved" - }, { - "label": "Arial Rounded MT Bold", - "value": "Arial Rounded MT Bold" - }, { - "label": "Gill Sans MT", - "value": "Gill Sans MT" - }, { - "label": "Yu Gothic Regular & Yu Gothic UI Semilight", - "value": "Yu Gothic Regular & Yu Gothic UI Semilight" - }, { - "label": "Nirmala UI", - "value": "Nirmala UI" - }, { - "label": "Corbel Bold", - "value": "Corbel Bold" - }, { - "label": "Gabriola", - "value": "Gabriola" - }, { - "label": "Franklin Gothic Demi Italic", - "value": "Franklin Gothic Demi Italic" - }, { - "label": "Magneto Bold", - "value": "Magneto Bold" - }, { - "label": "Arial Bold Italic", - "value": "Arial Bold Italic" - }, { - "label": "Copperplate Gothic Bold", - "value": "Copperplate Gothic Bold" - }, { - "label": "Segoe UI Emoji", - "value": "Segoe UI Emoji" - }, { - "label": "Segoe UI Symbol", - "value": "Segoe UI Symbol" - }, { - "label": "Franklin Gothic Medium Italic", - "value": "Franklin Gothic Medium Italic" - }, { - "label": "Tw Cen MT", - "value": "Tw Cen MT" - }, { - "label": "隶书", - "value": "隶书" - }, { - "label": "Consolas", - "value": "Consolas" - }, { - "label": "Script", - "value": "Script" - }, { - "label": "Calibri Light Italic", - "value": "Calibri Light Italic" - }, { - "label": "Maiandra GD", - "value": "Maiandra GD" - }, { - "label": "Perpetua Bold", - "value": "Perpetua Bold" - }, { - "label": "Consolas Italic", - "value": "Consolas Italic" - }, { - "label": "Yu Gothic Medium & Yu Gothic UI Regular", - "value": "Yu Gothic Medium & Yu Gothic UI Regular" - }, { - "label": "Microsoft JhengHei Light & Microsoft JhengHei UI Light", - "value": "Microsoft JhengHei Light & Microsoft JhengHei UI Light" - }, { - "label": "Rage Italic", - "value": "Rage Italic" - }, { - "label": "Script MT Bold", - "value": "Script MT Bold" - }, { - "label": "Palace Script MT", - "value": "Palace Script MT" - }, { - "label": "Leelawadee UI Bold", - "value": "Leelawadee UI Bold" - }, { - "label": "华文宋体", - "value": "华文宋体" - }, { - "label": "Myanmar Text", - "value": "Myanmar Text" - }, { - "label": "Century Schoolbook Italic", - "value": "Century Schoolbook Italic" - }, { - "label": "Goudy Old Style Bold", - "value": "Goudy Old Style Bold" - }, { - "label": "Dubai Bold", - "value": "Dubai Bold" - }, { - "label": "Times New Roman Bold Italic", - "value": "Times New Roman Bold Italic" - }, { - "label": "Century Gothic", - "value": "Century Gothic" - }, { - "label": "Lucida Sans Demibold Roman", - "value": "Lucida Sans Demibold Roman" - }, { - "label": "Lucida Fax Demibold Italic", - "value": "Lucida Fax Demibold Italic" - }, { - "label": "Parchment", - "value": "Parchment" - }, { - "label": "Calibri Light", - "value": "Calibri Light" - }, { - "label": "Constantia Bold", - "value": "Constantia Bold" - }, { - "label": "Lucida Calligraphy Italic", - "value": "Lucida Calligraphy Italic" - }, { - "label": "Calisto MT", - "value": "Calisto MT" - }, { - "label": "Malgun Gothic Bold", - "value": "Malgun Gothic Bold" - }, { - "label": "Bauhaus 93", - "value": "Bauhaus 93" - }, { - "label": "Roman", - "value": "Roman" - }, { - "label": "Berlin Sans FB", - "value": "Berlin Sans FB" - }, { - "label": "Javanese Text", - "value": "Javanese Text" - }, { - "label": "Forte", - "value": "Forte" - }, { - "label": "Agency FB", - "value": "Agency FB" - }, { - "label": "Harlow Solid Italic", - "value": "Harlow Solid Italic" - }, { - "label": "Sylfaen", - "value": "Sylfaen" - }, { - "label": "OCR A Extended", - "value": "OCR A Extended" - }, { - "label": "Courier New Bold", - "value": "Courier New Bold" - }, { - "label": "Bookman Old Style Bold", - "value": "Bookman Old Style Bold" - }, { - "label": "Goudy Old Style Italic", - "value": "Goudy Old Style Italic" - }, { - "label": "Comic Sans MS Bold Italic", - "value": "Comic Sans MS Bold Italic" - }, { - "label": "Trebuchet MS Bold", - "value": "Trebuchet MS Bold" - }, { - "label": "Bell MT", - "value": "Bell MT" - }, { - "label": "Vladimir Script", - "value": "Vladimir Script" - }, { - "label": "Lucida Sans Demibold Italic", - "value": "Lucida Sans Demibold Italic" - }, { - "label": "方正字迹-龙吟体 简", - "value": "方正字迹-龙吟体 简" - }, { - "label": "华文楷体", - "value": "华文楷体" - }, { - "label": "Viner Hand ITC", - "value": "Viner Hand ITC" - }, { - "label": "Corbel Light", - "value": "Corbel Light" - }, { - "label": "Chiller", - "value": "Chiller" - }, { - "label": "Segoe Script Bold", - "value": "Segoe Script Bold" - }, { - "label": "Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold", - "value": "Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold" - }, { - "label": "Trebuchet MS Bold Italic", - "value": "Trebuchet MS Bold Italic" - }, { - "label": "Palatino Linotype Italic", - "value": "Palatino Linotype Italic" - }, { - "label": "Lucida Sans Typewriter Bold", - "value": "Lucida Sans Typewriter Bold" - }, { - "label": "Lucida Bright", - "value": "Lucida Bright" - }, { - "label": "Britannic Bold", - "value": "Britannic Bold" - }, { - "label": "Papyrus", - "value": "Papyrus" - }, { - "label": "ROG FONTS", - "value": "ROG FONTS" - }, { - "label": "Gadugi Bold", - "value": "Gadugi Bold" - }, { - "label": "Century Schoolbook Bold", - "value": "Century Schoolbook Bold" - }, { - "label": "Lucida Sans Regular", - "value": "Lucida Sans Regular" - }, { - "label": "Informal Roman", - "value": "Informal Roman" - }, { - "label": "Elephant Italic", - "value": "Elephant Italic" - }, { - "label": "SimSun & NSimSun", - "value": "SimSun & NSimSun" - }, { - "label": "Lucida Sans Typewriter Regular", - "value": "Lucida Sans Typewriter Regular" - }, { - "label": "Trebuchet MS", - "value": "Trebuchet MS" - }, { - "label": "Harrington", - "value": "Harrington" - }, { - "label": "Edwardian Script ITC", - "value": "Edwardian Script ITC" - }, { - "label": "Arial Narrow Italic", - "value": "Arial Narrow Italic" - }, { - "label": "Algerian", - "value": "Algerian" - }, { - "label": "Bodoni MT Italic", - "value": "Bodoni MT Italic" - }, { - "label": "Gigi", - "value": "Gigi" - }, { - "label": "Wingdings 3", - "value": "Wingdings 3" - }, { - "label": "Calibri Bold", - "value": "Calibri Bold" - }, { - "label": "Bodoni MT Condensed Bold Italic", - "value": "Bodoni MT Condensed Bold Italic" - }, { - "label": "Felix Titling", - "value": "Felix Titling" - }, { - "label": "Arial Narrow Bold Italic", - "value": "Arial Narrow Bold Italic" - }, { - "label": "Bodoni MT Bold", - "value": "Bodoni MT Bold" - }, { - "label": "Courier 10,12,15", - "value": "Courier 10,12,15" - }, { - "label": "Bodoni MT Black Italic", - "value": "Bodoni MT Black Italic" - }, { - "label": "Consolas Bold Italic", - "value": "Consolas Bold Italic" - }, { - "label": "Modern No. 20", - "value": "Modern No. 20" - }, { - "label": "Bookman Old Style Bold Italic", - "value": "Bookman Old Style Bold Italic" - }, { - "label": "华文新魏", - "value": "华文新魏" - }, { - "label": "Comic Sans MS", - "value": "Comic Sans MS" - }, { - "label": "Lucida Sans Italic", - "value": "Lucida Sans Italic" - }, { - "label": "Comic Sans MS Italic", - "value": "Comic Sans MS Italic" - }, { - "label": "Baskerville Old Face", - "value": "Baskerville Old Face" - }, { - "label": "MV Boli", - "value": "MV Boli" - }, { - "label": "Century Schoolbook", - "value": "Century Schoolbook" - }, { - "label": "Candara Light Italic", - "value": "Candara Light Italic" - }, { - "label": "SimHei", - "value": "SimHei" - }, { - "label": "Calibri Italic", - "value": "Calibri Italic" - }, { - "label": "Eras Light ITC", - "value": "Eras Light ITC" - }, { - "label": "Verdana Bold Italic", - "value": "Verdana Bold Italic" - }, { - "label": "Segoe Print Bold", - "value": "Segoe Print Bold" - }, { - "label": "Microsoft PhagsPa", - "value": "Microsoft PhagsPa" - }, { - "label": "Lucida Bright Italic", - "value": "Lucida Bright Italic" - }, { - "label": "Showcard Gothic", - "value": "Showcard Gothic" - }, { - "label": "Georgia Bold Italic", - "value": "Georgia Bold Italic" - }, { - "label": "Tahoma", - "value": "Tahoma" - }, { - "label": "华文细黑", - "value": "华文细黑" - }, { - "label": "Snap ITC", - "value": "Snap ITC" - }, { - "label": "Pristina", - "value": "Pristina" - }, { - "label": "Segoe UI Semibold Italic", - "value": "Segoe UI Semibold Italic" - }, { - "label": "Century Gothic Bold Italic", - "value": "Century Gothic Bold Italic" - }, { - "label": "Centaur", - "value": "Centaur" - }, { - "label": "Segoe UI Historic", - "value": "Segoe UI Historic" - }, { - "label": "Cambria & Cambria Math", - "value": "Cambria & Cambria Math" - }, { - "label": "Courier New", - "value": "Courier New" - }, { - "label": "Microsoft Tai Le Bold", - "value": "Microsoft Tai Le Bold" - }, { - "label": "Cambria Italic", - "value": "Cambria Italic" - }, { - "label": "Microsoft YaHei Light & Microsoft YaHei UI Light", - "value": "Microsoft YaHei Light & Microsoft YaHei UI Light" - }, { - "label": "Kristen ITC", - "value": "Kristen ITC" - }, { - "label": "Tw Cen MT Bold", - "value": "Tw Cen MT Bold" - }, { - "label": "Book Antiqua Italic", - "value": "Book Antiqua Italic" - }, { - "label": "Arial Narrow Bold", - "value": "Arial Narrow Bold" - }, { - "label": "Leelawadee UI", - "value": "Leelawadee UI" - }, { - "label": "MS Reference Specialty", - "value": "MS Reference Specialty" - }, { - "label": "Segoe UI Bold", - "value": "Segoe UI Bold" - }, { - "label": "Bookman Old Style", - "value": "Bookman Old Style" - }, { - "label": "Segoe Fluent Icons", - "value": "Segoe Fluent Icons" - }, { - "label": "Segoe Print", - "value": "Segoe Print" - }, { - "label": "Lucida Sans Typewriter Bold Oblique", - "value": "Lucida Sans Typewriter Bold Oblique" - }, { - "label": "Franklin Gothic Book", - "value": "Franklin Gothic Book" - }, { - "label": "Rockwell Bold", - "value": "Rockwell Bold" - }, { - "label": "Franklin Gothic Demi", - "value": "Franklin Gothic Demi" - }, { - "label": "Times New Roman Bold", - "value": "Times New Roman Bold" - }, { - "label": "Goudy Old Style", - "value": "Goudy Old Style" - }, { - "label": "造字工房力黑(非商用)常规体 Regular", - "value": "造字工房力黑(非商用)常规体 Regular" - }, { - "label": "Yu Gothic Light & Yu Gothic UI Light", - "value": "Yu Gothic Light & Yu Gothic UI Light" - }, { - "label": "Cooper Black", - "value": "Cooper Black" - }, { - "label": "Constantia", - "value": "Constantia" - }, { - "label": "Calisto MT Bold", - "value": "Calisto MT Bold" - }, { - "label": "Segoe UI Italic", - "value": "Segoe UI Italic" - }, { - "label": "华文仿宋", - "value": "华文仿宋" - }, { - "label": "SimSun-ExtB", - "value": "SimSun-ExtB" - }, { - "label": "Leelawadee UI Semilight", - "value": "Leelawadee UI Semilight" - }, { - "label": "Bodoni MT Condensed", - "value": "Bodoni MT Condensed" - }, { - "label": "Tahoma Bold", - "value": "Tahoma Bold" - }, { - "label": "Berlin Sans FB Demi Bold", - "value": "Berlin Sans FB Demi Bold" - }, { - "label": "Bodoni MT Bold Italic", - "value": "Bodoni MT Bold Italic" - }, { - "label": "Perpetua Titling MT Light", - "value": "Perpetua Titling MT Light" - }, { - "label": "方正姚体", - "value": "方正姚体" - }, { - "label": "High Tower Text", - "value": "High Tower Text" - }, { - "label": "Lucida Fax Italic", - "value": "Lucida Fax Italic" - }, { - "label": "Ink Free", - "value": "Ink Free" - }, { - "label": "Californian FB Italic", - "value": "Californian FB Italic" - }, { - "label": "华文中宋", - "value": "华文中宋" - }, { - "label": "Segoe UI Black", - "value": "Segoe UI Black" - }, { - "label": "Rockwell Extra Bold", - "value": "Rockwell Extra Bold" - }, { - "label": "Garamond Bold", - "value": "Garamond Bold" - }, { - "label": "Niagara Solid", - "value": "Niagara Solid" - }, { - "label": "Gill Sans MT Bold Italic", - "value": "Gill Sans MT Bold Italic" - }, { - "label": "Arial Black", - "value": "Arial Black" - }, { - "label": "Microsoft Yi Baiti", - "value": "Microsoft Yi Baiti" - }, { - "label": "Corbel Bold Italic", - "value": "Corbel Bold Italic" - }, { - "label": "Bodoni MT Black", - "value": "Bodoni MT Black" - }, { - "label": "Mongolian Baiti", - "value": "Mongolian Baiti" - }, { - "label": "Vivaldi Italic", - "value": "Vivaldi Italic" - }, { - "label": "Comic Sans MS Bold", - "value": "Comic Sans MS Bold" - }, { - "label": "Arial Bold", - "value": "Arial Bold" - }, { - "label": "Microsoft JhengHei & Microsoft JhengHei UI", - "value": "Microsoft JhengHei & Microsoft JhengHei UI" - }, { - "label": "Myanmar Text Bold", - "value": "Myanmar Text Bold" - }, { - "label": "Candara Light", - "value": "Candara Light" - }, { - "label": "Californian FB", - "value": "Californian FB" - }, { - "label": "Microsoft Tai Le", - "value": "Microsoft Tai Le" - }, { - "label": "Lucida Bright Demibold", - "value": "Lucida Bright Demibold" - }, { - "label": "Palatino Linotype Bold Italic", - "value": "Palatino Linotype Bold Italic" - }, { - "label": "Calibri Bold Italic", - "value": "Calibri Bold Italic" - }, { - "label": "Old English Text MT", - "value": "Old English Text MT" - }, { - "label": "Rockwell Condensed", - "value": "Rockwell Condensed" - }, { - "label": "Candara Italic", - "value": "Candara Italic" - }, { - "label": "MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB", - "value": "MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB" - }, { - "label": "Bradley Hand ITC", - "value": "Bradley Hand ITC" - }, { - "label": "Bell MT Italic", - "value": "Bell MT Italic" - }, { - "label": "Tw Cen MT Italic", - "value": "Tw Cen MT Italic" - }, { - "label": "Malgun Gothic SemiLight", - "value": "Malgun Gothic SemiLight" - }, { - "label": "Lucida Console", - "value": "Lucida Console" - }, { - "label": "MS Serif 8,10,12,14,18,24", - "value": "MS Serif 8,10,12,14,18,24" - }, { - "label": "Gill Sans Ultra Bold", - "value": "Gill Sans Ultra Bold" - }, { - "label": "Noto Sans Regular", - "value": "Noto Sans Regular" - }, { - "label": "Ebrima Bold", - "value": "Ebrima Bold" - }, { - "label": "Microsoft YaHei & Microsoft YaHei UI", - "value": "Microsoft YaHei & Microsoft YaHei UI" - }, { - "label": "Gill Sans MT Bold", - "value": "Gill Sans MT Bold" - }, { - "label": "Candara Bold Italic", - "value": "Candara Bold Italic" - }, { - "label": "Bell MT Bold", - "value": "Bell MT Bold" - }, { - "label": "Copperplate Gothic Light", - "value": "Copperplate Gothic Light" - }, { - "label": "Gill Sans MT Italic", - "value": "Gill Sans MT Italic" - }, { - "label": "Tw Cen MT Condensed Bold", - "value": "Tw Cen MT Condensed Bold" - }, { - "label": "Perpetua Bold Italic", - "value": "Perpetua Bold Italic" - }, { - "label": "Sitka Text", - "value": "Sitka Text" - }, { - "label": "Eras Bold ITC", - "value": "Eras Bold ITC" - }, { - "label": "Bahnschrift", - "value": "Bahnschrift" - }, { - "label": "Microsoft New Tai Lue", - "value": "Microsoft New Tai Lue" - }, { - "label": "Jokerman", - "value": "Jokerman" - }, { - "label": "Arial Italic", - "value": "Arial Italic" - }, { - "label": "Bodoni MT Poster Compressed", - "value": "Bodoni MT Poster Compressed" - }, { - "label": "MS Outlook", - "value": "MS Outlook" - }, { - "label": "Eras Demi ITC", - "value": "Eras Demi ITC" - }, { - "label": "Rockwell Condensed Bold", - "value": "Rockwell Condensed Bold" - }, { - "label": "Castellar", - "value": "Castellar" - }, { - "label": "Juice ITC", - "value": "Juice ITC" - }, { - "label": "Franklin Gothic Heavy Italic", - "value": "Franklin Gothic Heavy Italic" - }, { - "label": "Perpetua Titling MT Bold", - "value": "Perpetua Titling MT Bold" - }, { - "label": "Calisto MT Italic", - "value": "Calisto MT Italic" - }, { - "label": "Verdana", - "value": "Verdana" - }, { - "label": "DengXian", - "value": "DengXian" - }, { - "label": "Dubai Regular", - "value": "Dubai Regular" - }, { - "label": "Corbel Light Italic", - "value": "Corbel Light Italic" - }, { - "label": "Berlin Sans FB Bold", - "value": "Berlin Sans FB Bold" - }, { - "label": "Dubai Light", - "value": "Dubai Light" - }, { - "label": "Nirmala UI Semilight", - "value": "Nirmala UI Semilight" - }, { - "label": "Broadway", - "value": "Broadway" - }, { - "label": "Gill Sans MT Ext Condensed Bold", - "value": "Gill Sans MT Ext Condensed Bold" - }, { - "label": "Matura MT Script Capitals", - "value": "Matura MT Script Capitals" - }, { - "label": "Times New Roman", - "value": "Times New Roman" - }, { - "label": "Segoe UI Semilight Italic", - "value": "Segoe UI Semilight Italic" - }, { - "label": "Bookshelf Symbol 7", - "value": "Bookshelf Symbol 7" - }, { - "label": "Lucida Sans Typewriter Oblique", - "value": "Lucida Sans Typewriter Oblique" - }, { - "label": "MT Extra", - "value": "MT Extra" - }, { - "label": "Tw Cen MT Condensed Extra Bold", - "value": "Tw Cen MT Condensed Extra Bold" - }, { - "label": "Sitka Text Italic", - "value": "Sitka Text Italic" - }, { - "label": "DengXian Bold", - "value": "DengXian Bold" - }, { - "label": "Corbel Italic", - "value": "Corbel Italic" - }, { - "label": "Segoe UI", - "value": "Segoe UI" - }, { - "label": "Segoe MDL2 Assets", - "value": "Segoe MDL2 Assets" - }, { - "label": "Rockwell Italic", - "value": "Rockwell Italic" - }, { - "label": "Californian FB Bold", - "value": "Californian FB Bold" - }, { - "label": "Colonna MT", - "value": "Colonna MT" - }, { - "label": "Goudy Stout", - "value": "Goudy Stout" - }, { - "label": "MS Gothic & MS UI Gothic & MS PGothic", - "value": "MS Gothic & MS UI Gothic & MS PGothic" - }, { - "label": "Wide Latin", - "value": "Wide Latin" - }, { - "label": "Segoe Script", - "value": "Segoe Script" - }, { - "label": "Gloucester MT Extra Condensed", - "value": "Gloucester MT Extra Condensed" - }, { - "label": "Eras Medium ITC", - "value": "Eras Medium ITC" - }, { - "label": "文悦后现代体 (须授权) W4-75", - "value": "文悦后现代体 (须授权) W4-75" - }, { - "label": "Candara", - "value": "Candara" - }, { - "label": "Book Antiqua", - "value": "Book Antiqua" - }, { - "label": "Wingdings 2", - "value": "Wingdings 2" - }, { - "label": "Perpetua Italic", - "value": "Perpetua Italic" - }, { - "label": "Microsoft PhagsPa Bold", - "value": "Microsoft PhagsPa Bold" - }, { - "label": "Century Gothic Bold", - "value": "Century Gothic Bold" - }, { - "label": "Monotype Corsiva", - "value": "Monotype Corsiva" - }, { - "label": "方正舒体", - "value": "方正舒体" - }, { - "label": "Rockwell", - "value": "Rockwell" - }, { - "label": "Playbill", - "value": "Playbill" - }, { - "label": "Georgia Italic", - "value": "Georgia Italic" - }, { - "label": "Lucida Fax Regular", - "value": "Lucida Fax Regular" - }, { - "label": "Century Schoolbook Bold Italic", - "value": "Century Schoolbook Bold Italic" - }, { - "label": "MS Sans Serif 8,10,12,14,18,24", - "value": "MS Sans Serif 8,10,12,14,18,24" - }, { - "label": "Constantia Bold Italic", - "value": "Constantia Bold Italic" - }, { - "label": "Georgia Bold", - "value": "Georgia Bold" - }, { - "label": "Franklin Gothic Book Italic", - "value": "Franklin Gothic Book Italic" - }, { - "label": "Haettenschweiler", - "value": "Haettenschweiler" - }, { - "label": "Trebuchet MS Italic", - "value": "Trebuchet MS Italic" - }, { - "label": "Century Gothic Italic", - "value": "Century Gothic Italic" - }, { - "label": "华文彩云", - "value": "华文彩云" - }, { - "label": "Century", - "value": "Century" - }, { - "label": "Calibri", - "value": "Calibri" - }, { - "label": "Elephant", - "value": "Elephant" - }, { - "label": "Footlight MT Light", - "value": "Footlight MT Light" - }, { - "label": "Bodoni MT Condensed Italic", - "value": "Bodoni MT Condensed Italic" - }, { - "label": "Microsoft YaHei Bold & Microsoft YaHei UI Bold", - "value": "Microsoft YaHei Bold & Microsoft YaHei UI Bold" - }, { - "label": "Lucida Fax Demibold", - "value": "Lucida Fax Demibold" - }, { - "label": "Modern", - "value": "Modern" - }, { - "label": "Arial", - "value": "Arial" - }, { - "label": "Courier New Bold Italic", - "value": "Courier New Bold Italic" - }, { - "label": "华文琥珀", - "value": "华文琥珀" - }, { - "label": "Verdana Bold", - "value": "Verdana Bold" - }, { - "label": "High Tower Text Italic", - "value": "High Tower Text Italic" - }, { - "label": "江西拙楷 Regular", - "value": "江西拙楷 Regular" - }, { - "label": "Poor Richard", - "value": "Poor Richard" - }, { - "label": "Georgia", - "value": "Georgia" - }, { - "label": "DejaVu Math TeX Gyre", - "value": "DejaVu Math TeX Gyre" - }, { - "label": "Perpetua", - "value": "Perpetua" - }, { - "label": "Brush Script MT Italic", - "value": "Brush Script MT Italic" - }, { - "label": "Arial Narrow", - "value": "Arial Narrow" - }, { - "label": "Blackadder ITC", - "value": "Blackadder ITC" - }, { - "label": "Segoe UI Light Italic", - "value": "Segoe UI Light Italic" - }, { - "label": "Rockwell Bold Italic", - "value": "Rockwell Bold Italic" - }, { - "label": "Tw Cen MT Condensed", - "value": "Tw Cen MT Condensed" - }, { - "label": "Candara Bold", - "value": "Candara Bold" - }, { - "label": "Stencil", - "value": "Stencil" - }, { - "label": "Cambria Bold", - "value": "Cambria Bold" - }, { - "label": "Impact", - "value": "Impact" - }, { - "label": "Bodoni MT Condensed Bold", - "value": "Bodoni MT Condensed Bold" - }, { - "label": "Freestyle Script", - "value": "Freestyle Script" - }, { - "label": "Malgun Gothic", - "value": "Malgun Gothic" - }, { - "label": "Sans Serif Collection", - "value": "Sans Serif Collection" - }, { - "label": "Segoe UI Semibold", - "value": "Segoe UI Semibold" - }, { - "label": "DengXian Light", - "value": "DengXian Light" - }, { - "label": "Bookman Old Style Italic", - "value": "Bookman Old Style Italic" - }, { - "label": "KaiTi", - "value": "KaiTi" - }, { - "label": "Franklin Gothic Heavy", - "value": "Franklin Gothic Heavy" - }, { - "label": "Holo MDL2 Assets", - "value": "Holo MDL2 Assets" - }, { - "label": "华文行楷", - "value": "华文行楷" - }, { - "label": "Segoe UI Semilight", - "value": "Segoe UI Semilight" - }], - "audioSoundSize": 5, - "backgroundMusicSoundSize": -3 - } - \ No newline at end of file +{"video_resolution_x":1440,"video_resolution_y":1080,"keyframe":{"up_down":175,"name":"KFTypeRandom","left_right":175},"frameRate":30,"bitRate":3000,"audioSoundSize":5,"backgroundMusicSoundSize":-15,"assConfig":[{"fontName":"造字工房力黑(非商用)常规体","fontSize":75,"fontColor":"#FFDF04","transparent":100,"positionX":720,"positionY":980,"id":"24e70f33-d35e-4abe-ad8f-76f04b79cab1"},{"fontName":"文悦新青年体 (非商用) W8","fontSize":75,"fontColor":"#FFDF04","transparent":100,"positionX":720,"positionY":980,"id":"93d2c0a1-0852-4792-afa2-018b461f6478"},{"fontName":"江西拙楷 常规","fontSize":75,"fontColor":"#FFDF04","transparent":100,"positionX":720,"positionY":980,"id":"03c921af-ae3c-457d-b8df-e06fceea526d"}],"watermarkConfig":[{"showText":"内容纯属虚构 请勿模仿","fontName":"江西拙楷 常规","fontSize":30,"fontColor":"#FFFFFF","transparent":60,"positionX":1250,"positionY":20,"id":"e7cf4e49-3773-43d3-9513-101bf688f5d1"},{"showText":"虚拟内容 请勿模仿","fontName":"文悦新青年体 (非商用) W8","fontSize":30,"fontColor":"#FFFFFF","transparent":60,"positionX":1250,"positionY":20,"id":"b0833501-1ab0-4684-a8b0-5828b7e5449f"},{"showText":"虚拟内容 请勿模仿","fontName":"造字工房力黑(非商用)常规体","fontSize":30,"fontColor":"#FFFFFF","transparent":60,"positionX":1250,"positionY":20,"id":"bbcb84a2-6761-4771-b5dc-a3c05a857cf1"}],"libx264":false,"offsetValue":300,"font_name_list":[{"label":"Nirmala UI","value":"Nirmala UI"},{"label":"DengXian Bold","value":"DengXian Bold"},{"label":"Verdana Bold","value":"Verdana Bold"},{"label":"Corbel Bold Italic","value":"Corbel Bold Italic"},{"label":"Segoe Print","value":"Segoe Print"},{"label":"Segoe UI Emoji","value":"Segoe UI Emoji"},{"label":"Small Fonts","value":"Small Fonts"},{"label":"Consolas Bold Italic","value":"Consolas Bold Italic"},{"label":"Segoe UI Black","value":"Segoe UI Black"},{"label":"Leelawadee UI Bold","value":"Leelawadee UI Bold"},{"label":"Trebuchet MS Italic","value":"Trebuchet MS Italic"},{"label":"DengXian Light","value":"DengXian Light"},{"label":"Segoe UI Historic","value":"Segoe UI Historic"},{"label":"Microsoft Himalaya","value":"Microsoft Himalaya"},{"label":"FangSong","value":"FangSong"},{"label":"Consolas","value":"Consolas"},{"label":"DengXian","value":"DengXian"},{"label":"Arial Black","value":"Arial Black"},{"label":"Microsoft JhengHei Bold & Microsoft JhengHei UI Bold","value":"Microsoft JhengHei Bold & Microsoft JhengHei UI Bold"},{"label":"Javanese Text","value":"Javanese Text"},{"label":"Courier 10,12,15","value":"Courier 10,12,15"},{"label":"Ebrima","value":"Ebrima"},{"label":"MS Gothic & MS UI Gothic & MS PGothic","value":"MS Gothic & MS UI Gothic & MS PGothic"},{"label":"Segoe UI Semibold Italic","value":"Segoe UI Semibold Italic"},{"label":"Arial Bold Italic","value":"Arial Bold Italic"},{"label":"Myanmar Text Bold","value":"Myanmar Text Bold"},{"label":"Palatino Linotype Italic","value":"Palatino Linotype Italic"},{"label":"Calibri Bold Italic","value":"Calibri Bold Italic"},{"label":"Georgia","value":"Georgia"},{"label":"Ink Free","value":"Ink Free"},{"label":"Courier New Bold Italic","value":"Courier New Bold Italic"},{"label":"SimSun-ExtB","value":"SimSun-ExtB"},{"label":"Comic Sans MS","value":"Comic Sans MS"},{"label":"Consolas Bold","value":"Consolas Bold"},{"label":"Times New Roman Italic","value":"Times New Roman Italic"},{"label":"Cambria & Cambria Math","value":"Cambria & Cambria Math"},{"label":"Yu Gothic Medium & Yu Gothic UI Regular","value":"Yu Gothic Medium & Yu Gothic UI Regular"},{"label":"Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold","value":"Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold"},{"label":"Trebuchet MS Bold Italic","value":"Trebuchet MS Bold Italic"},{"label":"Lucida Sans Unicode","value":"Lucida Sans Unicode"},{"label":"Microsoft New Tai Lue","value":"Microsoft New Tai Lue"},{"label":"KaiTi","value":"KaiTi"},{"label":"文悦新青年体 (非商用) W8","value":"文悦新青年体 (非商用) W8"},{"label":"Calibri Light Italic","value":"Calibri Light Italic"},{"label":"Georgia Bold Italic","value":"Georgia Bold Italic"},{"label":"Microsoft New Tai Lue Bold","value":"Microsoft New Tai Lue Bold"},{"label":"SimHei","value":"SimHei"},{"label":"Courier New Bold","value":"Courier New Bold"},{"label":"Microsoft Yi Baiti","value":"Microsoft Yi Baiti"},{"label":"Palatino Linotype Bold Italic","value":"Palatino Linotype Bold Italic"},{"label":"MS Serif 8,10,12,14,18,24","value":"MS Serif 8,10,12,14,18,24"},{"label":"DejaVu Math TeX Gyre","value":"DejaVu Math TeX Gyre"},{"label":"Wingdings","value":"Wingdings"},{"label":"Corbel Light","value":"Corbel Light"},{"label":"Segoe UI Italic","value":"Segoe UI Italic"},{"label":"Roman","value":"Roman"},{"label":"Microsoft Sans Serif","value":"Microsoft Sans Serif"},{"label":"Corbel Bold","value":"Corbel Bold"},{"label":"Microsoft YaHei Light & Microsoft YaHei UI Light","value":"Microsoft YaHei Light & Microsoft YaHei UI Light"},{"label":"Calibri Light","value":"Calibri Light"},{"label":"Ebrima Bold","value":"Ebrima Bold"},{"label":"MS Sans Serif 8,10,12,14,18,24","value":"MS Sans Serif 8,10,12,14,18,24"},{"label":"Constantia Italic","value":"Constantia Italic"},{"label":"Sylfaen","value":"Sylfaen"},{"label":"Calibri Bold","value":"Calibri Bold"},{"label":"Segoe MDL2 Assets","value":"Segoe MDL2 Assets"},{"label":"Trebuchet MS","value":"Trebuchet MS"},{"label":"Verdana Bold Italic","value":"Verdana Bold Italic"},{"label":"Calibri","value":"Calibri"},{"label":"Franklin Gothic Medium Italic","value":"Franklin Gothic Medium Italic"},{"label":"Comic Sans MS Bold Italic","value":"Comic Sans MS Bold Italic"},{"label":"Palatino Linotype","value":"Palatino Linotype"},{"label":"Tahoma","value":"Tahoma"},{"label":"Nirmala UI Bold","value":"Nirmala UI Bold"},{"label":"MV Boli","value":"MV Boli"},{"label":"Trebuchet MS Bold","value":"Trebuchet MS Bold"},{"label":"Leelawadee UI","value":"Leelawadee UI"},{"label":"Microsoft YaHei & Microsoft YaHei UI","value":"Microsoft YaHei & Microsoft YaHei UI"},{"label":"Sitka Text","value":"Sitka Text"},{"label":"Sans Serif Collection","value":"Sans Serif Collection"},{"label":"Arial Bold","value":"Arial Bold"},{"label":"Palatino Linotype Bold","value":"Palatino Linotype Bold"},{"label":"Georgia Bold","value":"Georgia Bold"},{"label":"Lucida Console","value":"Lucida Console"},{"label":"Segoe Script Bold","value":"Segoe Script Bold"},{"label":"Segoe Script","value":"Segoe Script"},{"label":"Corbel","value":"Corbel"},{"label":"Segoe Fluent Icons","value":"Segoe Fluent Icons"},{"label":"Bahnschrift","value":"Bahnschrift"},{"label":"Mongolian Baiti","value":"Mongolian Baiti"},{"label":"Segoe UI Light Italic","value":"Segoe UI Light Italic"},{"label":"Corbel Light Italic","value":"Corbel Light Italic"},{"label":"Cambria Italic","value":"Cambria Italic"},{"label":"SimSun & NSimSun","value":"SimSun & NSimSun"},{"label":"Corbel Italic","value":"Corbel Italic"},{"label":"Times New Roman","value":"Times New Roman"},{"label":"Consolas Italic","value":"Consolas Italic"},{"label":"Comic Sans MS Bold","value":"Comic Sans MS Bold"},{"label":"Modern","value":"Modern"},{"label":"Candara Bold","value":"Candara Bold"},{"label":"Myanmar Text","value":"Myanmar Text"},{"label":"Malgun Gothic SemiLight","value":"Malgun Gothic SemiLight"},{"label":"Candara Light","value":"Candara Light"},{"label":"Candara Bold Italic","value":"Candara Bold Italic"},{"label":"Leelawadee UI Semilight","value":"Leelawadee UI Semilight"},{"label":"Malgun Gothic","value":"Malgun Gothic"},{"label":"Segoe UI","value":"Segoe UI"},{"label":"Calibri Italic","value":"Calibri Italic"},{"label":"Comic Sans MS Italic","value":"Comic Sans MS Italic"},{"label":"Arial","value":"Arial"},{"label":"Cambria Bold Italic","value":"Cambria Bold Italic"},{"label":"Segoe Print Bold","value":"Segoe Print Bold"},{"label":"Courier New Italic","value":"Courier New Italic"},{"label":"Microsoft YaHei Bold & Microsoft YaHei UI Bold","value":"Microsoft YaHei Bold & Microsoft YaHei UI Bold"},{"label":"Franklin Gothic Medium","value":"Franklin Gothic Medium"},{"label":"Segoe UI Bold","value":"Segoe UI Bold"},{"label":"Constantia Bold","value":"Constantia Bold"},{"label":"Webdings","value":"Webdings"},{"label":"Sitka Text Italic","value":"Sitka Text Italic"},{"label":"Cambria Bold","value":"Cambria Bold"},{"label":"Malgun Gothic Bold","value":"Malgun Gothic Bold"},{"label":"Yu Gothic Regular & Yu Gothic UI Semilight","value":"Yu Gothic Regular & Yu Gothic UI Semilight"},{"label":"Georgia Italic","value":"Georgia Italic"},{"label":"Script","value":"Script"},{"label":"Segoe UI Black Italic","value":"Segoe UI Black Italic"},{"label":"Tahoma Bold","value":"Tahoma Bold"},{"label":"Nirmala UI Semilight","value":"Nirmala UI Semilight"},{"label":"Candara","value":"Candara"},{"label":"Symbol","value":"Symbol"},{"label":"Arial Italic","value":"Arial Italic"},{"label":"Segoe UI Symbol","value":"Segoe UI Symbol"},{"label":"Microsoft PhagsPa","value":"Microsoft PhagsPa"},{"label":"Verdana Italic","value":"Verdana Italic"},{"label":"Segoe UI Light","value":"Segoe UI Light"},{"label":"Yu Gothic Light & Yu Gothic UI Light","value":"Yu Gothic Light & Yu Gothic UI Light"},{"label":"Segoe UI Semibold","value":"Segoe UI Semibold"},{"label":"Constantia Bold Italic","value":"Constantia Bold Italic"},{"label":"Times New Roman Bold Italic","value":"Times New Roman Bold Italic"},{"label":"Segoe UI Bold Italic","value":"Segoe UI Bold Italic"},{"label":"Candara Light Italic","value":"Candara Light Italic"},{"label":"Gadugi Bold","value":"Gadugi Bold"},{"label":"Microsoft JhengHei & Microsoft JhengHei UI","value":"Microsoft JhengHei & Microsoft JhengHei UI"},{"label":"Impact","value":"Impact"},{"label":"Gadugi","value":"Gadugi"},{"label":"Microsoft Tai Le","value":"Microsoft Tai Le"},{"label":"Microsoft PhagsPa Bold","value":"Microsoft PhagsPa Bold"},{"label":"Constantia","value":"Constantia"},{"label":"MT Extra","value":"MT Extra"},{"label":"Microsoft JhengHei Light & Microsoft JhengHei UI Light","value":"Microsoft JhengHei Light & Microsoft JhengHei UI Light"},{"label":"江西拙楷 Regular","value":"江西拙楷 Regular"},{"label":"Gabriola","value":"Gabriola"},{"label":"Courier New","value":"Courier New"},{"label":"Verdana","value":"Verdana"},{"label":"Candara Italic","value":"Candara Italic"},{"label":"Segoe UI Variable","value":"Segoe UI Variable"},{"label":"Holo MDL2 Assets","value":"Holo MDL2 Assets"},{"label":"MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB","value":"MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB"},{"label":"Segoe UI Semilight","value":"Segoe UI Semilight"},{"label":"Segoe UI Semilight Italic","value":"Segoe UI Semilight Italic"},{"label":"造字工房力黑(非商用)常规体 Regular","value":"造字工房力黑(非商用)常规体 Regular"},{"label":"Microsoft Tai Le Bold","value":"Microsoft Tai Le Bold"},{"label":"Times New Roman Bold","value":"Times New Roman Bold"}]} \ No newline at end of file diff --git a/src/define/db/service/Book/bookService.ts b/src/define/db/service/Book/bookService.ts index 8a1c665..58be02a 100644 --- a/src/define/db/service/Book/bookService.ts +++ b/src/define/db/service/Book/bookService.ts @@ -1,13 +1,11 @@ import Realm, { UpdateMode } from 'realm' import { BookModel } from '../../model/Book/book.js' import path from 'path' -import { BaseService } from '../baseService.js' import { define } from '../../../define.js' import { BookImageCategory, BookTaskStatus, BookType } from '../../../enum/bookEnum.js' import { successMessage } from '../../../../main/Public/generalTools' import { CheckFolderExistsOrCreate, CopyFileOrFolder } from '../../../Tools/file' const { v4: uuidv4 } = require('uuid') -import { BookTaskService } from './bookTaskService' import { BaseRealmService } from './bookBasic.js' import { isEmpty } from 'lodash' import { FfmpegOptions } from '../../../../main/Service/ffmpegOptions.js' diff --git a/src/define/db/service/Book/bookTaskDetailService.ts b/src/define/db/service/Book/bookTaskDetailService.ts index fe8b5bb..e6cd94f 100644 --- a/src/define/db/service/Book/bookTaskDetailService.ts +++ b/src/define/db/service/Book/bookTaskDetailService.ts @@ -1,14 +1,10 @@ import Realm from 'realm' import path from 'path' -import { BaseService } from '../baseService.js' import { define } from '../../../define.js' import { BookTaskModel } from '../../model/Book/bookTask.js' -import { BookTaskStatus } from '../../../enum/bookEnum.js' import { successMessage } from '../../../../main/Public/generalTools' import { BaseRealmService } from './bookBasic' -import { cloneDeep, endsWith, isEmpty } from 'lodash' -import { book } from '../../../../preload/book.js' -import { DefaultObject } from 'realm/dist/public-types/schema.js' +import { cloneDeep, isEmpty } from 'lodash' import { JoinPath } from '../../../Tools/file' import { BookTaskDetailModel, ReversePrompt } from '../../model/Book/bookTaskDetail.js' const { v4: uuidv4 } = require('uuid') diff --git a/src/define/db/service/SoftWare/loggerService.ts b/src/define/db/service/SoftWare/loggerService.ts index f0ca160..998ec00 100644 --- a/src/define/db/service/SoftWare/loggerService.ts +++ b/src/define/db/service/SoftWare/loggerService.ts @@ -1,9 +1,5 @@ import Realm, { UpdateMode } from 'realm' import path from 'path' -import { BaseService } from '../baseService.js' -import { define } from '../../../define.js' -import { SoftwareModel } from '../../model/SoftWare/software' -import { ComponentSize, SoftwareThemeType } from '../../../enum/softwareEnum.js' import { errorMessage, successMessage } from '../../../../main/Public/generalTools' import { BaseSoftWareService } from './softwareBasic.js' import { isEmpty } from 'lodash' diff --git a/src/define/db/service/serviceBase.ts b/src/define/db/service/serviceBase.ts index 7b7b7e0..fb9a24c 100644 --- a/src/define/db/service/serviceBase.ts +++ b/src/define/db/service/serviceBase.ts @@ -1,13 +1,36 @@ import SoftwareService from './SoftWare/softwareService' +import { BookService } from './Book/bookService' +import { BookTaskService } from './Book/bookTaskService' +import { BookTaskDetailService } from './Book/bookTaskDetailService' +import { BookBackTaskListService } from './Book/bookBackTaskListService' +import { MJSettingService } from './SoftWare/mjSettingService' export class ServiceBase { - softService: SoftwareService + softService: SoftwareService | undefined + bookService: BookService | undefined + bookTaskService: BookTaskService | undefined + bookTaskDetailService: BookTaskDetailService | undefined + bookBackTaskListService: BookBackTaskListService | undefined + mjSettingService: MJSettingService | undefined - constructor() {} + + constructor() { } async InitService() { if (!this.softService) { this.softService = await SoftwareService.getInstance() } + if (!this.bookService) { + this.bookService = await BookService.getInstance() + } + if (!this.bookTaskDetailService) { + this.bookTaskDetailService = await BookTaskDetailService.getInstance() + } + if (!this.bookBackTaskListService) { + this.bookBackTaskListService = await BookBackTaskListService.getInstance() + } + if (this.mjSettingService) { + this.mjSettingService = await MJSettingService.getInstance() + } } } diff --git a/src/define/db/tts/tts.ts b/src/define/db/tts/tts.ts new file mode 100644 index 0000000..6221272 --- /dev/null +++ b/src/define/db/tts/tts.ts @@ -0,0 +1,36 @@ +// @ts-ignore +import Realm from 'realm' +import { TTSSelectModel } from '../../enum/tts' + +export class TTSModel extends Realm.Object { + id: string + no: number + name: string // 一把就是配音的前几个字 + textPath: string // 保存生成文本的地址 + ttsPath: string // 生成的配置文件地址 + srtPath: string | null // 生成的SRT地址 + selectModel: TTSSelectModel // 选择模式 + hasSrt: boolean + srtJsonPath: string | null + createTime: Date + updateTime: Date + + static schema: Realm.ObjectSchema = { + name: 'TTSModel', + properties: { + id: 'string', + no: 'int', + name: 'string', + textPath: 'string', + ttsPath: 'string', + srtPath: 'string?', + selectModel: 'string', + hasSrt: 'bool', + srtJsonPath: 'string?', + createTime: 'date', + updateTime: 'date' + }, + // 主键为_id + primaryKey: 'id' + } +} diff --git a/src/define/db/tts/ttsBase.ts b/src/define/db/tts/ttsBase.ts new file mode 100644 index 0000000..7ba8c60 --- /dev/null +++ b/src/define/db/tts/ttsBase.ts @@ -0,0 +1,60 @@ +import Realm from 'realm' +import { BaseService } from '../service/baseService' +import { define } from '../../define' +import path from 'path' +import { TTSModel } from './tts' + + +let dbPath = path.resolve(define.db_path, 'tts.realm') + +// 版本迁移 +const migration = (oldRealm: Realm, newRealm: Realm) => { + if (oldRealm.schemaVersion < 2) { + const oldObjects = oldRealm.objects('TTSModel') + const newObjects = newRealm.objects('TTSModel') + for (let i = 0; i < oldObjects.length; i++) { + newObjects[i].textPath = null + } + } +} + +export class BaseTTSService extends BaseService { + static instance: BaseTTSService | null = null + protected realm: Realm | null = null + dbpath: string + + protected constructor() { + super() + this.dbpath = dbPath + } + + public static async getInstance() { + if (BaseTTSService.instance === null) { + BaseTTSService.instance = new BaseTTSService() + await BaseTTSService.instance.open() + } + return BaseTTSService.instance + } + + /** + * 创建数据库连接,如果已经存在则直接返回 + * @returns + */ + async open() { + try { + if (this.realm != null) return + // 判断当前全局是不是又当前这个 + const config = { + schema: [ + TTSModel + ], + path: this.dbpath, + schemaVersion: 2, + migration: migration + } + this.realm = await Realm.open(config) + } catch (error) { + throw error + } + } +} diff --git a/src/define/db/tts/ttsService.ts b/src/define/db/tts/ttsService.ts new file mode 100644 index 0000000..97b2204 --- /dev/null +++ b/src/define/db/tts/ttsService.ts @@ -0,0 +1,164 @@ +import Realm from 'realm' +import path from 'path' +import { BaseTTSService } from './ttsBase' +import { define } from '../../define' +import { TTSModel } from './tts' +import { tts } from '../../../model/tts' +import { isEmpty } from 'lodash' +const { v4: uuidv4 } = require('uuid') + +export class TTSService extends BaseTTSService { + static instance: TTSService | null = null + realm: Realm + private constructor() { + super() + } + + /** + * 获取当前实例对象,为空则创建一个新的 + * @returns + */ + public static async getInstance() { + if (TTSService.instance === null) { + TTSService.instance = new TTSService() + await super.getInstance() + } + await TTSService.instance.open() + return TTSService.instance + } + + + /** + * 获取配音历史信息,可以分页和筛选 + * @param condition 查询的条件参数 + * @returns 返回当前的查到的所有数据和没有被分割过的数据的数量 + */ + GetTTSHistory(condition: tts.TTSHistoryQueryParams): tts.TTSModelRes { + try { + let TTSHistory = this.realm.objects('TTSModel') + + if (condition.name) { + TTSHistory = TTSHistory.filtered('name CONTAINS $0', condition.name) + } + if (condition.id) { + TTSHistory = TTSHistory.filtered('id == $0', condition.id) + } + TTSHistory = TTSHistory.sorted('updateTime', true) + + let TTSCount = TTSHistory.length + + if (condition.page && condition.pageSize) { + TTSHistory = TTSHistory.slice( + (condition.page - 1) * condition.pageSize, + condition.page * condition.pageSize + ) as unknown as Realm.Results + } + + // 将数据进行处理 + // 将realm对象数组转换为普通对象数组 + let TTSHistoryRes = Array.from(TTSHistory).map((item) => { + // 这里可以直接操作普通对象 + let bookObj = { + ...item, + ttsPath: item.ttsPath ? path.resolve(define.tts_path, item.ttsPath.replace(/\\/g, '/')) : '', + srtPath: item.srtPath ? path.resolve(define.tts_path, item.srtPath.replace(/\\/g, '/')) : '', + srtJsonPath: item.srtJsonPath ? path.resolve(define.tts_path, item.srtJsonPath.replace(/\\/g, '/')) : '', + textPath: item.textPath ? path.resolve(define.tts_path, item.textPath.replace(/\\/g, '/')) : '' + } as tts.TTSModel + return bookObj + }) as tts.TTSModel[] + return { + ttsList: TTSHistoryRes, + ttsCount: TTSCount // 返回筛选的总数 + } + } catch (error) { + throw error + } + } + + /** + * 通过指定ID获取对应的配音历史信息 + * @param id 配音历史ID + */ + GetTTSHistoryById(id: string): tts.TTSModel { + try { + let res = this.GetTTSHistory({ id: id }); + if (res.ttsList.length < 0) { + throw new Error("没有找到指定ID的配音历史数据,请检查"); + } + // 返回第一个数据 + return res.ttsList[0]; + } catch (error) { + throw error + } + } + + /** + * 新增一条TTS生成历史记录 + * @param data 要新增的数据 + */ + AddTTSHistory(data: tts.TTSModel): tts.TTSModel { + try { + if (isEmpty(data.id)) { + throw new Error('新增TTS历史记录失败,缺少ID') + } + // 获取最大的no + let maxNo = this.realm.objects('TTSModel').max('no') + + data.no = maxNo == undefined ? 1 : Number(maxNo) + 1 + data.createTime = new Date() + data.updateTime = new Date() + + this.transaction(() => { + this.realm.create('TTSModel', data) + }) + return data + } catch (error) { + throw error + } + } + + /** + * 更新TTS历史记录数据,修改之后,返回修改后的数据 + * @param ttsId 要更新的TTS历史记录ID + * @param data 要更新的数据 + */ + UpdetateTTSHistory(ttsId: string, data: tts.TTSModel): tts.TTSModel { + try { + this.transaction(() => { + let tts = this.realm.objectForPrimaryKey('TTSModel', ttsId) + if (tts == null) { + throw new Error('没有找到指定ID的TTS历史记录,请检查') + } + for (let key in data) { + tts[key] = data[key] + } + tts.updateTime = new Date() + }) + + // 获取修改后的数据返回 + let res = this.GetTTSHistoryById(ttsId) + return res + } catch (error) { + throw error + } + } + + /** + * 删除TTS历史记录 + * @param ttsId tts历史记录ID + */ + DeleteTTSHistory(ttsId: string): void { + try { + this.transaction(() => { + let tts = this.realm.objectForPrimaryKey('TTSModel', ttsId) + if (tts == null) { + throw new Error('没有找到指定ID的TTS历史记录,请检查') + } + this.realm.delete(tts) + }) + } catch (error) { + throw error + } + } +} diff --git a/src/define/define.js b/src/define/define.js index b383dad..c84e948 100644 --- a/src/define/define.js +++ b/src/define/define.js @@ -144,7 +144,7 @@ if (!app.isPackaged) { define['remotemj_api'] = 'https://api.laitool.net/' define['serverUrl'] = 'http://lapi.laitool.cn' -define['hkServerUrl'] = 'https://api.laitool.cc/' -define['bakServerUrl'] = 'https://bakapi.laitool.cc/' +define['hkServerUrl'] = 'https://laitool.net/' +define['bakServerUrl'] = 'https://laitool.net/' define['API'] = 'f85d39ed5a40fd09966f13f12b6cf0f0' export { define } diff --git a/src/define/define_string.ts b/src/define/define_string.ts index cf52470..376e3e7 100644 --- a/src/define/define_string.ts +++ b/src/define/define_string.ts @@ -283,7 +283,10 @@ export const DEFINE_STRING = { TTS: { GET_TTS_CONFIG: 'GET_TTS_CONFIG', GENERATE_AUDIO: 'GENERATE_AUDIO', - SAVE_TTS_CONFIG: 'SAVE_TTS_CONFIG' + SAVE_TTS_CONFIG: 'SAVE_TTS_CONFIG', + GENERATE_SRT: "GENERATE_SRT", + GET_TTS_HISTORY_DATA: 'GET_TTS_HISTORY_DATA', + DELETE_TTS_HISTORY: 'DELETE_TTS_HISTORY', }, WRITE: { GET_WRITE_CONFIG: 'GET_WRITE_CONFIG', diff --git a/src/define/enum/tts.ts b/src/define/enum/tts.ts new file mode 100644 index 0000000..3b4dc52 --- /dev/null +++ b/src/define/enum/tts.ts @@ -0,0 +1,5 @@ + +export enum TTSSelectModel { + // edge-tts + edgeTTS = 'edge-tts', +} \ No newline at end of file diff --git a/src/define/gptDefine.js b/src/define/gptDefine.js index 0fad47b..988122f 100644 --- a/src/define/gptDefine.js +++ b/src/define/gptDefine.js @@ -275,6 +275,14 @@ export const gptDefine = { { label: 'gpt-4', value: 'gpt-4' + }, + { + label: 'deepseek-chat', + value: 'deepseek-chat' + }, + { + label: 'deepseek-coder', + value: 'deepseek-coder' } ], diff --git a/src/define/tagDefine.js b/src/define/tagDefine.js index 94be5de..7cc31b8 100644 --- a/src/define/tagDefine.js +++ b/src/define/tagDefine.js @@ -115,10 +115,9 @@ export class TagDefine { let property = value[1] value = JSON.parse(value[0]) let tmp_key = uuidv4() - // 特殊操作。为角色和场景的时候,需要copy图片 if (property == 'character_tags' || property == 'scene_tags' || property == 'style_tags') { - let show_image = value.show_image + let show_image = value.show_image ? value.show_image.split('?t')[0] : null if (show_image && show_image != '') { let file_name = `c_s/${value.key ? value.key : tmp_key}.png` let new_image_path = path.join(define.image_path, file_name) @@ -129,7 +128,6 @@ export class TagDefine { }) } } - // 获取自定义的GPT数据 let tag_setting = JSON.parse(await fspromises.readFile(define.tag_setting, 'utf-8')) let tag = get(tag_setting, property, []) diff --git a/src/main/IPCEvent/systemIpc.js b/src/main/IPCEvent/systemIpc.js index 79f0da8..a0ce1d6 100644 --- a/src/main/IPCEvent/systemIpc.js +++ b/src/main/IPCEvent/systemIpc.js @@ -1,40 +1,39 @@ -import { ipcMain } from "electron"; +import { ipcMain } from 'electron' import { DEFINE_STRING } from '../../define/define_string' -import { CheckFileOrDirExist } from "../../define/Tools/file"; -import { errorMessage, successMessage } from "../Public/generalTools"; +import { CheckFileOrDirExist } from '../../define/Tools/file' +import { errorMessage, successMessage } from '../Public/generalTools' import path from 'path' const { shell } = require('electron') function SystemIpc() { + // 打开指定的文件 + ipcMain.on(DEFINE_STRING.SYSTEM.OPEN_FILE, async (event, value) => { + await shell.openPath(value) + }) - // 打开指定的文件 - ipcMain.on(DEFINE_STRING.SYSTEM.OPEN_FILE, async (event, value) => { - await shell.openPath(value); - }); - - // 试用文件资源打开指定的文件夹 - ipcMain.handle(DEFINE_STRING.OPEN_FOLDER, async (event, value) => { - try { - let openFolder = null - if (value.baseProject) { - openFolder = path.join(global.config.project_path, value.folderPath) - } - else { - openFolder = value.folderPath - } - // 判断文件夹是不是存在 - let isExist = await CheckFileOrDirExist(openFolder) - if (!isExist) { - throw new Error("文件夹不存在,请检查") - } - shell.openPath(openFolder) - return successMessage(null, '打开成功'); - } catch (error) { - return errorMessage("打开文件夹错误,错误信息如下:" + error.message, "SystemIpc_OPEN_FOLDER") - } - - }); + // 试用文件资源打开指定的文件夹 + ipcMain.handle(DEFINE_STRING.OPEN_FOLDER, async (event, value) => { + try { + let openFolder = null + if (value.baseProject) { + openFolder = path.join(global.config.project_path, value.folderPath) + } + if (value.dirFloder) { + openFolder = path.dirname(value.folderPath) + } + if (!openFolder) { + openFolder = value.folderPath + } + // 判断文件夹是不是存在 + let isExist = await CheckFileOrDirExist(openFolder) + if (!isExist) { + throw new Error('文件夹不存在,请检查') + } + shell.openPath(openFolder) + return successMessage(null, '打开成功') + } catch (error) { + return errorMessage('打开文件夹错误,错误信息如下:' + error.message, 'SystemIpc_OPEN_FOLDER') + } + }) } -export { - SystemIpc -} \ No newline at end of file +export { SystemIpc } diff --git a/src/main/IPCEvent/ttsIpc.js b/src/main/IPCEvent/ttsIpc.js index 5bf38f1..9e1fefd 100644 --- a/src/main/IPCEvent/ttsIpc.js +++ b/src/main/IPCEvent/ttsIpc.js @@ -6,11 +6,35 @@ const tts = new TTS() export function TTSIpc() { // 获取当前的TTS配置数据 - ipcMain.handle(DEFINE_STRING.TTS.GET_TTS_CONFIG, async () => tts.GetTTSCOnfig()) + ipcMain.handle(DEFINE_STRING.TTS.GET_TTS_CONFIG, async () => await tts.GetTTSCOnfig()) // 保存TTS配置 - ipcMain.handle(DEFINE_STRING.TTS.SAVE_TTS_CONFIG, async (event, data) => tts.SaveTTSConfig(data)) + ipcMain.handle( + DEFINE_STRING.TTS.SAVE_TTS_CONFIG, + async (event, data) => await tts.SaveTTSConfig(data) + ) // 生成音频 - ipcMain.handle(DEFINE_STRING.TTS.GENERATE_AUDIO, async (event, text) => tts.GenerateAudio(text)) + ipcMain.handle( + DEFINE_STRING.TTS.GENERATE_AUDIO, + async (event, text) => await tts.GenerateAudio(text) + ) + + // 生成SRT字幕文件 + ipcMain.handle( + DEFINE_STRING.TTS.GENERATE_SRT, + async (event, ttsId) => await tts.GenerateSRT(ttsId) + ) + + // 删除配音历史记录 + ipcMain.handle( + DEFINE_STRING.TTS.DELETE_TTS_HISTORY, + async (event, ttsId) => await tts.DeleteTTSHistory(ttsId) + ) + + // 获取配音的历史记录 + ipcMain.handle( + DEFINE_STRING.TTS.GET_TTS_HISTORY_DATA, + async (event, queryCondition) => await tts.GetTTSHistoryData(queryCondition) + ) } diff --git a/src/main/Public/clipDraft.js b/src/main/Public/clipDraft.js index 4b62870..d7b09f0 100644 --- a/src/main/Public/clipDraft.js +++ b/src/main/Public/clipDraft.js @@ -28,7 +28,7 @@ export class ClipDraft { this.one_duration_time = 5000000; this.text_end_time = 0; this.iamge_end_time = 0; - this.dubbing_emd_time = 0; + this.TTS_emd_time = 0; this.draft_duration_time = 0; this.global = global; this.value = value; @@ -484,7 +484,7 @@ export class ClipDraft { /** * 添加配音 */ - async AddDubbingMusic(musicPath) { + async AddTTSMusic(musicPath) { // 添加speeds let speeds = await this.AddSpeeds(); this.draft_json.materials.speeds.push(speeds); @@ -820,7 +820,7 @@ export class ClipDraft { await this.LoadDraftJson(); await this.AddAllImageToTracks(); await this.AddAllTextToTrack(); - await this.AddDubbingMusic(path.normalize(this.value[1].audio_path)); + await this.AddTTSMusic(path.normalize(this.value[1].audio_path)); if (this.value[1].background_music != "" && this.value[1].background_music != undefined && this.value[1].background_music != null) { await this.AddRandomBackfroundMusic(this.value[1].background_music); } diff --git a/src/main/Service/taskManage.ts b/src/main/Service/taskManage.ts index b3975ec..de5b564 100644 --- a/src/main/Service/taskManage.ts +++ b/src/main/Service/taskManage.ts @@ -34,14 +34,16 @@ export class TaskManager { this.mjOpt = new MJOpt(); } - async InitService() { + async InitService(getMJsetting = false) { if (!this.softwareService) { this.softwareService = await SoftwareService.getInstance(); } if (!this.bookBackTaskListService) { this.bookBackTaskListService = await BookBackTaskListService.getInstance(); } - await this.mjOpt.InitService(); + if (getMJsetting) { + await this.mjOpt.InitService(); + } } async GetGlobalConfig() { @@ -117,6 +119,7 @@ export class TaskManager { } this.spaceTime = 5000; + await this.InitService(true); //循环添加任务 for (let index = 0; index < tasks.data.length; index++) { const element = tasks.data[index]; diff --git a/src/main/Service/tts.ts b/src/main/Service/tts.ts index be00c35..510a538 100644 --- a/src/main/Service/tts.ts +++ b/src/main/Service/tts.ts @@ -1,13 +1,21 @@ import { errorMessage, successMessage } from '../Public/generalTools' import { SoftwareService } from '../../define/db/service/SoftWare/softwareService' import path from 'path' +import fs from 'fs' import { define } from '../../define/define' import { isEmpty } from 'lodash' import { ValidateJson } from '../../define/Tools/validate' +import { CheckFileOrDirExist, CheckFolderExistsOrCreate, DeleteFolderAllFile } from '../../define/Tools/file' +import { TTSSelectModel } from '../../define/enum/tts' const { EdgeTTS } = require('node-edge-tts') +const { v4: uuidv4 } = require('uuid') +import { TTSService } from '../../define/db/tts/ttsService' +import { tts } from '../../model/tts' +import { GeneralResponse } from '../../model/generalResponse' export class TTS { softService: SoftwareService + ttsService: TTSService constructor() { } @@ -18,8 +26,14 @@ export class TTS { if (!this.softService) { this.softService = await SoftwareService.getInstance() } + if (!this.ttsService) { + this.ttsService = await TTSService.getInstance() + } } + + //#region 设置相关 + /** * 初始化TTS设置 */ @@ -80,6 +94,9 @@ export class TTS { } } + //#endregion + + //#region 合成音频相关 /** * 生成音频 * @param text 要生成的文本 @@ -91,18 +108,43 @@ export class TTS { if (ttsSetting.code === 0) { return ttsSetting } - let res + let res = undefined - let audioPath = path.join(define.project_path, 'audio.mp3') - let selectModel = ttsSetting.data.selectModel + // 生成对应的ID + let thisId = uuidv4() + + // 讲text写道本地 + let textPath = path.join(define.tts_path, `${thisId}/${thisId}.txt`) + await CheckFolderExistsOrCreate(path.dirname(textPath)) + await fs.promises.writeFile(textPath, text, 'utf-8') + + let audioPath = path.join(define.tts_path, `${thisId}/${thisId}.mp3`) + let selectModel = ttsSetting.data.selectModel as TTSSelectModel + + let hasSrt = true switch (selectModel) { - case 'edge-tts': - res = await this.GenerateAudioByEdgeTTS(text, ttsSetting.data.edgeTTS) + case TTSSelectModel.edgeTTS: + hasSrt = ttsSetting.data.edgeTTS.saveSubtitles + res = await this.GenerateAudioByEdgeTTS(text, ttsSetting.data.edgeTTS, audioPath) break - default: throw new Error('未知的TTS模式') } + + if (res == undefined) { + throw new Error('生成音频失败,未知错误') + } + + // 这边返回成功,保存配音历史 + this.ttsService.AddTTSHistory({ + name: text.substring(0, 10), + ttsPath: res.mp3Path ? path.relative(define.tts_path, res.mp3Path) : null, + hasSrt: hasSrt, + selectModel: selectModel, + srtJsonPath: res.srtJsonPath ? path.relative(define.tts_path, res.srtJsonPath) : null, + id: thisId, + textPath: textPath ? path.relative(define.tts_path, textPath) : null + }) return res } catch (error) { return errorMessage('生成音频失败,错误信息如下:' + error.toString(), 'TTS_GenerateAudio') @@ -110,35 +152,175 @@ export class TTS { } /** - * 使用EdgeTTS生成音频的方法 + * 使用EdgeTTS生成音频的方法,生成完成,返回生成的音频路径 * @param text 要生成的文本 * @param edgeTTS edgetts的设置 * @returns */ - // @ts-ignore - async GenerateAudioByEdgeTTS(text: string, edgeTTS: TTSSettingModel.EdgeTTSSetting) { + async GenerateAudioByEdgeTTS(text: string, edgeTTS: TTSSettingModel.EdgeTTSSetting, mp3Path: string) { try { const tts = new EdgeTTS({ voice: edgeTTS.value, lang: edgeTTS.lang, outputFormat: 'audio-24khz-96kbitrate-mono-mp3', - saveSubtitles: edgeTTS.saveSubtitles, + saveSubtitles: true, pitch: `${edgeTTS.pitch}%`, rate: `${edgeTTS.rate}%`, volumn: `${edgeTTS.volumn}%` }) - let ttsRes = await tts.ttsPromise(text, 'C:\\Users\\27698\\Desktop\\audio.mp3') + let ttsRes = await tts.ttsPromise(text, mp3Path) console.log(ttsRes) - return successMessage( - 'C:\\Users\\27698\\Desktop\\audio.mp3', - '生成音频成功', - 'TTS_GenerateAudioByEdgeTTS' - ) + return { + mp3Path: mp3Path, + srtJsonPath: mp3Path + '.json' + }; } catch (error) { - return errorMessage( - '生成音频失败,错误信息如下:' + error.toString(), - 'TTS_GenerateAudioByEdgeTTS' - ) + throw error } } + //#endregion + + //#region 合成字幕 + + /** + * 通过配音历史ID生成字幕 + * @param ttsId 配音历史ID + */ + async GenerateSRT(ttsId: string): Promise { + try { + // 获取配音历史 + let ttsHistory = this.ttsService.GetTTSHistoryById(ttsId) + let selectModel = ttsHistory.selectModel as TTSSelectModel + let res = undefined + switch (selectModel) { + case TTSSelectModel.edgeTTS: + res = await this.GenerateSRTByEdgeTTS(ttsHistory) + break + default: + throw new Error('未知的TTS模式') + } + // 这边重新请求,返回一个完整的 + let ttsHistoryData = this.ttsService.GetTTSHistoryById(ttsId) + return successMessage(ttsHistoryData, '生成字幕成功', 'TTS_GenerateSRT') + } catch (error) { + return errorMessage('生成字幕失败,错误信息如下:' + error.toString(), 'TTS_GenerateSRT') + } + } + + async GenerateSRTByEdgeTTS(ttsHistory: tts.TTSModel) { + try { + // 一系列的检查文件是不是存在 + if (isEmpty(ttsHistory.textPath)) { + throw new Error('生成字幕失败,文本文件不存在') + } + if (isEmpty(ttsHistory.srtJsonPath)) { + throw new Error('生成字幕失败,srtJson文件不存在') + } + let checkFileExist = await CheckFileOrDirExist(ttsHistory.textPath) + if (!checkFileExist) { + throw new Error('生成字幕失败,文本文件不存在') + } + checkFileExist = await CheckFileOrDirExist(ttsHistory.srtJsonPath) + if (!checkFileExist) { + throw new Error('生成字幕失败,srtJson文件不存在') + } + let text = await fs.promises.readFile(ttsHistory.textPath, 'utf-8'); + let srtJson = JSON.parse(await fs.promises.readFile(ttsHistory.srtJsonPath, 'utf-8')); + + // 根据标点符号和换行符分割文案 + // 更新后的正则表达式,匹配所有中文和英文的标点符号以及换行符 + const parts = text.match( + /[^,。!?;:“”()《》,.!?;:"()<>$$$$\n]+[,。!?;:“”()《》,.!?;:"()<>$$$$\n]*/g + ); + // 初始化 SRT 内容 + let srtContent = ""; + let index = 1; + + // 函数用于去掉文本末尾的标点符号 + const removeTrailingPunctuation = (text: string) => { + return text.replace(/[\s,。!?;:“”()《》,.!?;:"()<>$$$$]+$/, ""); + }; + + // 配对时间轴和文案分段 + for (let i = 0; i < parts.length; i++) { + const part = parts[i]; + let startTime = + srtJson[i * 2]?.start || srtJson[srtJson.length - 1].start; + let endTime = + srtJson[i * 2 + 1]?.end || srtJson[srtJson.length - 1].end; + + // 去掉文案末尾的标点符号 + const cleanedPart = removeTrailingPunctuation(part.trim()); + + // 将时间格式化为 SRT 格式 + const formatTime = (ms) => { + const date = new Date(ms); + const hours = String(date.getUTCHours()).padStart(2, "0"); + const minutes = String(date.getUTCMinutes()).padStart(2, "0"); + const seconds = String(date.getUTCSeconds()).padStart(2, "0"); + const milliseconds = String(date.getUTCMilliseconds()).padStart(3, "0"); + return `${hours}:${minutes}:${seconds},${milliseconds}`; + }; + + // 生成 SRT 片段 + srtContent += `${index}\n${formatTime(startTime)} --> ${formatTime( + endTime + )}\n${cleanedPart}\n\n`; + index++; + } + + console.log(srtContent); + // 将数据写入srt文件 + let srtPath = path.join(define.tts_path, `${ttsHistory.id}/${ttsHistory.id}.srt`) + await fs.promises.writeFile(srtPath, srtContent, 'utf-8') + // 更新配音历史 + this.ttsService.UpdetateTTSHistory(ttsHistory.id, { srtPath: path.relative(define.tts_path, srtPath) }) + // 返回成功 + return srtPath; + } catch (error) { + throw error + } + } + + //#endregion + + //#region 配音历史记录相关 + + /** + * 获取配音的历史记录 + * @param queryCondition 查询的条件 + * @returns + */ + async GetTTSHistoryData(queryCondition: tts.TTSHistoryQueryParams): Promise { + try { + await this.InitService() + let res = this.ttsService.GetTTSHistory(queryCondition); + return successMessage(res, "获取配音历史任务成功", 'TTS_GetTTSHistoryData') + } catch (error) { + return errorMessage('查询配音历史失败,错误信息:' + error.message, 'TTS_GetTTSHistoryData') + } + } + + /** + * 删除配音历史 + * @param ttsId 要删除的ID + * @returns + */ + async DeleteTTSHistory(ttsId: string): Promise { + try { + await this.InitService() + // 先删除数据库中数据,然后删除文件 + let ttsHistory = this.ttsService.GetTTSHistoryById(ttsId) + + this.ttsService.DeleteTTSHistory(ttsId); + // 删除文件 + let ttsDir = path.join(define.tts_path, ttsId) + await DeleteFolderAllFile(ttsDir, true); + return successMessage(ttsId, '删除配音历史成功', 'TTS_DeleteTTSHistory') + } catch (error) { + return errorMessage('删除配音历史失败,错误信息:' + error.message, 'TTS_DeleteTTSHistory') + } + } + + //#endregion } diff --git a/src/model/tts.d.ts b/src/model/tts.d.ts new file mode 100644 index 0000000..aae33db --- /dev/null +++ b/src/model/tts.d.ts @@ -0,0 +1,30 @@ +import { TTSSelectModel } from "../define/enum/tts" + +declare namespace tts { + type TTSHistoryQueryParams = { + page?: number // 当前页数 + pageSize?: number // 每页显示的数量 + name?: string // 配音名称 + id?: string // 配音ID + } + + type TTSModel = { + id?: string + no?: number + textPath?: string // 保存生成文本的地址 + name?: string // 一把就是配音的前几个字 + ttsPath?: string // 生成的配置文件地址 + srtPath?: string // 生成的SRT地址 + selectModel?: TTSSelectModel // 选择模式 + hasSrt?: boolean + srtJsonPath?: string + createTime?: Date + updateTime?: Date + } + + type TTSModelRes = { + ttsList: TTSModel[] + ttsCount: number + } + +} \ No newline at end of file diff --git a/src/preload/tts.js b/src/preload/tts.js index b57302b..ecfdc72 100644 --- a/src/preload/tts.js +++ b/src/preload/tts.js @@ -9,6 +9,17 @@ const tts = { SaveTTSConfig: async (data) => await ipcRenderer.invoke(DEFINE_STRING.TTS.SAVE_TTS_CONFIG, data), // 生成音频 - GenerateAudio: async (text) => await ipcRenderer.invoke(DEFINE_STRING.TTS.GENERATE_AUDIO, text) + GenerateAudio: async (text) => await ipcRenderer.invoke(DEFINE_STRING.TTS.GENERATE_AUDIO, text), + + // 生成SRT字幕 + GenerateSrt: async (text) => await ipcRenderer.invoke(DEFINE_STRING.TTS.GENERATE_SRT, text), + + // 删除配音历史记录 + DeleteTTSHistory: async (ttsId) => + await ipcRenderer.invoke(DEFINE_STRING.TTS.DELETE_TTS_HISTORY, ttsId), + + // 获取生成音频的历史记录 + GetTTSHistoryData: async (queryCondition) => + await ipcRenderer.invoke(DEFINE_STRING.TTS.GET_TTS_HISTORY_DATA, queryCondition) } export { tts } diff --git a/src/renderer/src/components/Home/Home.vue b/src/renderer/src/components/Home/Home.vue index 56f63e1..6089213 100644 --- a/src/renderer/src/components/Home/Home.vue +++ b/src/renderer/src/components/Home/Home.vue @@ -10,6 +10,7 @@ show-trigger @collapse="collapsed = true" @expand="collapsed = false" + style="position: relative" > + > + @@ -52,7 +54,7 @@ import { DuplicateOutline, GridOutline, RadioOutline, - BookOutline, + BookOutline } from '@vicons/ionicons5' import CheckMachineId from '../Components/CheckMachineId.vue' import { DEFINE_STRING } from '../../../../define/define_string' @@ -242,7 +244,8 @@ export default defineComponent({ { to: { name: 'gptCopywriting' - } + }, + class: 'router-link-a' }, { default: () => '文案处理' @@ -382,6 +385,36 @@ export default defineComponent({ // ] // }, + { + label: () => + h( + RouterLink, + { + to: { + name: 'lai_api' + } + }, + { + default: () => 'API服务' + } + ), + key: 'lai_api' + }, + { + label: () => + h( + RouterLink, + { + to: { + name: 'TTS_Services' + } + }, + { + default: () => '语音服务' + } + ), + key: 'TTS_Services' + }, { label: '设置', key: 'setting', @@ -453,39 +486,13 @@ export default defineComponent({ key: 'mj_setting' } ] - }, - { - label: () => - h( - RouterLink, - { - to: { - name: 'lai_api' - } - }, - { - default: () => 'API服务' - } - ), - key: 'lai_api' - }, - { - label: () => - h( - RouterLink, - { - to: { - name: 'TTS_Services' - } - }, - { - default: () => '语音服务' - } - ), - key: 'TTS_Services' } ] + function renderIcon(icon) { + return () => h(NIcon, null, { default: () => h(icon) }) + } + return { renderMenuIcon, menuOptions, diff --git a/src/renderer/src/components/Original/Components/AddCharacterTag.vue b/src/renderer/src/components/Original/Components/AddCharacterTag.vue index 8681073..a32095e 100644 --- a/src/renderer/src/components/Original/Components/AddCharacterTag.vue +++ b/src/renderer/src/components/Original/Components/AddCharacterTag.vue @@ -185,7 +185,9 @@ export default defineComponent({ chinese_prompt: characterData.value.chinese_prompt, prompt: characterData.value.prompt, image_url: characterData.value.image_url, - show_image: characterData.value.show_image, + show_image: characterData.value.show_image + ? characterData.value.show_image.split('?t')[0] + : null, cref_cw: characterData.value.cref_cw, lora: characterData.value.lora, lora_weight: characterData.value.lora_weight @@ -194,6 +196,9 @@ export default defineComponent({ characterData.value['children'] = children console.log(characterData.value) characterData.value['type'] = 'character_main' + characterData.value['show_image'] = characterData.value.show_image + ? characterData.value.show_image.split('?t')[0] + : null // 开始保存 await window.mj.SaveTagPropertyData( [JSON.stringify(characterData.value), 'character_tags'], diff --git a/src/renderer/src/components/TTS/EdgeTTS.vue b/src/renderer/src/components/TTS/EdgeTTS.vue index 56ef43e..b9865ec 100644 --- a/src/renderer/src/components/TTS/EdgeTTS.vue +++ b/src/renderer/src/components/TTS/EdgeTTS.vue @@ -26,11 +26,6 @@ - - - 复选框 - - diff --git a/src/renderer/src/components/TTS/TTSHistory.vue b/src/renderer/src/components/TTS/TTSHistory.vue new file mode 100644 index 0000000..e114e29 --- /dev/null +++ b/src/renderer/src/components/TTS/TTSHistory.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/renderer/src/components/TTS/TTSHistoryAction.vue b/src/renderer/src/components/TTS/TTSHistoryAction.vue new file mode 100644 index 0000000..a6987b9 --- /dev/null +++ b/src/renderer/src/components/TTS/TTSHistoryAction.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/renderer/src/components/TTS/TTSHistoryShowPath.vue b/src/renderer/src/components/TTS/TTSHistoryShowPath.vue new file mode 100644 index 0000000..314e6e2 --- /dev/null +++ b/src/renderer/src/components/TTS/TTSHistoryShowPath.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/renderer/src/components/TTS/TTSHome.vue b/src/renderer/src/components/TTS/TTSHome.vue index f803ee0..44b02e6 100644 --- a/src/renderer/src/components/TTS/TTSHome.vue +++ b/src/renderer/src/components/TTS/TTSHome.vue @@ -103,6 +103,7 @@ import { useSoftwareStore } from '../../../../stores/software' import { AddCircleOutline } from '@vicons/ionicons5' import InputDialogContent from '../Original/Components/InputDialogContent.vue' import { useSettingStore } from '../../../../stores/setting' +import TTSHistory from './TTSHistory.vue' export default defineComponent({ components: { @@ -116,7 +117,8 @@ export default defineComponent({ NPopover, AddCircleOutline, NIcon, - InputDialogContent + InputDialogContent, + TTSHistory }, setup() { @@ -259,6 +261,7 @@ export default defineComponent({ softwareStore.spin.spinning = true softwareStore.spin.tip = '正在合成音频,请稍等...' + // 保存配置信息 let saveRes = await window.tts.SaveTTSConfig(toRaw(settingStore.ttsSetting)) if (saveRes.code == 0) { softwareStore.spin.spinning = false @@ -266,16 +269,32 @@ export default defineComponent({ return } + // 开始真正的合成音频 let generateRes = await window.tts.GenerateAudio(text.value) if (generateRes.code == 0) { softwareStore.spin.spinning = false message.error(generateRes.message) return } - audioUrl.value = generateRes.data + debugger + audioUrl.value = generateRes.mp3Path softwareStore.spin.spinning = false } + // 显示配音的历史记录 + function ShowHistory() { + let dialogWidth = window.innerWidth * 0.8 + let dialogHeight = window.innerHeight * 0.9 + dialog.create({ + title: '配音历史记录', + showIcon: false, + closeOnEsc: false, + content: () => h(TTSHistory, { height: dialogHeight }), + style: `width : ${dialogWidth}px; min-height : ${dialogHeight}px;matgin-right: 0px`, + maskClosable: false + }) + } + return { text, azurettsRef, @@ -284,6 +303,7 @@ export default defineComponent({ writeSetting, softwareStore, ModifySplitChar, + ShowHistory, SaveTTSConfig, FormatWord, ClearText, diff --git a/src/stores/software.ts b/src/stores/software.ts index 73e0900..d1651e1 100644 --- a/src/stores/software.ts +++ b/src/stores/software.ts @@ -43,6 +43,7 @@ export const useSoftwareStore = defineStore('software', { async GetComponentSize() { debugger if (this.componentSize.length == 0) { + //@ts-ignore let res = await window.setting.GetComponentSize() this.componentSize = res.data } @@ -54,6 +55,7 @@ export const useSoftwareStore = defineStore('software', { // 将当前的software数据保存到数据库中 async SaveSoftware() { // 保存数据 + // @ts-ignore return await window.setting.SaveSoftWareSetting(JSON.parse(JSON.stringify(this.softWare))) }