Skip to content

A Youtube video summarizer using ChatGPT and Youtube APIs. Generate a short mp3 file of the summarized video in ANY languages with only a Youtube link.

License

Notifications You must be signed in to change notification settings

lucasduport/YoutubeGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YoutubeGPT

A youtube video summarizer using ChatGPT and Youtube APIs. Generate a short mp3 file of the summarized video in ANY languages with a Youtube link

Config file

You have to create your own OpenAI api key here and replace it in config.py file.

Run the code

pip install -r requirements.txt

python3 main.py <youtube_link> <language> <output_filename='output.mp3'>

Example:

python3 main.py https://youtu.be/AyOnug-3OKM es out.mp3

Languages are given in format IETF language tag

Good to know

I used to split the transcript into several pieces because the context length of openAI api was not big enough to handle a whole video transcript. No need to do it anymore thanks to massive gen ai improvements in less than a year !!!

Improvements

I should have use JSON to store config and import API key form shell envrionment variable. I will do it sometime. I could take an optional parameter of how long the output file should be.

Changelog:

  • 06/07/24:
    • Removed gTTS library usage to use openAI text to speech model.
    • Now compatible with new version of openAI lib.
    • You can now set an output file, if not, it will be name "output.mp3"
    • Updated README

About

A Youtube video summarizer using ChatGPT and Youtube APIs. Generate a short mp3 file of the summarized video in ANY languages with only a Youtube link.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages