{"id":20317315,"url":"https://github.com/botbahlul/pyvosklivesubtitle","last_synced_at":"2025-07-27T21:38:52.546Z","repository":{"id":62477224,"uuid":"560706251","full_name":"botbahlul/pyvosklivesubtitle","owner":"botbahlul","description":"PySimpleGUI based DESKTOP APP that can RECOGNIZE any live streaming in 23 languages that supported by VOSK then TRANSLATE (using unofficial online Google Translate API) and display it as LIVE CAPTION / LIVE SUBTITLE","archived":false,"fork":false,"pushed_at":"2024-05-05T17:04:31.000Z","size":21759,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-28T17:34:54.537Z","etag":null,"topics":["auto-caption","caption","ffmpeg","google-translate-api","live-caption","live-subtitle","pysimplegui","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":"2022-11-02T04:33:13.000Z","updated_at":"2024-12-28T03:58:39.000Z","dependencies_parsed_at":"2024-05-05T18:35:57.882Z","dependency_job_id":null,"html_url":"https://github.com/botbahlul/pyvosklivesubtitle","commit_stats":{"total_commits":96,"total_committers":1,"mean_commits":96.0,"dds":0.0,"last_synced_commit":"69a6e4918a3d3d2bd7455ac366278ac4f1e66de7"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fpyvosklivesubtitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fpyvosklivesubtitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fpyvosklivesubtitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botbahlul%2Fpyvosklivesubtitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botbahlul","download_url":"https://codeload.github.com/botbahlul/pyvosklivesubtitle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248451678,"owners_count":21105912,"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","caption","ffmpeg","google-translate-api","live-caption","live-subtitle","pysimplegui","python","speech-recognition","speechrecognition","subtitle","voice-recognition","voicerecognition","vosk"],"created_at":"2024-11-14T18:30:55.167Z","updated_at":"2025-04-11T17:43:04.634Z","avatar_url":"https://github.com/botbahlul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyvosklivesubtitle \u003ca href=\"https://pypi.org/project/pyvosklivesubtitle/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/pyvosklivesubtitle.svg\"\u003e\u003c/img\u003e\u003c/a\u003e\r\n\r\n### PySimpleGUI based DESKTOP APP that can RECOGNIZE any LIVE STREAMING in 23 languages that supported by VOSK then TRANSLATE (using unofficial online Google Translate API) and display it as LIVE CAPTION / LIVE SUBTITLE\r\n\r\nhttps://github.com/botbahlul/pyvosklivesubtitle/assets/88623122/d7f4b9ab-d333-475a-a0d6-c70b3f9b8621\r\n\r\nThe speech recognition part is using vosk python module https://pypi.org/project/vosk/\r\n```\r\npip install --upgrade vosk\r\n```\r\n\r\nOn the older versions (bellow 0.0.11) the translation part is using googletrans=4.0.04c1 and pygoogletranslation module https://github.com/Saravananslb/py-googletranslation, but since version 0.0.11 I decide to use my own simple translate function.\r\n\r\nThe GUI part is using pysimplegui https://github.com/PySimpleGUI/PySimpleGUI\r\n```\r\npip install --upgrade pysimplegui\r\n```\r\n\r\n### Installation\r\n```\r\npip install --upgrade pyvosklivesubtitle\r\n```\r\n\r\nthen you can run it by just type :\r\n```\r\npyvosklivesubtitle\r\n```\r\n\r\nIf you don't have python on your OS you can try compiled version from this release page assets.\r\n\r\nIf it doesn't run well then you need to install python on your Windows system.\r\n\r\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).\r\n\r\nYou can always download those small models manually from https://alphacephei.com/vosk/models then extract them to that used folder.\r\n\r\nYou can try to compile that script in win folder (if your OS is Windows) or linux folder (if your OS is Linux) into a single executable file with pyinstaller:\r\n```\r\npip install pyinstaller\r\npyinstaller --onefile pyvls.py\r\n```\r\nThe executable compiled file will be placed by pyinstaller into dist subfolder of your current working folder, then you can just put that compiled exe file into a folder that has been added to your PATH ENVIRONTMENT so you can execute it from anywhere.\r\n\r\nNOTES :\r\n\r\nSTART FROM VERSION 0.1.2 THIS APP USE streamlink MODULE WHICH SUPPORTS urllib3 \u003e= 1.26, \u003c 3.x BRANCH, SO IF YOU'RE STILL WANT TO INSTALL THIS APP TRY TO REINSTALL streamlink WITH --force-reinstall ARGUMENT.\r\n\r\n```\r\npip install streamlink --force-reinstall\r\n```\r\n\r\nSTART FROM VERSION 0.1.2 YOU SHOULD USE THAT \"mypyinstaller.bat\" (or \"mypyinstaller.sh\" IF YOU'RE ON LINUX) TO COMPILE WITH pyinstaller.\r\n\r\nTHAT \"streamlink\" MODULE FOLDER MUST BE ON SAME FOLDER WITH \"pyvls.pyw\" and \"mypyinstaller.bat\", OR YOU CAN CHANGE THE LOCATION FOLDER BY EDITING \"mypyinstaller.bat\".\r\n\r\nDONT FORGET TO PLACE THOSE LIBS FILES FROM VOSK (libgcc_s_seh-1.dll, libstdc++-6.dll, libvosk.dll, \u0026 libwinpthread-1.dll if your OS is Windows, libvosk.so if your OS is Linux) INTO SAME FOLDER WITH COMPILED EXE FILE!\r\n\r\nALSO NOTE THAT SINCE VERSION 0.1.2 THIS APP NEED ffmpeg AND ffprobe, you can get it from https://www.ffmpeg.org/\r\n\r\nIN DEBIAN BASED LINUX OS YOU CAN INSTALL IT WITH :\r\n\r\n```\r\nsudo apt update\r\nsudo apt install -y ffmpeg\r\n```\r\n\r\nI was succesfuly compiled this script in Windows 10 with pyinstaller-5.1 and Pyhton-3.10.4, and python-3.8.12 in Debian 9\r\n\r\nAnother alternative way you can install this script with python by cloning this git (or downloading this git as zip then extract it into \r\na folder), and then just type :\r\n\r\n```\r\npython setup.py build\r\npython setup.py install\r\n```\r\n\r\nIf you fail when installing any python modules using pip, you can always use this way, get that module from github then build them manually\r\n\r\nFor best recognizing performance, on windows you will need STEREO MIX or VIRTUAL AUDIO CABLE as RECORDING/INPUT DEVICE \r\n![image](https://github.com/botbahlul/pyvosklivesubtitle/assets/88623122/e08b4b85-45cb-477b-a7f8-297d94791839)\r\n![image](https://user-images.githubusercontent.com/88623122/199527559-e2609d8c-3479-420d-8c52-806fa56a21f4.png)\r\n![image](https://user-images.githubusercontent.com/88623122/199528286-1ab77dc4-38a9-41f2-9b92-25db352a1ed2.png)\r\n\r\nLAUNCH Audio Repeater MME, NOT Audio Repeater KS! AND THEN CLICK THAT START BUTTON AND MINIMIZE IT, DON'T CLOSE IT!\r\n\r\n![image](https://github.com/botbahlul/pyvosklivesubtitle/assets/88623122/6b09c622-7a76-42af-a776-738468466025)\r\n\r\n\r\nand on linux you willl need PAVUCONTROL (by choosing MONITOR of your audio device as INPUT DEVICE)\r\n![image](https://user-images.githubusercontent.com/88623122/231320153-e89bb21e-916f-4e82-a520-43e3112f6801.png)\r\n![image](https://user-images.githubusercontent.com/88623122/230965838-40764e2a-8ce9-4a03-9f8b-901c9eae43ef.png)\r\n\r\n\r\nTo DRAG/MOVE that TRANSLATION TEXT anywhere on the screen, just USE CONTROL KEY + LEFT MOUSE combination.\r\n\r\n\r\nANOTHER NOTES, DON'T FORGET TO CHANGE YOUR CONSOLE (COMMAND PROMPT WINDOW) CODE PAGE TO 65001 (UTF-8)!\r\n\r\n```\r\nTo change the codepage for the console, do the following:\r\n\r\nStart -\u003e Run -\u003e regedit\r\nGo to [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Command Processor\\Autorun]\r\nChange the value to @chcp 65001\u003enul\r\nIf Autorun is not present, you can add a New String\r\n```\r\n![image](https://github.com/botbahlul/pyvosklivesubtitle/assets/88623122/f0a97679-d01a-4e55-b5cd-90530c4026cd)\r\n\r\n\r\n### Usage\r\n\r\n```\r\nusage: pyvosklivesubtitle [-h] [-S SRC_LANGUAGE] [-D DST_LANGUAGE] [-lls] [-lld] [-sf SUBTITLE_FILENAME] [-F SUBTITLE_FORMAT] [-lsf]\r\n                          [-ld] [-af AUDIO_FILENAME] [-d DEVICE] [-r SAMPLERATE] [-u URL] [-vf VIDEO_FILENAME] [-v]\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -S SRC_LANGUAGE, --src-language SRC_LANGUAGE\r\n                        Spoken language\r\n  -D DST_LANGUAGE, --dst-language DST_LANGUAGE\r\n                        Desired language for translation\r\n  -lls, --list-src-languages\r\n                        List all available source languages\r\n  -lld, --list-dst-languages\r\n                        List all available destination languages\r\n  -sf SUBTITLE_FILENAME, --subtitle-filename SUBTITLE_FILENAME\r\n                        Subtitle file name for saved transcriptions\r\n  -F SUBTITLE_FORMAT, --subtitle-format SUBTITLE_FORMAT\r\n                        Desired subtitle format for saved transcriptions (default is \"srt\")\r\n  -lsf, --list-subtitle-formats\r\n                        List all available subtitle formats\r\n  -ld, --list-devices   show list of audio devices and exit\r\n  -af AUDIO_FILENAME, --audio-filename AUDIO_FILENAME\r\n                        audio file to store recording to\r\n  -d DEVICE, --device DEVICE\r\n                        input device (numeric ID or substring)\r\n  -r SAMPLERATE, --samplerate SAMPLERATE\r\n                        sampling rate in Hertz for example 8000, 16000, 44100, or 48000\r\n  -u URL, --url URL     URL of live streaming if you want to record the streaming\r\n  -vf VIDEO_FILENAME, --video-filename VIDEO_FILENAME\r\n                        video file to store recording to\r\n  -v, --version         show program's version number and exit\r\n```\r\n\r\nThose command line switches are just to make this application directly select the language in combo box, so it's okay if you don't use them\r\n\r\n### License\r\n\r\nMIT\r\n\r\nCheck my other SPEECH RECOGNITIION + TRANSLATE PROJECTS https://github.com/botbahlul?tab=repositories\r\n\r\nBuy me coffee : https://sociabuzz.com/botbahlul/tribe\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotbahlul%2Fpyvosklivesubtitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotbahlul%2Fpyvosklivesubtitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotbahlul%2Fpyvosklivesubtitle/lists"}