PodBro is a Python-based tool that generates podcasts from various content sources including YouTube videos, web pages, PDFs, and audio/video files. It uses OpenAI's APIs for content processing and text-to-speech conversion.
- Multi-source content extraction from:
- YouTube videos (with transcript support)
- Web pages and articles
- PDF documents
- Audio/video files
- Text-to-speech conversion using:
- Microsoft Edge TTS
- OpenAI TTS
- Automatic content processing and podcast script generation
- Support for multiple voices in generated podcasts
# Clone the repository
git clone https://github.com/detunjisamuel/podbro.git
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
export OPENAI_API_KEY=your_api_key
# Basic usage with a YouTube URL
python -m podbro.main create --url "https://www.youtube.com/watch?v=example"
# Combine multiple sources
python -m podbro.main create \
--url "https://www.youtube.com/watch?v=example" \
--file "presentation.pdf" \
--text "Additional content to include" \
--tts-model edge
from podbro.main import PodcastGenerator, TTSModel
# Initialize generator
generator = PodcastGenerator()
# Create podcast from multiple sources
result_file = generator.create_podcast(
urls=["https://www.youtube.com/watch?v=example"],
files=["document.pdf"],
text="Additional content",
tts_model=TTSModel.EDGE
)
Here's a workflow example:
- Input: YouTube video about AI advances
- Content extraction:
# Extract content from YouTube
youtube_parser = YouTube("https://www.youtube.com/watch?v=example")
content = youtube_parser.extract_content_from_source()
- Generate podcast script:
# Process content and generate script
transcript = generate_podcast_transcript(content)
# Sample output:
"""
Speaker 1: Welcome to today's episode about artificial intelligence...
Speaker 2: That's fascinating! Could you tell us more about...
"""
- Convert to audio using Edge TTS or OpenAI TTS
# Run all tests
python -m unittest discover tests
# Run specific test case
python -m unittest tests.test_main.TestPodcastGenerator
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit changes:
git commit -am 'Add feature'
- Push to branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.