create video with subtitle from youtube video
-
download youtube video from a url
-
create srt file from video using deepgram speech to text
-
use moivepy to combine original video and srt file to create video with subtitle
- clone this repo
git clone https://github.com/andy3278/YouTube-Speech-to-text-to-subtitle.git
- install dependencies
pip install -r requirements.txt
- setup deepgram api key create a file named .env in the root directory of this repo and add your deepgram api key
DG_KEY = your deepgram api key
- change the url in main.py to your youtube video url and run main.py
python main.py