A highly-customizable tool that automatically creates AI-generated meme videos
pip install sitcom-simulator
- AI-generated scripts
- AI-generated images
- Deepfaked character voices
- Automatic background music finder
- Limitless customizability
- (coming soon) Automatic YouTube uploading
Sitcom Simulator is designed to be simple to use, but also supports extreme customizability for power users who know exactly what they want. Sitcom Simulator can be used from the command line or can be imported in Python scripts.
The most basic usage is simply running the sitcom-simulator command with no arguments. Many optional arguments are supported as well. Note that you must set your API key environment variables before it will work.
sitcom-simulator --prompt "Elon Musk teleports a toaster into the ocean" --style "beautiful renaissance oil painting" Sitcom Simulator can also be imported in Python scripts:
from sitcom_simulator import create_sitcom
# generate a short meme video and save it in the project folder
create_sitcom(
prompt="Mario hits Luigi with a stapler",
)Power users can completely customize the video creation process:
from sitcom_simulator import (
script_from_file,
add_voices,
add_images,
add_music,
render_video,
)
def upload_to_s3(index, file_path):
... # arbitrary code
initial_script = script_from_file("custom_script.toml")
script_with_voices = add_voices(
initial_script,
engine="fakeyou",
on_voice_generated=upload_to_s3)
script_with_images = add_images(
script_with_voices,
engine="stability",
on_image_generated=upload_to_s3)
script_with_music = add_music(script_with_images)
render_video(
script=final_script,
font="Papyrus",
output_path=f"./{final_script.metadata.title}.mp4")More documentation on the advanced features will be coming soon.
Several things must be completed before running Sitcom Simulator for the first time.
- Python 3
- ffmpeg (see below for more details)
- Stability API key (get one here)
- OpenAI API key (get one here)
The ffmpeg command must be accessible on your machine. This will vary depending on your system, but you can install it from the official download page or various package managers, e.g., apt install ffmpeg on Debian/Ubuntu, brew install ffmpeg on Mac, etc.
Alternatively, instead of installing ffmpeg on your system, you can place the ffmpeg and ffprobe binaries in your project's root directory, which will work equally well.
This package requires API keys from OpenAI and Stability AI to be stored in environment variables.
First, acquire API keys for OpenAI and Stability AI (see prerequisites)
How you set the environment variables will depend on your use case:
Set the environments in the terminal, i.e., export OPENAI_API_KEY=<value> (Linux) set OPENAI_API_KEY=<value> (Windows)
Create a .env file in your project's root directory, with the following structure:
STABILITY_API_KEY='your_key_here'
OPENAI_API_KEY='your_key_here'The .env file will be automatically detected by the program.
Sitcom Simulator is essentially duct tape that combines multiple different AI tools into one unholy abomination.
- ChatGPT generates the video script
- FakeYou generates voices for the characters
- Stable Diffusion generates images for the characters
- Freepd provides the background music
- FFmpeg connects the images and voices into a movie
Want to help work on this project? I'm down! Feel free to reach out to me if you want to contribute or have any questions :)
Have fun!!!