{"id":15136572,"url":"https://github.com/botbahlul/whisper_autosrt","last_synced_at":"2025-10-23T11:31:44.493Z","repository":{"id":170088875,"uuid":"646213167","full_name":"botbahlul/whisper_autosrt","owner":"botbahlul","description":"A python script COMMAND LINE utility to AUTO GENERATE SUBTITLE FILE (using faster_whisper module which is a reimplementation of OpenAI Whisper module) and TRANSLATED SUBTITLE FILE (using unofficial online Google Translate API) for any video or audio file","archived":false,"fork":false,"pushed_at":"2024-05-05T17:05:46.000Z","size":208,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-30T18:06:13.528Z","etag":null,"topics":["auto-caption","auto-subtitle","caption","faster-whisper","ffmpeg","google-translate-api","openai","openai-whisper","python","speech-recognition","speechrecognition","subtitle","voice-recognition","voicerecognition","whisper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botbahlul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-27T16:44:51.000Z","updated_at":"2025-01-16T01:51:09.000Z","dependencies_parsed_at":"2023-05-28T15:00:13.446Z","dependency_job_id":"510cfa62-b6e2-4e61-b5da-01ac87373fdb","html_url":"https://github.com/botbahlul/whisper_autosrt","commit_stats":null,"previous_names":["botbahlul/whisper_autosrt"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fwhisper_autosrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fwhisper_autosrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fwhisper_autosrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fwhisper_autosrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botbahlul","download_url":"https://codeload.github.com/botbahlul/whisper_autosrt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237821600,"owners_count":19371794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-caption","auto-subtitle","caption","faster-whisper","ffmpeg","google-translate-api","openai","openai-whisper","python","speech-recognition","speechrecognition","subtitle","voice-recognition","voicerecognition","whisper"],"created_at":"2024-09-26T06:23:20.814Z","updated_at":"2025-10-23T11:31:39.172Z","avatar_url":"https://github.com/botbahlul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whisper_autosrt \u003ca href=\"https://pypi.python.org/pypi/whisper_autosrt\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/whisper_autosrt.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n  \n### Auto generate subtitle and translated subtitles files for any video / audio files\nwhisper_autosrt is a simple command line tool made with python to auto generate subtitle/closed caption for any video or audio files using faster_whisper module https://github.com/guillaumekln/faster-whisper which is a reimplementation of OpenAI's Whisper module and translate it automatically for free using a simple unofficial online Google Translate API.\n\n### Installation\nIf you don't have python on your Windows system you can try the compiled version from this git release assets\nhttps://github.com/botbahlul/whisper_autosrt/releases\n\nIf it doesn't run well then you need to install python on your Windows system.\n\nJust extract those ffmpeg.exe, ffprobe.exe, and whisper_autosrt.exe into a folder that has been added to PATH ENVIRONMENT for example in C:\\Windows\\system32 so you can execute them from any folder.\n\nYou can get latest version of ffmpeg from https://www.ffmpeg.org/\n\nIn Linux you have to install this script with python (version minimal 3.8.12) and install ffmpeg with your linux package manager, for example in debian based linux distribution you can type :\n\n```\nsudo apt update\nsudo apt install -y ffmpeg\n```\n\nTo install this whisper_autosrt, just type :\n```\npip install --upgrade whisper_autosrt\n```\n\nYou can try to compile that whisper_autosrt.py script in win/linux folder into a single executable file with pyinstaller by typing these :\n```\npip install pyinstaller\npyinstaller --onefile whisper_autosrt.py\n```\n\nThe executable compiled file will be placed by pyinstaller into dist subfolder of your current working folder, so you can just rename and put that compiled file into a folder that has been added to your PATH ENVIRONMENT so you can execute it from anywhere. \nBeware that on Linux system the compiled file could be very large (about 2.2GB) because pyinstaller will include all nvidia cuda driver on it.\n\nI was succesfuly compiled it on Windows 10 with pyinstaller-5.1 and Pyhton-3.10.4, and python-3.8.12 on Debian 9.\n\nAnother alternative way to install this script with python is by cloning this git (or downloading this git as zip then extract it into a folder), and then just type :\n\n```\npip install wheel\npython setup.py bdist_wheel\n```\n\nThen check the name of the whl file created in dist folder. In case the filename is whisper_autosrt-0.0.3-py2.py3-none-any.whl then you can install that whl file with pip :\n```\ncd dist\npip install whisper_autosrt-0.0.3-py2.py3-none-any.whl\n```\n\nYou can also install this script (or any pip package) in ANDROID DEVICES via PYTHON package in TERMUX APP.\n\nhttps://github.com/termux/termux-app/releases/tag/v0.118.0\n\nChoose the right apk for your device, install it, then open it\n\nType these commands to get python, pip, this whisper_autosrt, (and any other pip packages) :\n\n```\ntermux-setup-storage\npkg update -y\npkg install -y python\npkg install -y ffmpeg\npip install whisper_autosrt\n```\n\n### Simple usage example \n\n```\nwhisper_autosrt --list-src-languages\nwhisper_autosrt --list-dst-languages\nwhisper_autosrt -S zh -D en \"Episode 1.mp4\"\n```\n\nIf you don't know exactly what language spoken on the video/audio file, you can try to use \\'-S auto\\', so this app will try to auto detect the language.\n```\nwhisper_autosrt -S auto -D en \"\"Episode 1.mp4\"\"\n```\n\nFor multiple video/audio files you can use wildcard e.g:\n```\nwhisper_autosrt -S zh -D en C:\\Movies\\*.mp4\n```\n\nor separate them with space character e.g:\n```\nwhisper_autosrt -S zh -D en \"Episode 1.mp4\" \"Episode 2.mp4\"\n```\n\nIf you don't need translations just type :\n```\nwhisper_autosrt -S auto \"Episode 1.mp4\"\n```\n\n### Usage\n\n```\nusage: whisper_autosrt [-h] [-m MODEL_NAME] [-lm] [-d DEVICE] [-ld] [-ct COMPUTE_TYPE] [-lct] [-t CPU_THREADS] [-nw NUM_WORKERS]\n                       [-S SRC_LANGUAGE] [-D DST_LANGUAGE] [-lS] [-lD] [-F FORMAT] [-lF] [-c CONCURRENCY] [-es EMBED_SRC]\n                       [-ed EMBED_DST] [-fr FORCE_RECOGNIZE] [-v]\n                       [source_path ...]\n\npositional arguments:\n  source_path           Path to the video or audio files to generate subtitles files (use wildcard for multiple files or separate\n                        them with a space character e.g. \"file 1.mp4\" \"file 2.mp4\")\n\noptions:\n  -h, --help            show this help message and exit\n  -m MODEL_NAME, --model-name MODEL_NAME\n                        name of whisper model to use\n  -lm, --list-models    List of whisper models name\n  -d DEVICE, --device DEVICE\n                        name of the device to use\n  -ld, --list-devices   List of supported devices\n  -ct COMPUTE_TYPE, --compute-type COMPUTE_TYPE\n                        name of the compute type (quantization) to use\n  -lct, --list-compute-types\n                        List of supported compute types\n  -t CPU_THREADS, --cpu-threads CPU_THREADS\n                        Number of threads to use when running on CPU\n  -nw NUM_WORKERS, --num-workers NUM_WORKERS\n                        Number of concurrent calls when running whisper model\n  -S SRC_LANGUAGE, --src-language SRC_LANGUAGE\n                        Language code of the audio language spoken in video/audio source_path\n  -D DST_LANGUAGE, --dst-language DST_LANGUAGE\n                        Desired translation language code for the subtitles\n  -lS, --list-src-languages\n                        List all available src_languages (whisper supported languages)\n  -lD, --list-dst-languages\n                        List all available dst_languages (google translate supported languages)\n  -F FORMAT, --format FORMAT\n                        Desired subtitles format\n  -lF, --list-formats   List all supported subtitles formats\n  -c CONCURRENCY, --concurrency CONCURRENCY\n                        Number of concurrent calls for Google Translate API\n  -es EMBED_SRC, --embed-src EMBED_SRC\n                        Boolean value (True or False) for embedding original language subtitles file into video file\n  -ed EMBED_DST, --embed-dst EMBED_DST\n                        Boolean value (True or False) for embedding translated subtitles file into video file\n  -fr FORCE_RECOGNIZE, --force-recognize FORCE_RECOGNIZE\n                        Boolean value (True or False) for re-recognize media file event if it's already has subtitles stream\n  -v, --version         show program's version number and exit\n```\n\n### License\n\nMIT\n\nCheck my other SPEECH RECOGNITIION + TRANSLATE PROJECTS https://github.com/botbahlul?tab=repositories\n\nBuy me coffee : https://sociabuzz.com/botbahlul/tribe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotbahlul%2Fwhisper_autosrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotbahlul%2Fwhisper_autosrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotbahlul%2Fwhisper_autosrt/lists"}