Sign inSign up

cadic/whisper

By cadic

•Updated almost 4 years ago

Image
0

401

cadic/whisper repository overview

⁠

Whisper
(English/Japanese/Multi-lingual)

Modules⁠ • Code structure⁠ • Installing the application⁠ • Makefile commands⁠ • Environments⁠ • Dataset⁠• Running the application⁠• Notes⁠•

⁠Modules

At a granular level, whisper is a library that consists of the following components:

ComponentDescription
whisperSpeech Recognition package
whisper.inferwhisper Inference from audio files
whisper.testsUnittests

⁠Code structure

import os

import pkg_resources
from setuptools import setup, find_packages
from whisper import __version__

setup(
    name="whisper",
    py_modules=["whisper"],
    version=__version__,
    description="Robust Speech Recognition via Large-Scale Weak Supervision",
    long_description="".join(open("README.md", "r").readlines()),
    long_description_content_type="text/markdown",
    readme="README.md",
    python_requires=">=3.7",
    author="OpenAI, CADIC Jean Maximilien",
    include_package_data=True,
    package_data={"": ["*.flac", "*.txt", "*.json", "*.npz"]},
    url="https://github.com/openai/whisper",
    license="MIT",
    packages=find_packages(),
    install_requires=[
        str(r)
        for r in pkg_resources.parse_requirements(
            open(os.path.join(os.path.dirname(__file__), "requirements.txt"))
        )
    ],
    entry_points={
        "console_scripts": ["whisper=whisper.transcribe:cli"],
    },
)

⁠Installing the application

To clone and run this application, you'll need the following installed on your computer:

Install bpd:

# Clone this repository and install the code
git clone https://github.com/JeanMaximilienCadic/whisper

# Go into the repository
cd whisper

⁠Makefile commands

Exhaustive list of make commands:

build_dockers       # Build the docker images 
sandbox             # Launch a sandbox
tests               # Test the code

⁠Environments

Install PyTorch⁠ Install Nvidia Docker2⁠

⁠Docker

Note

Running this application by using Docker is recommended.

To build and run the docker image

make build_dockers
make sandbox

⁠PythonEnv

Warning

Running this application by using PythonEnv is possible but not recommended.

pip install dist/*.whl

⁠Test

make tests

⁠Pretrained model

python -m whisper.infer --audio_path <PATH TO AUDIO FILE (EN/JA/Others)>

⁠Acknowledgements

Thanks to Jong Wook Kim⁠ and OpenAI⁠ for their contributions!

This is a fork from https://github.com/openai/whisper⁠.

For any question please contact me at j.cadic[at]protonmail.ch lar

Tag summary

Content type

Image

Digest

sha256:11207a0b5…

Size

9.2 GB

Last updated

almost 4 years ago

docker pull cadic/whisper:sandbox-whisper_1.0.0