ASB Auto Subs
ASB Auto Subs is a tool for generating subtitles from YouTube videos using whisper locally, or groq remotely. It monitors the clipboard for YouTube links, as well as file path (shift right click "copy as path" on windows), gets the audio, and generates subtitles in .srt format. The project also integrates with the ASBPlayer WebSocket server for automatically loading subtitles.
https://pypi.org/project/asb-auto-subgen/
Getting Started
Install the Package
To get started, pip install the package:
pip
pip install asb-auto-subgen
OR
uv tool install asb-auto-subgen
If you want to run whisper locally...
pip install asb-auto-subgen[local]
OR
uv tool install asb-auto-subgen[local]
Updating
If you already have the tool installed, update it with the same method you used to install it:
pip install --upgrade asb-auto-subgen
uv tool upgrade asb-auto-subgen
If you use local Whisper support, update with:
pip install --upgrade "asb-auto-subgen[local]"
uv tool install --upgrade "asb-auto-subgen[local]"
Requirements
- Python 3.11+
ffmpeginstalled and available in your system's PATHgoinstalled and available in your system's PATH (for the asbplayer websocket server)
Configure config.yaml
Before running the project, you need to configure the config.yaml file. This file contains essential settings, changing how asb-auto-subs will behave.
This will be generated on first run if it doesn't exist (idk where).
- Open the
config.yamlfile in a text editor . - Update the configuration values as needed. For example:
process_locally: false whisper_model: "small" GROQ_API_KEY: "" RUN_ASB_WEBSOCKET_SERVER: true model: "whisper-large-v3-turbo" # model: "whisper-large-v3" output_dir: "output" language: "ja" skip_language_check: false cookies: ""
- Save the file.
What Each Config Does:
process_locally: Determines if the transcription is done locally or via the groq API. Set this totrueonly if you installedasb-auto-subgen[local].whisper_model: The whisper model to use for local transcription.GROQ_API_KEY: Your API key for accessing Groq's services.RUN_ASB_WEBSOCKET_SERVER: Whether to run the ASBPlayer WebSocket server.model: The groq transcription model to use.output_dir: Directory where output files are saved.language: Language code for transcription. Also used to check if the video's language is what we want.skip_language_check: Whentrue, bypasses YouTube metadata language validation entirely.cookies: Cookies for authenticated yt-dlp requests.
Setup API Usage
Where to get Groq API Key? (REQUIRED)
Can sign up here https://console.groq.com/ and after sign up it will ask you to generate an api key.
Run the Script
The script monitors your clipboard for YouTube links. When a valid YouTube link is detected, it automatically downloads the audio, generates subtitles, saves them, and then sends them to the ASBPlayer WebSocket server.
To start the script:
asb-auto-subgen
ASBPlayer WebSocket Server
This project integrates with the ASBPlayer WebSocket server for subtitle synchronization. You can find more information about ASBPlayer and its WebSocket server here.
Contact
If you run into issues, you can make an issue here.
Credits
- https://github.com/killergerbah/asbplayer
- https://huggingface.co/spaces/Nick088/Fast-Subtitle-Maker/tree/main
- https://github.com/m1guelpf/yt-whisper for the yt-download logic/idea
Donations
If you've benefited from this or any of my other projects, please consider supporting my work via Github Sponsors or Ko-fi.
Metadata
Release files for asb-auto-subgen 1.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asb_auto_subgen-1.0.7.tar.gz | 20.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asb_auto_subgen-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.7 kB
Release files / asb_auto_subgen-1.0.7.tar.gz
| Download URL | asb_auto_subgen-1.0.7.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3782c81b6d572db1d0455fa6b99ca32baa03bb620ccbaa25e1a99c390fa89983
|
|
BLAKE2b-256 checksum How to use checksums |
e1565a1a3d1313ecf05e085a53b3df85186c41c30ea8f0b8b09ccdf48e5b0002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / asb_auto_subgen-1.0.7-py3-none-any.whl
| Download URL | asb_auto_subgen-1.0.7-py3-none-any.whl |
|---|---|
| Size | 22.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
737854f39d6fec69f1490e8e910e69c01f7a207671da4ac19db503fe9ba995bb
|
|
BLAKE2b-256 checksum How to use checksums |
300d039fe29776639afda7942d903a0c989fa75a059d23f4208da5fb75ae6985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|