Transcribes audio using Whisper and translates it using DeepL.
Project description
whisper2subs
A CLI tool that transcribes audio using openai-whisper
and translates it using DeepL.
Install
pip install --user whisper2subs
Usage
whisper2subs --help
Translate
In order to perform translations into languages other than English, it's required to provide an API key from DeepL. Using the --deepl-apikey
option or with the DEEPL_APIKEY
environment variable. You can create a free account to get an API key.
Transcribe and then translate to Spanish the audio of an mp4 file, using the large-v2
model.
whisper2subs -m large-v2 -t es --deepl-apikey "yout-api-key" input.mp4 subs/
If the language of the input file is not specified Whisper will try to detect it. To specify the language of the input file, use the -l
option.
whisper2subs -l ja -m large-v2 -t es --deepl-apikey "yout-api-key" input.mp4 subs/
Change output format to str
only:
whisper2subs -l ja -t es --output-format srt --deepl-apikey "yout-api-key" input.mp4 subs/
For more information:
whisper2subs --help
Transcribe
Transcribe audio without translating it:
whisper2subs input.mp4 text/
References
Project details
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
Hashes for whisper2subs-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a9ce1920ba9829914033934e09a3de3a84c628c4d4685000cd13a4f2ffec4ac |
|
MD5 | eaf2fa7df0c67c5c8af3f1b51a83a4cf |
|
BLAKE2b-256 | 5a3408d21bb97c7a8abe44f085b75843b898f0d01d2394175f105f27ebeb9987 |