{"id":19107029,"url":"https://github.com/paulocoutinhox/py-transcriptor-ai","last_synced_at":"2025-09-08T05:33:28.065Z","repository":{"id":198688011,"uuid":"701322243","full_name":"paulocoutinhox/py-transcriptor-ai","owner":"paulocoutinhox","description":"PyTranscriptorAi - Transcript videos to text with Ai and add subtitles - OpenAi","archived":false,"fork":false,"pushed_at":"2023-10-06T12:09:44.000Z","size":91,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-09T04:10:31.432Z","etag":null,"topics":["ai","openai","subtitles","transcript","video","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/paulocoutinhox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"paulocoutinhox","ko_fi":"paulocoutinho"}},"created_at":"2023-10-06T11:56:08.000Z","updated_at":"2024-09-01T08:32:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5907e58-6777-44f4-8e0d-30e8c35765a6","html_url":"https://github.com/paulocoutinhox/py-transcriptor-ai","commit_stats":null,"previous_names":["paulocoutinhox/py-transcriptor-ai"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fpy-transcriptor-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fpy-transcriptor-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fpy-transcriptor-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulocoutinhox%2Fpy-transcriptor-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulocoutinhox","download_url":"https://codeload.github.com/paulocoutinhox/py-transcriptor-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232282923,"owners_count":18499331,"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":["ai","openai","subtitles","transcript","video","whisper"],"created_at":"2024-11-09T04:10:35.254Z","updated_at":"2025-01-03T03:11:57.781Z","avatar_url":"https://github.com/paulocoutinhox.png","language":"Python","funding_links":["https://github.com/sponsors/paulocoutinhox","https://ko-fi.com/paulocoutinho"],"categories":[],"sub_categories":[],"readme":"# PyTranscriptorAi - Transcript videos to text with Ai and add subtitles\n\n[![Movie Generated From Ai](https://github.com/paulocoutinhox/py-transcriptor-ai/actions/workflows/build.yml/badge.svg)](https://github.com/paulocoutinhox/py-transcriptor-ai/actions/workflows/build.yml)\n\nThis is a nice software that generate subtitles for a video using Ai.\n\nWhat is included in my process:\n\n- MoviePy to extract the audio from video\n- A service to transcript the video to text (speech to text)\n- A small logic to generate subtitles in a nice way\n- MoviePy to add subtitles to video and generate final movie\n- Video is built and released from Github CI/CD (actions)\n\n## How to install\n\n1. Python3: `https://www.python.org/`\n2. ImageMagick: `https://imagemagick.org/`\n3. Python dependencies: `python3 -m pip install -r requirements.txt`\n\n## How to use with Whisper\n\nInstall the Whisper dependencies: `python3 -m pip install whisper-ctranslate2`.\n\nCopy your video to path: `temp/movie.mp4`.\n\nRun in terminal these three commands for each time that your need add subtitles to your file `temp/movie.mp4`:\n\n```\npython3 extract.py\npython3 transcript-whisper.py\npython3 generate.py\n```\n\n## How to use with AssemblyAi\n\nInstall the AssemblyAi dependencies: `python3 -m pip install assemblyai`.\n\nGet a key for AssemblyAi API: `https://www.assemblyai.com/`.\n\nAdd the key for AssemblyAi to your environment variable `ASSEMBLYAI_KEY`:\n\n```\nexport ASSEMBLYAI_KEY=\"your-key-here\"\n```\n\nCopy your video to path: `temp/movie.mp4`.\n\nRun in terminal these three commands for each time that your need add subtitles to your file `temp/movie.mp4`:\n\n```\npython3 extract.py\npython3 transcript-assemblyai.py\npython3 generate.py\n```\n\n## Sample\n\nhttps://github.com/paulocoutinhox/py-transcriptor-ai/assets/395096/eafa7385-1fdd-447f-9711-210c3b722d3c\n\n## Speed up video\n\nIf you need speed up your final video file, install `ffmpeg`` and run one of these commands for the desired speed:\n\n**Speed 1.2:**\n\n```\nffmpeg -i temp/movie-out.mp4 -filter_complex \"[0:v]setpts=0.8333*PTS[v];[0:a]atempo=1.2[a]\" -map \"[v]\" -map \"[a]\" -c:a mp3 temp/movie_1_2x_with_audio.mp4\n```\n\n**Speed 1.5:**\n\n```\nffmpeg -i temp/movie-out.mp4 -filter_complex \"[0:v]setpts=0.6667*PTS[v];[0:a]atempo=1.5[a]\" -map \"[v]\" -map \"[a]\" -c:a mp3 temp/movie_1_5x_with_audio.mp4\n```\n\n**Speed 1.75:**\n\n```\nffmpeg -i temp/movie-out.mp4 -filter_complex \"[0:v]setpts=0.5714*PTS[v];[0:a]atempo=1.75[a]\" -map \"[v]\" -map \"[a]\" -c:a mp3 temp/movie_1_75x_with_audio.mp4\n```\n\n**Speed 2.0:**\n\n```\nffmpeg -i temp/movie-out.mp4 -filter_complex \"[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]\" -map \"[v]\" -map \"[a]\" -c:a mp3 temp/movie_2x_with_audio.mp4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulocoutinhox%2Fpy-transcriptor-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulocoutinhox%2Fpy-transcriptor-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulocoutinhox%2Fpy-transcriptor-ai/lists"}