Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zuplyx/subtitle-creator
Add english subtitles to videos using openai/whisper-large-v3
https://github.com/zuplyx/subtitle-creator
open-ai poetry-python python3 subtitles-generator whisper
Last synced: 14 days ago
JSON representation
Add english subtitles to videos using openai/whisper-large-v3
- Host: GitHub
- URL: https://github.com/zuplyx/subtitle-creator
- Owner: Zuplyx
- License: apache-2.0
- Created: 2024-09-28T13:20:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T19:35:26.000Z (2 months ago)
- Last Synced: 2024-10-23T05:22:24.609Z (2 months ago)
- Topics: open-ai, poetry-python, python3, subtitles-generator, whisper
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Subtitle Creator
This scripts creates english subtitles for an input video.
It works completely locally using [openai/whisper-large-v3](https://huggingface.co/openai/whisper-large-v3) for transcription
and translation.## Requirements
- Audio extracting and adding the subtitles to the video requires [FFmpeg](https://ffmpeg.org/).
- Python dependencies are managed via [Poetry](https://python-poetry.org/): ``poetry install``
- It is recommended to install [CUDA](https://developer.nvidia.com/cuda-downloads) for faster transcription and translation.## Usage
Start a shell in the virtual env via ``poetry shell``, then run the script with:
``python subtitleCreator.py ``.
Full options: ``python subtitleCreator.py -h``:````text
usage: subtitleCreator.py [-h] [-o OUTPUT] [--temp TEMP] [--overwrite] [--burn] [--keep] video_fileAdd translated subtitles to a video.
positional arguments:
video_file Path to the input video file.options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Path to the output video file. If not specified the video will be saved as
'_subtitles.mp4'.
--temp TEMP Path to the temporary directory where the intermediate files will be saved. If not specified
the working directory will be used.
--overwrite Overwrite the original video file.
--burn Burn the subtitles in the video instead of adding them as selectable.
--keep Keep temporary files instead of deleting them after processing.
````