Uses whisper AI to transcribe speach from video and audio files. Also accepts urls for youtube, rumble, bitchute, clear file, etc.
Project description
transcribe-anything
Input a local file or url and this service will transcribe it using Whisper AI into subtitle files and raw text.
Uses whisper AI so this is state of the art translation service - completely free. 🤯🤯🤯
If you install from PYPI then by default it will install the CPU version only.
To enable the GPU version, you *must install by cloning the github and running install_cuda.sh
script, due to security lockdowns that can't be bypassed (pypi only allows dependencies within the ecosystem). Please note that whatever torch version you have will be purged with install_cuda.sh
script.
Usage
> pip install transcribe-anything
> transcribe_anything <YOUTUBE_URL>
# Outputs the srt, vtt and txt files in YOUTUBE_URL/out.vtt
> transcribe_anything <LOCAL.MP4/MP3/WAV>
# Same but in LOCAL/out.vtt ...
Build Status
Install CPU Version
If you want GPU acceleration then you need special installation instructions:
> git clone https://github.com/zackees/transcribe-anything
> cd transcribe_anything
> ./install_cuda.sh # will uninstall torch and replace with torch+cuda 1.12.0
# Should now be installed
> transcribe_anything https://www.youtube.com/watch?v=dQw4w9WgXcQ
Develop
Works for Ubuntu/MacOS/Win32(in git-bash) This will create a virtual environment
> cd transcribe_anything
> ./install_dev.sh
# Enter the environment:
> source activate.sh
The environment is now active and the next step will only install to the local python. If the terminal
is closed then to get back into the environment cd transcribe_anything
and execute source activate.sh
Required: Install to current python environment
pip install transcribe-anything
- The command
transcribe_anything
will magically become available.
- The command
transcribe_anything <YOUTUBE_URL>
Tech Stack
- OpenAI whisper
- yt-dlp: https://github.com/yt-dlp/yt-dlp
- static-ffmpeg
Testing
- All tests are run by
tox
, simply go to the project directory root and run it.
Versions
- 2.0.4: Fix bad filename on trailing urls ending with /, adds --keep-audio
- 2.0.3: GPU support is now added. Run the
install_cuda.sh
script to enable. - 2.0.2: Minor cleanup of file names (no more out.mp3.txt, it's now out.txt)
- 2.0.1: Fixes missing dependencies and adds whisper option.
- 2.0.0: New! Now a front end for Whisper ai!
Project details
Release history Release notifications | RSS feed
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 transcribe-anything-2.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eac6c07089d610a4636c23c62830ac7da286c630585a081dcea4c62f792bf7a |
|
MD5 | 4f42d13db38f064a87a9ae9b3aba2aa6 |
|
BLAKE2b-256 | b59fc339e74a67495d32863f2c3be1be51eda3eb74fcd7fa8ac500c86cbefede |
Hashes for transcribe_anything-2.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 710c462053cc28a92e98abc60c75312bf45ab8d139fd33801d7a4acd70336732 |
|
MD5 | a4c831a2283dfb76985c8f0c8e34f336 |
|
BLAKE2b-256 | 3023229950515c899e4d260d1da9b6bbfb1d8e3756f8dac3b2effab8b8b19604 |