codeaye / redgen

A project that generates a video about a reddit post using tts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RedGen ๐Ÿ™

The project involves the creation of a video that utilizes Text-to-Speech (TTS) to narrate the content of a post from the Reddit through an interactive CLI.

Logo

Buy Me A Coffee

Demo

This youtube channel contains purely content made by this project.

Requirements

Also make sure you have a terminal that supports colours cus I spent hours making this nice to look at ๐Ÿ˜ญ

Brew command to install all of this:

  brew install python poetry ffmpeg git \
    && brew install --cask firefox

Installation

If at any point in any of the steps, you face errors, please read the FAQ first

Clone the project

  git clone https://github.com/codeaye/redgen.git

Go to the project directory

  cd redgen

Install dependencies

  poetry install --without dev

Now to set up the project

  poetry run install.py

And follow along with the script

If you wish to use the offline tts, which relies on pyttsx3 please make sure you meet their requirements and if you are not on macos please change it's settings at src/config.py under the TtsOptions class.

Usage

  poetry run ./src/main.py

And follow along with the CLI and it will produce an output.mp4

To add more background videos, simply download them and put them in assets/backgrounds

The id of a submission refers to the code in the url

eg: 1344yk4

FAQ

Questions

Why was this made?

I was bored.

There are already projects that can do this, what is special about this one?

Nothing really... Also I was bored.

Why python?

I was planning to use rust, but the only setback being the excellent library that is moviepy.

Does this work offline?

No it does not, it requires the internet to fetch details about the post.

Common Errors

[Errno 13] Permission denied: 'file'

This is caused due to the linux/mac os not recognising the files as an executable. To fix run this:

  chmod +x install.py ./src/main.py

selenium.common.exceptions.JavascriptException: Message: SyntaxError: unexpected token: identifier

I still don't know what causes this as it is very rare, but just re-run the program and it should be fine.

If you see any other errors, please post it in the issues page so I can help!

Contributing

Contributions are always welcome!

If you feel like the project is missing a feature, feel free to add it in yourself!

I may not always respond quickly as im still a student and am busy but I will respond when I can ๐Ÿ˜ฉ.

License

MIT

About

A project that generates a video about a reddit post using tts.


Languages

Language:Python 100.0%