Skip to main content

Transcribes audio using Whisper and translates it using DeepL.

Project description

PyPI PyPI - Python Version PyPI - License 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.1.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.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whisper2subs-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3fd56af2b52ddf9a332e0600cc04a2620f4cedcdb6d2004a0c596c81801b37ca
MD5 a31f9b7443bd6ea325dec07d01466e47
BLAKE2b-256 ff7a906b9746cfa452fd6a362c5eff24bd38ae06cc81e9d7d6046a1ec3c35a65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: whisper2subs-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f69c7d9226e7268544b0123da16c00bbe0125255ff94029b202f947d5cf45e3
MD5 1f79a96f20348d3777c36ab85b7d16ab
BLAKE2b-256 a7f66007ead5d55305d67722817814215bb1f46d14b8c8eed5a665ec05c6aeda

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