{"id":27153430,"url":"https://github.com/tankengine-ish/media_processing_script","last_synced_at":"2025-04-08T16:16:57.066Z","repository":{"id":219769505,"uuid":"749087451","full_name":"TankEngine-ish/media_processing_script","owner":"TankEngine-ish","description":"Python Script for Generating Captions + Audio Extracting [personal project]","archived":false,"fork":false,"pushed_at":"2025-03-05T22:06:21.000Z","size":99,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T23:19:46.827Z","etag":null,"topics":["assembly-ai","ffmpeg-script"],"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/TankEngine-ish.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-01-27T14:55:01.000Z","updated_at":"2025-03-05T22:06:24.000Z","dependencies_parsed_at":"2025-03-05T23:19:50.491Z","dependency_job_id":"b97f7032-254c-475f-9186-8140a56f14ea","html_url":"https://github.com/TankEngine-ish/media_processing_script","commit_stats":null,"previous_names":["tankengine-ish/media_processing_script"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Fmedia_processing_script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Fmedia_processing_script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Fmedia_processing_script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TankEngine-ish%2Fmedia_processing_script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TankEngine-ish","download_url":"https://codeload.github.com/TankEngine-ish/media_processing_script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247878016,"owners_count":21011158,"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":["assembly-ai","ffmpeg-script"],"created_at":"2025-04-08T16:16:56.538Z","updated_at":"2025-04-08T16:16:57.058Z","avatar_url":"https://github.com/TankEngine-ish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media Processing Script\n\n\n## Part 1 - Generating captions for your video\n\n\nThis simple Python script's main purpose is to generate captions for your video file\nusing Assembly AI's model to understand and transcribe speech. It's actually insanely impressive\nhow accurate it is in extracting the words from a voice with heavy accent like mine.\n\nThis is the first .srt file I generated for one of my portfolio videos.\n\n![Alt text](\u003cImages/Screenshot from 2024-01-29 17-05-18.png\u003e)\n\n## Part 2 - Extracting the audio from your video file\n\nIt's worth noting that the larger your video file the longer it would take for the \ncaption generator to create them.\n\nThat's why I've added a video to audio extraction part of my script with the FFMPEG library to help you quicken the whole process. You can comment it out if not needed.\n\n## Part 3 - How to Run it\n\n\n- Make sure you have python installed:\n\n```\npython3 --version\n```\n\n- Then install the requried package:\n\n```\npip install assemblyai\n```\n\n- Then grab the FFmpeg software:\n\n```\nsudo apt update \u0026\u0026 sudo apt install ffmpeg\n```\n\n- Before running the script, update the following placeholders inside with your actual values:\n\nSet your AssemblyAI API Key:\n\n```\naai.settings.api_key = \"\u003cyour API key from Assembly AI\u003e\"\n```\n\nThen provide the desired file paths:\n\n```\nconvert_video_to_audio(\"\u003cpath to your video\u003e\", \"\u003cpath to your audio file\u003e\")\n```\n\n- Finally, go to the script's directory and run it:\n\n```\npython3 sub_generator.py\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftankengine-ish%2Fmedia_processing_script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftankengine-ish%2Fmedia_processing_script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftankengine-ish%2Fmedia_processing_script/lists"}