whisper2subs


Namewhisper2subs JSON
Version 0.2.1 PyPI version JSON
download
home_page
SummaryTranscribes audio using Whisper and translates it using DeepL.
upload_time2023-12-27 17:01:56
maintainer
docs_urlNone
author
requires_python<3.12,>=3.8
licenseMIT
keywords whisper subs cli translate transcribe
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/whisper2subs?style=flat-square)](https://pypi.org/project/whisper2subs/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/whisper2subs?style=flat-square)](https://pypi.org/project/whisper2subs/)
[![PyPI - License](https://img.shields.io/pypi/l/whisper2subs?style=flat-square)](https://github.com/LuqueDaniel/whisper2subs/blob/main/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black?style=flat-square)

# whisper2subs

A CLI tool that transcribes audio using [`openai-whisper`](https://github.com/openai/whisper) and translates it using [DeepL](https://www.deepl.com/docs-api).

## Install

```shell
pip install --user whisper2subs
```

## Usage

```shell
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**](https://www.deepl.com/en/pro?cta=header-pro-button/) to get an API key.

Transcribe and then translate to Spanish the audio of an mp4 file, using the `large-v2` model.

```shell
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.

```shell
whisper2subs -l ja -m large-v2 -t es --deepl-apikey "yout-api-key" input.mp4 subs/
```

Change output format to `str` only:

```shell
whisper2subs -l ja -t es --output-format srt --deepl-apikey "yout-api-key" input.mp4 subs/
```

For more information:

```shell
whisper2subs --help
```

### Transcribe

Transcribe audio without translating it:

```shell
whisper2subs input.mp4 text/
```

## References

* [Whisper](https://github.com/openai/whisper)
* [DeepL API reference](https://www.deepl.com/docs-api)
* [`deepl-python`](https://github.com/DeepLcom/deepl-python)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "whisper2subs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<3.12,>=3.8",
    "maintainer_email": "",
    "keywords": "whisper,subs,cli,translate,transcribe",
    "author": "",
    "author_email": "Daniel Luque <danielluque14@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/01/a118cbb452f41fb7ee01bc19c316df22a77b2bd60421d9cd98a30e9409f3/whisper2subs-0.2.1.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/whisper2subs?style=flat-square)](https://pypi.org/project/whisper2subs/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/whisper2subs?style=flat-square)](https://pypi.org/project/whisper2subs/)\n[![PyPI - License](https://img.shields.io/pypi/l/whisper2subs?style=flat-square)](https://github.com/LuqueDaniel/whisper2subs/blob/main/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black?style=flat-square)\n\n# whisper2subs\n\nA CLI tool that transcribes audio using [`openai-whisper`](https://github.com/openai/whisper) and translates it using [DeepL](https://www.deepl.com/docs-api).\n\n## Install\n\n```shell\npip install --user whisper2subs\n```\n\n## Usage\n\n```shell\nwhisper2subs --help\n```\n\n### Translate\n\nIn 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**](https://www.deepl.com/en/pro?cta=header-pro-button/) to get an API key.\n\nTranscribe and then translate to Spanish the audio of an mp4 file, using the `large-v2` model.\n\n```shell\nwhisper2subs -m large-v2 -t es --deepl-apikey \"yout-api-key\" input.mp4 subs/\n```\n\nIf 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.\n\n```shell\nwhisper2subs -l ja -m large-v2 -t es --deepl-apikey \"yout-api-key\" input.mp4 subs/\n```\n\nChange output format to `str` only:\n\n```shell\nwhisper2subs -l ja -t es --output-format srt --deepl-apikey \"yout-api-key\" input.mp4 subs/\n```\n\nFor more information:\n\n```shell\nwhisper2subs --help\n```\n\n### Transcribe\n\nTranscribe audio without translating it:\n\n```shell\nwhisper2subs input.mp4 text/\n```\n\n## References\n\n* [Whisper](https://github.com/openai/whisper)\n* [DeepL API reference](https://www.deepl.com/docs-api)\n* [`deepl-python`](https://github.com/DeepLcom/deepl-python)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Transcribes audio using Whisper and translates it using DeepL.",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://github.com/LuqueDaniel/whisper2subs/blob/main/README.md",
        "Issue Tracker": "https://github.com/LuqueDaniel/whisper2subs/issues",
        "Source Code": "https://github.com/LuqueDaniel/whisper2subs"
    },
    "split_keywords": [
        "whisper",
        "subs",
        "cli",
        "translate",
        "transcribe"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28f40e45122547db3186a42a3ee67ab89b91c47b0ed67669cea818d3b5528e57",
                "md5": "8f0e8fa87fbf8b2c0510f6b14d259636",
                "sha256": "8ca129e438ff05a0abd7ce0bce7349c4c33c4aff8177c067eb08c00f2a2565ea"
            },
            "downloads": -1,
            "filename": "whisper2subs-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f0e8fa87fbf8b2c0510f6b14d259636",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.8",
            "size": 6903,
            "upload_time": "2023-12-27T17:01:55",
            "upload_time_iso_8601": "2023-12-27T17:01:55.125836Z",
            "url": "https://files.pythonhosted.org/packages/28/f4/0e45122547db3186a42a3ee67ab89b91c47b0ed67669cea818d3b5528e57/whisper2subs-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b601a118cbb452f41fb7ee01bc19c316df22a77b2bd60421d9cd98a30e9409f3",
                "md5": "7e2fcc8b823878713046519ec1c6afb1",
                "sha256": "9487aa33171685d909bb8681e043d3a16088cdacea05f6c06eeb56b954779647"
            },
            "downloads": -1,
            "filename": "whisper2subs-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7e2fcc8b823878713046519ec1c6afb1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.8",
            "size": 6138,
            "upload_time": "2023-12-27T17:01:56",
            "upload_time_iso_8601": "2023-12-27T17:01:56.781793Z",
            "url": "https://files.pythonhosted.org/packages/b6/01/a118cbb452f41fb7ee01bc19c316df22a77b2bd60421d9cd98a30e9409f3/whisper2subs-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-27 17:01:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LuqueDaniel",
    "github_project": "whisper2subs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "whisper2subs"
}
        
Elapsed time: 0.15415s