Have you noticed the viral trend of videos on TikTok, YouTube, and Instagram featuring a monotone voice narrating interesting Reddit posts while Minecraft parkour plays in the background? These videos actually garner MILLIONS of views. With a little bit of editing, these videos typically take 10 minutes to create.
What if we could automate this process and create such a video in just 2-3 minutes with a single click of a button?
Introducing the TikTok Reddit Bot – your ultimate tool for creating viral videos with ease! With this bot, you can effortlessly produce engaging content that captivates millions. Users can choose to retrieve a random post from Reddit or input their own story. The bot utilizes the Google Text-to-Speech API to convert text into speech and generate precise word timestamps. Then, using Moviepy, it seamlessly integrates the audio, video clip, and subtitles.
What sets this bot apart is its convenience – you can generate videos from anywhere, and it takes less than 3 minutes to receive your completed video. Join the trend and start creating viral TikTok content effortlessly with this TikTok Reddit Bot!
You can actually check out some of my videos on TikTok @reddit_coolest_story
- Random Post Retrieval: Fetches a random post from a subreddit.
- Custom Story Input: Allows users to type in their own stories.
- Text-to-Speech Conversion: Uses Google Text-To-Speech API to convert text to .mp3 files with word timestamps.
- Video Generation: Utilizes MoviePy to create videos with the generated audio and subtitles.
- Telegram Integration: Sends the created videos to users via a Telegram bot.
- Python 3.9
-
Clone this repository
-
Run
pip install -r requirements.txt
-
Take two videos that are at least 5 minutes long, name them
vid1.mp4
andvid2.mp4
and add them to the repository. -
Register for a Reddit account if you don't already have one, take note of your username and password
-
Follow this tutorial to retrieve your Reddit app username and Reddit app secret
-
Follow this tutorial to retrieve your Google Cloud Text-To-Speech key, it should be a
.json
file. Name itsa_redtok.json
, and add it to the repository -
Create a Telegram Bot using BotFather on Telegram, and retrieve the bot's token.
-
Create a
.env
file with the following content and add it to the repository:USERAGENT=ChangeMeClient/0.1 by YourUsername REDDIT_APP_USERNAME={your reddit app username} REDDIT_APP_SECRET={your reddit app secret} USERNAME={your reddit username} PASSWORD={your reddit password} TELEGRAM_TOKEN={your telegram bot token}
-
Run
python3 telegram_bot.py
to run the telegram bot -
Open up your bot on telegram and type
/start
-
Follow the instructions to use the bot!
demo.1.mov
output_video.1.mov
- The bot might take 2-3 minutes to create and send the video, especially if the video is very long.
- Google Cloud Text-To-Speech API is not completely free. Please refer to this before deciding to use Google Cloud Text-To-Speech API.