Skip to content

AI powered podcast generator, inspired by Google's NoteBookLM audio-overview and AnthusAI's Podcastic

Notifications You must be signed in to change notification settings

timonvanhasselt/AI-podcast-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Podcast Generator

This script generates an AI-powered podcast based on a given text. It transforms a conversation between two AI personalities into a fully synthesized audio file. You can customize the speakers, language, and voices for your podcast. Inspired by the audio overview option of Google's NotebookLM experiment, and inspired by AnthusAI/Podcastic to make a script of it.

Animated gif of the script in action

Requirements

Before running the script, make sure you have the following installed/configured:

Installation

macOS/Linux

  1. Clone the repository:

    git clone https://github.com/timonvanhasselt/AI-podcast-generator.git
    cd ai-podcast-generator
    
  2. Create a virtual environment:

python3 -m venv venv
source venv/bin/activate
  1. Install the required Python packages: pip install -r requirements.txt

Windows

  1. Clone the repository:
cd ai-podcast-generator
  1. Create a virtual environment:
python -m venv venv
venv\Scripts\activate
  1. Install the required Python packages:

pip install -r requirements.txt

Usage

Update the Hugging Face credentials in the script to your own email and password:

EMAIL = "[email protected]"
PASSWD = "your-password"

Prepare your input: The script reads text input from a file named content.txt. Create a content.txt file in the project directory and input the text you want to be transformed into dialogue.

Run the script: Once everything is set up, you can run the script as follows:

On macOS/Linux: python3 podcast_script.py

On Windows: python podcast_script.py

Output

The script will generate an SSML conversation between the speakers, convert it into speech, and combine the segments into a final MP3 file named final_output.mp3.

Customization

Change Speakers and Language You can customize the speakers and their voices by modifying the following variables in the script:

speaker1 = "Ava"  # Change to your preferred speaker name
speaker2 = "Andrew"  # Change to your preferred speaker name
lang = "English"  # Change to your preferred language

You can also map different voices using EdgeTTS by updating the voice_map dictionary:

voice_map = {
    "Ava": "en-US-AvaMultilingualNeural",  # Change to your desired voice from EdgeTTS
    "Andrew": "en-US-AndrewMultilingualNeural"
}

Notes

Make sure you are logged into Hugging Face and have the proper credentials for API access. If you encounter any issues with model overload, wait and try again later.

About

AI powered podcast generator, inspired by Google's NoteBookLM audio-overview and AnthusAI's Podcastic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages