Merge remote-tracking branch 'origin/main'
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ def generate_infos():
|
||||
def download_video(info):
|
||||
link = info["link"]
|
||||
filename = info["filename"]
|
||||
os.system(f"youtube-dl -f 0 {link} -o ./video_data/{filename}.mp4")
|
||||
os.system(f"youtube-dl -f 0 {link} -o ./video_data/{filename}.mp4 --no-check-certificate")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
+6
-11
@@ -29,19 +29,14 @@ def korean_cleaners(text):
|
||||
return text
|
||||
|
||||
|
||||
# def chinese_cleaners(text):
|
||||
# '''Pipeline for Chinese text'''
|
||||
# text = number_to_chinese(text)
|
||||
# text = chinese_to_bopomofo(text)
|
||||
# text = latin_to_bopomofo(text)
|
||||
# text = re.sub(r'([ˉˊˇˋ˙])$', r'\1。', text)
|
||||
# return text
|
||||
|
||||
def chinese_cleaners(text):
|
||||
from pypinyin import Style, pinyin
|
||||
'''Pipeline for Chinese text'''
|
||||
text = text.replace("[ZH]", "")
|
||||
phones = [phone[0] for phone in pinyin(text, style=Style.TONE3)]
|
||||
return ' '.join(phones)
|
||||
text = number_to_chinese(text)
|
||||
text = chinese_to_bopomofo(text)
|
||||
text = latin_to_bopomofo(text)
|
||||
text = re.sub(r'([ˉˊˇˋ˙])$', r'\1。', text)
|
||||
return text
|
||||
|
||||
|
||||
def zh_ja_mixture_cleaners(text):
|
||||
|
||||
Reference in New Issue
Block a user