自动同步: 2026-03-20 02:10

This commit is contained in:
2026-03-20 02:10:10 +08:00
parent d2a5e9a6ad
commit d9a5daca0a
67 changed files with 1526 additions and 220 deletions
+27
View File
@@ -0,0 +1,27 @@
"""SRT Processing Module
B站字幕处理模块,包含:
- SRT 解析器 (parser)
- 语义分段器 (segmenter)
- ASR 纠错器 (corrector)
"""
from kb_workflow.srt.parser import parse_srt, parse_srt_file, Segment
__all__ = [
"parse_srt",
"parse_srt_file",
"Segment",
"SemanticSegmenter",
"ASRCorrector",
]
# 延迟导入,避免循环依赖
def __getattr__(name: str):
if name == "SemanticSegmenter":
from kb_workflow.srt.segmenter import SemanticSegmenter
return SemanticSegmenter
if name == "ASRCorrector":
from kb_workflow.srt.corrector import ASRCorrector
return ASRCorrector
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")