mirror of
https://github.com/harry0703/MoneyPrinterTurbo.git
synced 2026-11-14 18:22:59 +01:00
Hindi, Bengali, Marathi and Nepali end sentences with the danda (। or ॥), Urdu with ۔, Burmese with ။, Khmer with ។ and Amharic with ።. None of these was in PUNCTUATIONS, so split_string_by_punctuations kept such a script as one line and the video showed every sentence of it in a single subtitle. Edge TTS word boundaries leave these marks out or attach them to the last word, the same as for the Arabic marks already in the list, so they now end script lines too.
45 lines
1011 B
Python
45 lines
1011 B
Python
PUNCTUATIONS = [
|
||
"?",
|
||
",",
|
||
".",
|
||
"、",
|
||
";",
|
||
":",
|
||
"!",
|
||
"…",
|
||
"?",
|
||
",",
|
||
"。",
|
||
"、",
|
||
";",
|
||
":",
|
||
"!",
|
||
"...",
|
||
# 阿拉伯语常用标点也应作为自然断句点,避免脚本文本和 edge-tts
|
||
# 返回的字幕停顿边界不一致,导致后续逐行匹配失败。
|
||
"،",
|
||
"؛",
|
||
"؟",
|
||
# Full stops of scripts that do not use ".": Devanagari and Bengali danda,
|
||
# Urdu, Burmese, Khmer and Ethiopic. Edge TTS word boundaries leave these
|
||
# out or attach them to the last word, so they must end script lines too.
|
||
"।",
|
||
"॥",
|
||
"۔",
|
||
"။",
|
||
"។",
|
||
"።",
|
||
]
|
||
|
||
TASK_STATE_FAILED = -1
|
||
TASK_STATE_COMPLETE = 1
|
||
TASK_STATE_PROCESSING = 4
|
||
|
||
CROSS_POST_STATE_PENDING = "pending"
|
||
CROSS_POST_STATE_PROCESSING = "processing"
|
||
CROSS_POST_STATE_COMPLETE = "complete"
|
||
CROSS_POST_STATE_FAILED = "failed"
|
||
|
||
FILE_TYPE_VIDEOS = ["mp4", "mov", "mkv", "webm"]
|
||
FILE_TYPE_IMAGES = ["jpg", "jpeg", "png", "bmp"]
|