소스 검색

title size 22

ming 4 년 전
부모
커밋
9ef4740b13
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      OpenshotService/openshot_video_generator.py

+ 2 - 1
OpenshotService/openshot_video_generator.py

@@ -109,6 +109,7 @@ def make_dir(name_hash):
         print("~~~~~~Warning~~~~~~~~~Directory " , dir_subtitle+name_hash ,  " already exists")
 
 def file_prepare(name, name_hash,text_content,image_urls,lang='zh'):
+    
     make_dir(name_hash)
     img_num = 1
     for imgu in image_urls:
@@ -137,7 +138,7 @@ def file_prepare(name, name_hash,text_content,image_urls,lang='zh'):
     language = 'zh-tw'
     txt_idx = 0
     for txt in text_content:
-        if lang=='eng':
+        if lang!='zh':
             tts = gTTS(txt)
             tts.save(dir_sound+name_hash+"/"+str(txt_idx)+".mp3")
         else: