首次提交

This commit is contained in:
2026-09-28 16:09:31 +08:00
commit 4a6839319a
71 changed files with 12144 additions and 0 deletions

31
pyproject.toml Normal file
View File

@@ -0,0 +1,31 @@
[project]
name = "ocr-subtitle-extractor"
version = "0.1.0"
description = "视频字幕提取系统:抽帧 + OCR + 语音识别,输出 SRT"
readme = "README.md"
requires-python = ">=3.10,<3.13"
# 运行时依赖(与 requirements.txt 保持一致)
dependencies = [
# 图像与数值处理
"opencv-python-headless>=4.8.0", # headless 版无需系统 libGL,适合无界面/离线服务器
"numpy>=1.24,<3.0",
"Pillow>=10.0.0",
"scikit-learn>=1.3.0", # DBSCAN 水印聚类
# 中文文本处理
"jieba>=0.42.1", # 分词
"pypinyin>=0.49.0", # 拼音匹配(音频与 OCR 文本对齐)
"zhconv>=1.4.3", # 繁简转换
# 音频与语音识别
"pydub>=0.25.1", # 音频切片(依赖外部 ffmpeg)
"av>=11.0,<14.0", # faster-whisper 依赖;钉带 wheel 的版本,免本地编译
"faster-whisper>=1.0.0", # Whisper 语音识别(int8 量化,CPU/GPU)
# 腾讯云
"cos-python-sdk-v5>=1.9.0", # COS 对象存储(import qcloud_cos)
"requests>=2.28.0", # 内部 OCR API 调用
]
# 国内镜像(华为云),让 uv sync / uv pip 默认走这里
[[tool.uv.index]]
url = "https://repo.huaweicloud.com/repository/pypi/simple"
default = true