Skip to content

esbenkc/wikipod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The WikiPod

The WikiPod is the easiest way for you to generate podcast episodes out of your favorite Wikipedia pages!

See a few examples here:

  • Black holes – you won't be able to escape this topic's gravitational pull!
  • Event horizon – don't expect events in the horizon for this one.
  • Spacetime – you thought they were separate? Think again...

Just a 3h experiment, you are very welcome to build on top of it

Getting started

Create a .secret file with your OpenAI API key and your Eleven Labs API key:

ELEVEN_LABS_API_KEY=<xi-api-key>
OPENAI_API_KEY=<openai-api-key>

Now run the bash command to begin wikipodding your very favorite Wikipedia pages!

python main.py -p https://en.wikipedia.org/wiki/Python_(programming_language) https://en.wikipedia.org/wiki/Artificial_intelligence

You can edit the following variables:

  • -v or --voice_id: ID of the voice to use for audio generation. Default is UdScy37AbDCrWZuRANDL.
  • -m or --model: The GPT model to use for content cleaning. Default is gpt4.
  • -p or --pages: A list of Wikipedia page URLs to process. This argument is required. Default is a random Wikipedia page.

Output

The script will scrape the specified Wikipedia pages, clean the content, and save it in an HTML file in the public/ directory. It will also generate an audio file in MP3 format in the same directory that is included in the HTML file.