Skip to main content

Transcribes audio using Whisper and translates it using DeepL.

Project description

PyPI PyPI - Python Version GitHub Code style: black

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

whisper2subs-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whisper2subs-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file whisper2subs-0.1.0.tar.gz.

File metadata

  • Download URL: whisper2subs-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for whisper2subs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e0e4ee1e759a1d8aacdebf6c2c3cc53ee13e5f8a3156d3ca6d29edfb96a9269
MD5 6fdbbbfd758cd11859269bdd7bdb8986
BLAKE2b-256 e4ee496b7b0927274ecd8326ea128b5a62af40f575386a30861c3f0b0470e2e8

See more details on using hashes here.

File details

Details for the file whisper2subs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whisper2subs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for whisper2subs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73a0236ecb971ed6424162aa765c5c96d8fed83b8b5cd3356fd99ebf47d13248
MD5 ec7eeffd865e6d6ce8f442e93f3022f3
BLAKE2b-256 fb52229ee0a5d119bd724d648b40e33f8389a95667794ee45c7de0ad93bdf18f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page