{"id":30692899,"url":"https://github.com/pytlicek/videogentts","last_synced_at":"2025-09-02T05:06:38.636Z","repository":{"id":227088990,"uuid":"770418016","full_name":"Pytlicek/VideoGenTTS","owner":"Pytlicek","description":"Video Generation Script with Text-to-Speech","archived":false,"fork":false,"pushed_at":"2024-03-11T14:35:04.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-01T07:31:49.940Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Pytlicek.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}},"created_at":"2024-03-11T14:15:35.000Z","updated_at":"2024-03-11T14:18:01.000Z","dependencies_parsed_at":"2024-03-11T16:03:14.474Z","dependency_job_id":"ac29ce68-6b1c-4f37-8141-cad8f811a5ec","html_url":"https://github.com/Pytlicek/VideoGenTTS","commit_stats":null,"previous_names":["pytlicek/videogentts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pytlicek/VideoGenTTS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2FVideoGenTTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2FVideoGenTTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2FVideoGenTTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2FVideoGenTTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pytlicek","download_url":"https://codeload.github.com/Pytlicek/VideoGenTTS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pytlicek%2FVideoGenTTS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273233235,"owners_count":25068731,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-09-02T05:06:37.138Z","updated_at":"2025-09-02T05:06:38.623Z","avatar_url":"https://github.com/Pytlicek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Video Generation Script with Text-to-Speech\n\nThis script generates a video from a list of text phrases, each accompanied by synthesized speech using Google's Text-to-Speech (gTTS) API. Each line of text from an input file is displayed as a separate video clip with a corresponding audio track that reads the text aloud.\n\n\u003cimg width=\"50%\" alt=\"screenshot\" src=\"https://github.com/Pytlicek/VideoGenTTS/assets/1430522/575ba71b-4477-4cf6-9c76-38b4f0e1d30f\"\u003e\n\n\n## Features\n\n- Converts a list of text phrases into spoken audio using gTTS.\n- Generates a video clip for each phrase with a custom background and text color.\n- Combines all video clips into a single output video file.\n- Adjusts the duration of each video clip to match the length of the audio.\n- Preprocesses text to adjust the pronunciation for TTS.\n\n## Prerequisites\n\nBefore running the script, you need to have Python installed on your system. The script has been tested with Python 3.10. Additionally, you will need the following packages:\n\n- moviepy\n- gTTS\n\nYou also need to have ImageMagick installed, which is used by MoviePy for text rendering.\n\n## Installation\n\n### System Requirements\n\nInstall ImageMagick using Homebrew:\n\n```sh\nbrew install imagemagick\n```\n\n### Python Dependencies\n\nInstall the required Python packages using `pip`. It's recommended to use a virtual environment.\n\nCreate a virtual environment (optional):\n\n```sh\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nInstall the required packages:\n\n```sh\npip install moviepy gTTS\n```\n\n## Usage\n\nTo run the script, use the following command:\n\n```sh\npython movie_gen.py\n```\n\nThe script will process each line in the input text file and generate a video clip for it. After processing all lines, it will concatenate them into a single video file.\n\n## Configuration\n\nYou can configure the script parameters at the beginning of the script:\n\n- `tts_lang`: Set the language code for gTTS (e.g., \"en\" for English, \"sk\" for Slovak).\n- `text_file_path`: Path to the input text file containing the phrases to convert.\n- `video_output_path`: Path where the output video file will be saved.\n- `background_color`: RGB color tuple for the video background (default is black).\n- `text_color`: Color name or RGB tuple for the text color (default is white).\n- `font_size`: Size of the text font.\n- `audio_dir`: Temporary directory to store the generated audio files.\n\n## Text Preprocessing\n\nThe `preprocess_text` function can be modified to change the pronunciation of certain phrases or abbreviations for the TTS.\n\n## Cleanup\n\nAfter the video is generated, the script will automatically remove the temporary audio files created during the process.\n\n## Disclaimer\n\nThe performance and accuracy of the TTS conversion may vary based on the input text and the selected language. The script may need to be adjusted for complex pronunciation cases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytlicek%2Fvideogentts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpytlicek%2Fvideogentts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpytlicek%2Fvideogentts/lists"}