{"id":18043251,"url":"https://github.com/javi-cc/python-openai-generator-srt","last_synced_at":"2026-04-05T20:31:41.517Z","repository":{"id":260098594,"uuid":"880173209","full_name":"JAVI-CC/python-openai-generator-srt","owner":"JAVI-CC","description":"Application that works offline written in python that transcribes and translates either audio or video files into text to generate a subtitle file (.srt) using deep learning libraries such as openai-whisper and argos-translate.","archived":false,"fork":false,"pushed_at":"2024-11-08T17:39:21.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T02:43:13.420Z","etag":null,"topics":["argos-translate","docker","docker-compose","dockerfile","offline","openai","openai-whisper","python","whisper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JAVI-CC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-29T08:56:05.000Z","updated_at":"2024-11-08T17:39:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c1388b1-832c-41f3-8bb6-6cb39d071fc5","html_url":"https://github.com/JAVI-CC/python-openai-generator-srt","commit_stats":null,"previous_names":["javi-cc/python-openai-generator-srt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2Fpython-openai-generator-srt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2Fpython-openai-generator-srt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2Fpython-openai-generator-srt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JAVI-CC%2Fpython-openai-generator-srt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JAVI-CC","download_url":"https://codeload.github.com/JAVI-CC/python-openai-generator-srt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280181,"owners_count":20912965,"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":["argos-translate","docker","docker-compose","dockerfile","offline","openai","openai-whisper","python","whisper"],"created_at":"2024-10-30T17:07:40.757Z","updated_at":"2025-12-30T23:07:49.539Z","avatar_url":"https://github.com/JAVI-CC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python OpenAI Generator Srt\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"403\" src=\"static/readme/logo_python_openapi.png\" alt=\"OpenAI_Whisper\"\u003e\n\u003c/p\u003e\n\n---\n\n\u003cspan\u003eApplication that works offline written in python that transcribes and translates either audio or video files into text to generate a subtitle file (.srt) using deep learning libraries such as openai-whisper and argos-translate that contains the following functionalities:\u003c/span\u003e\n\n\u003cul\u003e\n  \u003cli\u003eAudio to text transcriptions using the \u003ca href=\"https://github.com/openai/whisper\" target=\"_blank\"\u003eOpenAI Whisper\u003c/a\u003e library.\u003c/li\u003e\n  \u003cli\u003eLanguage selection for text translation using the \u003ca href=\"https://github.com/argosopentech/argos-translate\" target=\"_blank\"\u003eArgos translate\u003c/a\u003e library.\u003c/li\u003e\n  \u003cli\u003eVideo to audio converter using the \u003ca href=\"https://github.com/Zulko/moviepy\" target=\"_blank\"\u003eMoviePy\u003c/a\u003e library.\u003c/li\u003e\n  \u003cli\u003eSelecting options using command line interface\u003c/li\u003e\n  \u003cli\u003eException handling.\u003c/li\u003e\n  \u003cli\u003eEnums.\u003c/li\u003e\n  \u003cli\u003eFile Storage.\u003c/li\u003e\n  \u003cli\u003eSeeder are in JSON format.\u003c/li\u003e\n  \u003cli\u003eEnvironment Variable\u003c/li\u003e\n  \u003cli\u003ePython 3.12\u003c/li\u003e\n  \u003cli\u003eThe project contains the files to deploy it in Docker.\u003c/li\u003e \n\u003c/ul\u003e\n\n\u003ch3\u003eScreenshots CLI\u003c/h3\u003e\n\u003cimg src=\"static/readme/screen_1.png\" alt=\"screen1\"\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=\"static/readme/screen_2.png\" alt=\"screen2\"\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=\"static/readme/screen_3.png\" alt=\"screen3\"\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cimg src=\"static/readme/screen_4.png\" alt=\"screen4\"\u003e\n\n\u003ch3\u003eLanguages available default\u003c/h3\u003e\n\u003cp\u003eYou can add the languages ​​you want to translate by modifying the \u003ca href=\"https://github.com/JAVI-CC/python-openai-generator-srt/blob/main/Dockerfile\" target=\"_blank\"\u003eDockerfile\u003c/a\u003e and \u003ca href=\"https://github.com/JAVI-CC/python-openai-generator-srt/blob/main/app/dependencies/argos_translate/languages_available.json\" target=\"_blank\"\u003elanguages_available.json\u003c/a\u003e file.\u003c/p\u003e\n\u003cp\u003eIt also contains the option to translate by the same language.\u003c/p\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eTo\u003c/th\u003e\n\u003cth\u003eFrom\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eEnglish\u003c/td\u003e\n\u003ctd\u003eSpanish\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSpanish\u003c/td\u003e\n\u003ctd\u003eEnglish\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n\u003ch3\u003eFile storage\u003c/h3\u003e\n\u003cp\u003eThe supported formats for both audio and video files can be modified in the \u003ca href=\"https://github.com/JAVI-CC/python-openai-generator-srt/blob/main/app/enums/file_type.py\" target=\"_blank\"\u003efile_type.py\u003c/a\u003e.\u003c/p\u003e\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003ePath\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eSupported formats\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eAudios\u003c/td\u003e\n\u003ctd\u003edata/audios\u003c/td\u003e\n\u003ctd\u003eDirectory to save the audio files to later select and generate the subtitles.\u003c/td\u003e\n\u003ctd\u003e\n\u003cul\u003e\n\u003cli\u003e.mp3\u003c/li\u003e\n\u003cli\u003e.ogg\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eVideos\u003c/td\u003e\n\u003ctd\u003edata/videos\u003c/td\u003e\n\u003ctd\u003eDirectory to save video files that you can then select, convert into an audio file and generate subtitles.\u003c/td\u003e\n\u003ctd\u003e\n\u003cul\u003e\n\u003cli\u003e.mp4\u003c/li\u003e\n\u003cli\u003e.mov\u003c/li\u003e\n\u003cli\u003e.wmv\u003c/li\u003e\n\u003cli\u003e.avi\u003c/li\u003e\n\u003cli\u003e.avchd\u003c/li\u003e\n\u003cli\u003e.flv\u003c/li\u003e\n\u003cli\u003e.mkv\u003c/li\u003e\n\u003cli\u003e.webm\u003c/li\u003e\n\u003cli\u003e.html5\u003c/li\u003e\n\u003cli\u003e.mpeg-2\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSubtitles\u003c/td\u003e\n\u003ctd\u003edata/subtitles\u003c/td\u003e\n\u003ctd\u003eOnce the subtitles have been generated in .srt format, the result will be saved in the data/subtitles folder.\u003c/td\u003e\n\u003ctd\u003e\n\u003cul\u003e\n\u003cli\u003e.srt\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003chr\u003e\n\n\u003ch3\u003eRecommended requirements\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eUse an Nvidia graphics card that supports \u003ca href=\"https://developer.nvidia.com/cuda-toolkit\" target=\"_blank\"\u003eCUDA\u003c/a\u003e to run the application as it will significantly reduce the transcription process compared to the CPU.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch3\u003eSetup\u003c/h3\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ apt-get install ffmpeg\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ git clone https://github.com/JAVI-CC/python-openai-generator-srt\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ cd python-openai-generator-srt\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ cp .env.example .env # optional\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ pip install --no-cache-dir --upgrade -r requirements.txt\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e# Install translation languages\u003c/code\u003e\n\u003ccode\u003e$ argospm install translate-en_es\u003c/code\u003e\n\u003ccode\u003e$ argospm install translate-es_en\u003c/code\u003e\n\u003c/pre\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ python app/main.py\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003ch2\u003eConfigure values in the .env file (Optional)\u003c/h2\u003e\n\n\u003cpre\u003e\u003ccode\u003e\u003cstrong\u003e# [tiny, base, small, medium, large, turbo]\u003c/strong\u003e\n\u003cstrong\u003eWHISPER_LOAD_MODEL=\"medium\"\u003c/strong\u003e\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003chr\u003e\n\n\u003cbr\u003e\n\n\u003ch2\u003eDeploy to Docker \u003cg-emoji class=\"g-emoji\" alias=\"whale\" fallback-src=\"https://github.githubassets.com/images/icons/emoji/unicode/1f433.png\"\u003e🐳\u003c/g-emoji\u003e\u003c/h2\u003e\n\n\u003cspan\u003eDocker repository: \u003ca href=\"https://hub.docker.com/r/javi98/python-openai-generator-srt\" target=\"_blank\"\u003ehttps://hub.docker.com/r/javi98/python-openai-generator-srt\u003c/a\u003e\u003c/span\u003e\n\n\u003ch4\u003eRequirements\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003eDocker installed on your machine.\u003c/li\u003e\n\u003cli\u003eA machine with an NVIDIA GPU that supports CUDA.\u003c/li\u003e\n\u003cli\u003eInstall the \u003ca href=\"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/1.16.2/install-guide.html\" target=\"_blank\"\u003eNVIDIA Container Toolkit\u003c/a\u003e to be able to use the GPU in a docker container.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch4\u003eContainers:\u003c/h4\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cspan\u003envidia/cuda:12.5.1-base-ubuntu20.04\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch4\u003eContainers structure:\u003c/h4\u003e\n\u003cdiv class=\"highlight highlight-source-shell\"\u003e\u003cpre\u003e├── python-openai-generator-srt-app\u003c/pre\u003e\u003c/div\u003e\n\n\u003ch4\u003eSetup:\u003c/h4\u003e\n\u003cpre\u003e\n\u003ccode\u003e$ git clone https://github.com/JAVI-CC/python-openai-generator-srt\n$ cd python-openai-generator-srt\n$ cp .env.example .env # optional\n$ docker compose up -d\n$ docker compose exec app python3 /code/app/app/main.py\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003cbr\u003e\n\n\u003cspan\u003eOnce you have the containers deployed, You will be shown the CLI to choose the file and language you want to generate the srt file in.\u003c/span\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavi-cc%2Fpython-openai-generator-srt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavi-cc%2Fpython-openai-generator-srt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavi-cc%2Fpython-openai-generator-srt/lists"}