|
@@ -133,7 +133,6 @@ def file_prepare(name, name_hash,text_content,image_urls,multiLang,lang='zh'):
|
|
|
txt_idx+=1
|
|
|
print("text file made")
|
|
|
#make mp3
|
|
|
- language = 'zh'
|
|
|
txt_idx = 0
|
|
|
for txt in text_content:
|
|
|
if lang!='zh' or multiLang==1:
|
|
@@ -141,7 +140,7 @@ def file_prepare(name, name_hash,text_content,image_urls,multiLang,lang='zh'):
|
|
|
tts = gTTS(txt)
|
|
|
tts.save(dir_sound+name_hash+"/"+str(txt_idx)+".mp3")
|
|
|
else:
|
|
|
- tts = gTTS(txt,language)
|
|
|
+ tts = gTTS(txt,lang='zh-tw')
|
|
|
tts.save(dir_sound+name_hash+"/"+str(txt_idx)+".mp3")
|
|
|
else:
|
|
|
print('use zhtts')
|