Explorar o código

add dependencies

ming %!s(int64=3) %!d(string=hai) anos
pai
achega
99ebe852e7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      OpenshotService/openshot_video_generator.py

+ 1 - 1
OpenshotService/openshot_video_generator.py

@@ -557,7 +557,7 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
     Ctr_Autosub.init()
     Ctr_Autosub.init()
     Ctr_Autosub.generate_subtitles(tmp_video_dir+name_hash+"raw.mp4",'zh',listener_progress,output=tmp_video_dir+name_hash+"script.txt",concurrency=DEFAULT_CONCURRENCY,subtitle_file_format=DEFAULT_SUBTITLE_FORMAT)
     Ctr_Autosub.generate_subtitles(tmp_video_dir+name_hash+"raw.mp4",'zh',listener_progress,output=tmp_video_dir+name_hash+"script.txt",concurrency=DEFAULT_CONCURRENCY,subtitle_file_format=DEFAULT_SUBTITLE_FORMAT)
     
     
-    sub_dict = parse_script(tmp_video_dir+name_hash+"script.txt",13)
+    sub_dict = parse_script(tmp_video_dir+name_hash+"script.txt",split_by_pun(text_content[0]))
     for subd in sub_dict:
     for subd in sub_dict:
         print(subd)
         print(subd)
     generate_subtitle_image_from_dict(name_hash, sub_dict)
     generate_subtitle_image_from_dict(name_hash, sub_dict)