-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_example.py
38 lines (35 loc) · 938 Bytes
/
config_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import pysubs2
api_key = ""
base_url = "https://api.deepseek.com"
llm_model = "deepseek-chat"
device = "cuda"
compute_type = "float16"
transcibe_lang = "en"
src_lang = "en-US"
dst_lang = "zh-CN"
whisper_model_type = "medium"
whisper_model_dir = "models/whisper"
align_model_dir = "models/align"
# 定义样式
original_style = pysubs2.SSAStyle(
fontname="Source Han Sans SC Heavy",
fontsize=20,
primarycolor=pysubs2.Color(216, 222, 233, 0),
outlinecolor=pysubs2.Color(46, 52, 64, 0),
backcolor=pysubs2.Color(46, 52, 64, 200),
bold=True,
outline=1.2,
alignment=2, # 底部居中
marginv=25,
)
translated_style = pysubs2.SSAStyle(
fontname="Source Han Sans SC Heavy",
fontsize=16,
primarycolor=pysubs2.Color(143, 188, 187, 0),
outlinecolor=pysubs2.Color(46, 52, 64, 0),
backcolor=pysubs2.Color(46, 52, 64, 200),
italic=True,
outline=1.2,
alignment=2,
marginv=5,
)