-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
124 lines (117 loc) · 3.24 KB
/
Copy pathconfig.example.yaml
File metadata and controls
124 lines (117 loc) · 3.24 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Subtitle Creator 配置檔
# 複製此檔案為 config.yaml 並根據需求修改
# ============================================================
# 基本設定
# ============================================================
general:
# 工作目錄 (暫存檔案位置)
work_dir: "./temp"
# 是否保留中間檔案 (音訊檔等)
keep_intermediate: false
# 日誌等級 (DEBUG/INFO/WARNING/ERROR)
log_level: "INFO"
# ============================================================
# 影片掃描設定
# ============================================================
scanner:
# 支援的影片格式
formats:
- ".mp4"
- ".mkv"
- ".ts"
- ".avi"
- ".mov"
- ".webm"
- ".flv"
# 是否遞迴掃描子目錄
recursive: true
# 排除的檔案 pattern (glob 格式)
exclude_patterns:
- "*_temp.*"
- ".*"
# ============================================================
# 音訊擷取設定
# ============================================================
extractor:
# FFmpeg 執行檔路徑 (留空則使用 PATH 中的 ffmpeg)
ffmpeg_path: ""
# 輸出設定
output:
format: "wav"
sample_rate: 16000
channels: 1
codec: "pcm_s16le"
# 指定擷取的音軌索引 (null 為自動選擇)
audio_track: null
# ============================================================
# 語音辨識設定 (WhisperX)
# ============================================================
transcriber:
# 模型大小: tiny/base/small/medium/large-v2/large-v3
model_size: "large-v3"
# 執行裝置: cuda/cpu
device: "cuda"
# 計算精度: float16/float32/int8
compute_type: "float16"
# 來源語言 (null 為自動偵測)
language: null
# 批次大小 (影響記憶體用量)
batch_size: 16
# VAD 設定
vad:
enabled: true
# VAD 閾值 (0-1, 越高越嚴格)
threshold: 0.5
# 對齊設定
alignment:
enabled: true
# 是否返回字元層級時間軸
return_char_alignments: false
# ============================================================
# 翻譯設定 (TranslateGemma)
# ============================================================
translator:
# 模型名稱
model_name: "google/translategemma-12b"
# 執行裝置
device: "cuda"
# 4-bit 量化 (降低 VRAM 需求)
load_in_4bit: true
# 8-bit 量化 (可與 4-bit 擇一)
load_in_8bit: false
# 最大輸出長度
max_length: 512
# 批次大小
batch_size: 8
# 翻譯設定
translation:
# 來源語言
source_lang: "ja"
# 目標語言
target_lang: "zh-tw"
# ============================================================
# SRT 輸出設定
# ============================================================
writer:
# 字幕樣式: source/translation/bilingual/bilingual_reverse
style: "translation"
# 檔案編碼
encoding: "utf-8-sig"
# 每行最大字元數
max_chars_per_line: 42
# 每段最多行數
max_lines: 2
# 最小顯示時間 (秒)
min_duration: 0.5
# 最大顯示時間 (秒)
max_duration: 7.0
# 字幕間最小間隔 (秒)
min_gap: 0.1
# ============================================================
# GPU 設定
# ============================================================
gpu:
# 指定 GPU 裝置 ID
device_id: 0
# 記憶體上限 (GB, null 為不限制)
memory_limit: null