Initial commit: lesson-highlights generator

This commit is contained in:
hmo
2026-05-03 03:07:22 +08:00
commit 9e62247a60
55 changed files with 6189 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
"""
Core modules for Piano Highlight Generator App
Exports video processing, subtitle processing, LLM client, and utilities
"""
from .video import extract_clip, merge_clips, burn_subtitles, burn_dual_subtitles, VideoPipeline
from .subtitle import SubtitleTrack, SubtitlePipeline
from .llm import LLMClient
from .corrections import apply_all_corrections, load_term_corrections_from_config
from .pipeline import Pipeline, create_pipeline_from_yaml
from .ppt_parser import PPTParser, parse_ppt_to_config
from .utils import run_cmd, to_srt_time, ensure_dir
from .constants import FFMPEG_CMD, FFPROBE_CMD, DEFAULT_API_HOST, DEFAULT_OUTPUT_DIR, WHISPER_MODEL_PATH
from .errors import (
PianoAppError, APIError, APIKeyError, APIRateLimitError, APITimeoutError,
FileError, FileNotFoundError, FilePermissionError, DiskSpaceError,
VideoError, VideoNotFoundError, VideoCodecError, FFmpegNotFoundError, SubtitleBurnError,
ErrorHandler, get_error_handler, handle_error, get_user_message, USER_MESSAGES
)