AutomaticVideoMaker is a Python-based pipeline that automates the creation of videos with synchronized subtitles, audio, and text, and uploads them to TikTok. The project integrates various tools and APIs to generate stories, convert text to speech, synchronize audio with subtitles, and create videos.
- Story Generation: Uses OpenAI's GPT model to generate short stories.
- Text-to-Speech Conversion: Converts generated stories into audio using TTS.
- Subtitle Synchronization: Synchronizes subtitles with the generated audio using Vosk.
- Video Creation: Combines video, audio, and subtitles into a final video using MoviePy.
- TikTok Upload: Automatically uploads the generated video to TikTok via its API.
.env # Environment variables (API keys, etc.)
.gitignore # Git ignore file
entire_pipeline.py # Main script to run the entire pipeline
films/ # Directory for video files
font/ # Directory for custom fonts
functions/ # Directory for core functions
movieMakerTest.py # Video creation logic
storyGeneration.py # Story generation logic
synchronisationVoiceText.py # Subtitle synchronization logic
textToSpeech.py # Text-to-speech conversion logic
upload.py # TikTok upload logic
garbage/ # Temporary or unused files
models/ # Directory for Vosk model files
sounds/ # Directory for audio files
-
Clone the repository:
git clone <repository-url> cd AutomaticVideoMaker
-
Install dependencies:
pip install -r requirements.txt
-
Download the Vosk model and place it in the
models/directory. -
Add your API keys to the
.envfile:OPENAI_API_KEY="your_openai_api_key" TIKTOK_ACCESS_TOKEN="your_tiktok_access_token"
Run the main pipeline script to generate and upload a video:
python entire_pipeline.py- Story Generation: Generates a short story using OpenAI's GPT model.
- Text-to-Speech: Converts the story into an audio file.
- Subtitle Synchronization: Synchronizes subtitles with the audio.
- Video Creation: Combines the audio, subtitles, and a base video into a final video.
- TikTok Upload: Uploads the video to TikTok.
Contributions are welcome! Feel free to submit issues or pull requests.