How mli/autocut works
Project type and purpose
• AutoCut is a command-line Python package that automates video subtitle generation and segment‐based cutting.
• It uses OpenAI’s Whisper (or faster-whisper / OpenAI API) for transcription, ffmpeg for cutting/merging, and provides a daemon mode to watch folders.
File structure
• Top-level:
• Dockerfile(.cuda): containerization for CPU and GPU
• setup.py, setup.cfg: packaging
• .github/workflows: CI (lint, tests, faster-whisper)
• autocut/ : core library
• Key modules in autocut/:
• main.py — CLI entrypoint, arg parsing
• transcribe.py — model loading, audio extraction, Whisper API calls, generates .srt & .md
• cut.py — reads .srt/.md, constructs ffmpeg cut/merge commands
• daemon.py — monitors directories, orchestrates transcribe → cut loop
• utils.py — file I/O, path utils, encoding helpers
• whisper_model.py — abstraction over different Whisper backends
• test/*: unit tests for cutting and transcription
• imgs/: screenshots for README
README for additional insights
• Supported transcription backends: openai-whisper, faster-whisper, OpenAI API
• CLI usage patterns: autocut -t (transcribe), autocut -c (cut), autocut -d (daemon)
• Dependencies: Python, PyTorch, ffmpeg
• Docker images for isolation