Use OpenAI's whisper to generate subtitles in multiple languages for the purpose of language learning
Project description
Language learning application that uses openai's whisper to generate foreign language and English subtitles for videos simultaneously to help with language learning.
Installation
> pip install llsubtitles
Usage
To use llsubtitles
first you need a foreign language .mp4 file. I recommend using yt-dlp to download content for language learning. Once you have a .mp4 file you can use llsubtitles
to generate subtitles for it.
# Using chinese content for this example
> llsubtitles --language Chinese --model small --combined --definitions --pinyin example.mp4
--language: Refers to the language used by openai's whisper to generate subtitles.
--model: The model used by whisper. See their documentation for more options.
--combined: If this flag is used, the subtitles will be generated in both the foreign language and English.
--definitions: If this flag is used, the subtitles will include definitions for the foreign language words.
--pinyin: Optional flag for Chinese learners, if this flag is used, the subtitles will include pinyin for the Chinese words.
Note, you should make sure that you have pytorch set up correctly to use Cuda if you're using an Nvidia GPU. See pytorch's documentation for more information. This will greatly improve performance.
Credits
Chinese English dictionary is courtesy of cedict
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llsubtitles-1.0.1.tar.gz
.
File metadata
- Download URL: llsubtitles-1.0.1.tar.gz
- Upload date:
- Size: 3.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8552f113a6551a4508984d14958897d0cb2813f59f32a94ae765c082b809f8 |
|
MD5 | c4ecd8ef436faf845e6425d555eb0d9f |
|
BLAKE2b-256 | 83337c82df327b1b380d000bee1f98ff51939067dca291d1a69be3737d838132 |
File details
Details for the file llsubtitles-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: llsubtitles-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af26f21e0cef99321ca18fe959abfeae5e255e33ada52762c86698b1d2e6f8aa |
|
MD5 | 83ddfa3a887bf2627282fce648362ab4 |
|
BLAKE2b-256 | 35b2d758a27c0465ebc6e4ffef7d4745bfd5032552ac573bffdcc79d63466f9d |