{"id":20317291,"url":"https://github.com/botbahlul/vosk_autosrt","last_synced_at":"2025-10-28T21:08:22.667Z","repository":{"id":171555986,"uuid":"647918809","full_name":"botbahlul/vosk_autosrt","owner":"botbahlul","description":"A python script COMMAND LINE utility to AUTO GENERATE SUBTITLE FILE (using free Vosk Speech Recognition API) 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:23.000Z","size":21069,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-25T13:45:39.504Z","etag":null,"topics":["auto-caption","auto-subtitle","caption","ffmpeg","google-translate-api","python","speech-recognition","speechrecognition","subtitle","voice-recognition","voicerecognition","vosk"],"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-31T20:08:38.000Z","updated_at":"2024-10-15T15:43:32.000Z","dependencies_parsed_at":"2024-11-14T18:42:46.751Z","dependency_job_id":null,"html_url":"https://github.com/botbahlul/vosk_autosrt","commit_stats":null,"previous_names":["botbahlul/vosk_autosrt"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fvosk_autosrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fvosk_autosrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fvosk_autosrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fvosk_autosrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botbahlul","download_url":"https://codeload.github.com/botbahlul/vosk_autosrt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353729,"owners_count":20925329,"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","ffmpeg","google-translate-api","python","speech-recognition","speechrecognition","subtitle","voice-recognition","voicerecognition","vosk"],"created_at":"2024-11-14T18:30:45.058Z","updated_at":"2025-10-20T11:07:56.665Z","avatar_url":"https://github.com/botbahlul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vosk_autosrt \u003ca href=\"https://pypi.python.org/pypi/vosk_autosrt\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/vosk_autosrt.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\n  \n### Auto-generated subtitles for any video/audio files\nvosk_autosrt is a simple command line tool made with python to auto generate subtitle/closed caption file for any video or audio file using VOSK API and translate it automaticly for free using unofficial 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/vosk_autosrt/releases\n\nJust extract those ffmpeg.exe, ffprobe.exe, and vosk_autosrt.exe into a folder that has been added to PATH ENVIRONMENT for example in C:\\Windows\\system32\n\nIf it doesn't run well then you need to install python on your Windows system\n\nYou can get latest version of ffmpeg and ffprobe from https://www.ffmpeg.org/\n\nIn Linux you have to install this script with python (version minimal 3.8) and install ffmpeg with your linux package manager for example in debian based linux distribution you can type :\n\n```\napt update\napt install -y ffmpeg\n```\n\nTo install this vosk_autosrt, just type :\n```\npip install vosk_autosrt\n```\n\nWhen you run this app for the very first time it may takes some times to download vosk language model, you can check those  downloaded models in \"/home/username/.cache/vosk\" (if you're on Linux) and \"C:\\\\Users\\\\Username\\\\.cache\\vosk\\\\\" (if you're on Windows).\n\nYou can always download those small models manually from https://alphacephei.com/vosk/models then extract them to that used folder.\n\nDON'T FORGET TO CHANGE YOUR CONSOLE (COMMAND PROMPT WINDOW) CODE PAGE TO 65001 (UTF-8)!\n\n```\nTo change the codepage for the console, do the following:\n\nStart -\u003e Run -\u003e regedit\nGo to [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Command Processor\\Autorun]\nChange the value to @chcp 65001\u003enul\nIf Autorun is not present, you can add a New String\n```\n![image](https://github.com/botbahlul/pyvosklivesubtitle/assets/88623122/f0a97679-d01a-4e55-b5cd-90530c4026cd)\n\nYou can try to compile that vosk_autosrt.py script in win/linux/mac folder into a single executable file with that mypyinstaller.bat (on windows)/mypyinstaller.sh (on linux/macos):\n```\npip install pyinstaller\nmypyinstaller.bat\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 ENVIRONTMENT so you can execute it from anywhere\n\nI was succesfuly compiled it in Windows 10 with pyinstaller-5.1 and Pyhton-3.10.4, and python-3.8.12 in 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\ncd vosk_autosrt\npython setup.py bdist_wheel\n```\n\nThen check the name of the whl file created in dist folder. In case the filename is vosk_autosrt-0.0.2-cp310-cp310-win_amd64.whl then you can install that whl file with pip :\n```\ncd dist\npip install vosk_autosrt-0.0.2-cp310-cp310-win_amd64.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 vosk_autosrt, (and any other pip packages) :\n\n```\ntermux-setup-storage\npkg update -y\npkg install -y python\npkg install -y ffmpeg\npip install vosk_autosrt\n```\n\n### Simple usage example \n\n```\nvosk_autosrt --list-src-languages\nvosk_autosrt -S zh -D en \"Episode 1.mp4\"\n```\n\nIf you don't need translations just type :\n```\nvosk_autosrt -S zh \"Episode 1.mp4\"\n```\n\n### Usage\n\n```\nusage: vosk_autosrt [-h] [-S SRC_LANGUAGE] [-D DST_LANGUAGE] [-lls] [-lld] [-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  -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  -lls, --list-src-languages\n                        List all available source languages (vosk supported languages)\n  -lld, --list-dst-languages\n                        List all available destination languages (google translate supported languages)\n  -F FORMAT, --format FORMAT\n                        Desired subtitle format\n  -lf, --list-formats   List all supported subtitle formats\n  -C CONCURRENCY, --concurrency CONCURRENCY\n                        Number of concurrent translate API requests to make\n  -es EMBED_SRC, --embed-src EMBED_SRC\n                        Boolean value (True or False) for embedding original language subtitle file into media file\n  -ed EMBED_DST, --embed-dst EMBED_DST\n                        Boolean value (True or False) for embedding translated subtitle file into media 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\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%2Fvosk_autosrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotbahlul%2Fvosk_autosrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotbahlul%2Fvosk_autosrt/lists"}