Transform articles and transcripts into engaging, multi-speaker podcast scripts using AI-powered enhancement. Create natural conversations between hosts and guests from any written content.
- π£οΈ Multi-Speaker Conversations: Convert articles into natural dialogue between host and guest
- π Flexible Formats: Interview, multi-host, or single-host podcast styles
- π€ AI Enhancement: Improve content quality using OpenAI or Anthropic Claude
- π Smart Processing: Automatically segment and structure content
- π― Complete Scripts: Generate intro, main content, outro, and show notes
- π Web Interface: User-friendly interface with step-by-step workflow
- β‘ Serverless API: Cloudflare Workers deployment for scalability
- π Secure: Environment-based API key management
git clone https://github.com/Garvgupta06/ai-podcast-script-generator.git
cd ai-podcast-script-generatorCreate your environment file:
# Windows
copy .env.example .env
# Linux/Mac
cp .env.example .envEdit .env with your API keys:
# Required: At least one LLM API key
OPENAI_API_KEY=sk-your-openai-key-here
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key-here
# Optional: Model preferences
OPENAI_MODEL=gpt-3.5-turbo
ANTHROPIC_MODEL=claude-3-sonnet-20240229
# Optional: Customize defaults
SHOW_NAME=Your Amazing Podcast
HOST_NAME=Your Name
SHOW_TAGLINE=Your podcast descriptionOption A: Quick Deploy (Windows)
cd cloudflare-workers
setup-api-keys.bat
deploy-with-env.batOption B: Manual Deploy
cd cloudflare-workers
npm install
npx wrangler login
npx wrangler secret put OPENAI_API_KEY # Enter your OpenAI key
npx wrangler secret put ANTHROPIC_API_KEY # Enter your Anthropic key
npx wrangler deploy- Open
web-interface/index.htmlin your browser - The interface will connect to your deployed API automatically
- Start creating podcast scripts!
Input (Article):
Climate change is affecting global weather patterns. Scientists have recorded
unprecedented temperature increases. Recent studies show renewable energy
solutions are becoming more cost-effective...
Output (Podcast Script):
Host: So tell us about the data you've been looking at.
Guest: Climate change is affecting global weather patterns. Scientists have
recorded unprecedented temperature increases across the globe.
Host: Those are fascinating numbers. What makes them particularly significant?
Guest: Recent studies show renewable energy solutions are becoming more
cost-effective. This really shows us where the trends are heading.
Host: That puts things in a whole new perspective.
Perfect for expert interviews and educational content:
- Host asks engaging questions
- Guest provides expertise and insights
- Natural back-and-forth conversation
- Professional interview flow
Great for discussion-style podcasts:
- Both hosts contribute equally
- Natural banter and conversation
- Shared insights and perspectives
- Dynamic co-host interaction
Traditional podcast style:
- Single speaker presentation
- Professional narration
- Structured content delivery
- Perfect for solo shows
ai-podcast-script/
βββ π README.md # This comprehensive guide
βββ π§ .env.example # Environment template
βββ π requirements.txt # Python dependencies
β
βββ βοΈ cloudflare-workers/ # Serverless API
β βββ src/
β β βββ π index.js # Main API handler
β β βββ handlers/ # API endpoints
β β β βββ script.js # Script generation (NEW!)
β β β βββ llm.js # AI enhancement
β β β βββ content.js # Content processing
β β βββ utils/ # Utilities
β βββ π deploy-with-env.bat # Windows deployment
β βββ βοΈ wrangler.toml # Cloudflare config
β
βββ π web-interface/ # Web application
β βββ π± index.html # Complete web UI
β
βββ π python-scripts/ # Python implementations
β βββ env_loader.py # Environment management
β βββ llm_integration.py # LLM API clients
β βββ script_generator.py # Script generation
β βββ transcript_processor.py # Content processing
β
βββ βοΈ config/ # Configuration
β βββ config.py # Settings management
β
βββ π§ͺ tests/ # Testing
βββ test_all.py # Comprehensive tests
-
π Input Content
- Paste article text or transcript
- Upload text files
- Manual text input
-
π€ AI Enhancement
- Skip: Basic cleanup only
- Comprehensive: Full AI enhancement
- Conversational: Perfect for articles (NEW!)
- Minimal: Light touch improvements
-
π Configure Podcast
- Choose format: Interview/Multi-host/Single-host
- Set show name and tagline
- Enter host and guest names
- Customize episode details
-
π― Generate Script
- Creates complete podcast script
- Includes intro, main content, outro
- Generates show notes and timestamps
- Natural speaker conversations
-
π€ Export & Use
- Download as text, markdown, or JSON
- Copy individual segments
- Use in your podcast production
| Type | Best For | What It Does |
|---|---|---|
| Skip | Demo/Testing | Basic cleanup only |
| Conversational | Articles | Transforms written content into natural dialogue |
| Comprehensive | Transcripts | Full AI enhancement with improvements |
| Minimal | Clean Content | Light touch, preserves original style |
https://your-worker-name.your-username.workers.dev
Process and segment content for podcast use.
{
"transcript": "Your article or transcript content...",
"source_type": "article"
}AI-powered content enhancement.
{
"content": "Content to enhance...",
"enhancement_type": "conversational"
}Generate complete podcast script with conversations.
{
"processed_transcript": { "segments": [...] },
"show_config": {
"show_name": "Tech Insights",
"speakers": {
"format": "interview",
"host_name": "Sarah",
"guest_name": "Dr. Johnson"
}
}
}| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key | Required |
ANTHROPIC_API_KEY |
Anthropic API key | Alternative |
OPENAI_MODEL |
OpenAI model | gpt-3.5-turbo |
ANTHROPIC_MODEL |
Anthropic model | claude-3-sonnet-20240229 |
- Show Configuration: Name, tagline, host details
- Speaker Formats: Interview, multi-host, single-host
- Enhancement Levels: Skip, minimal, conversational, comprehensive
- Export Formats: TXT, MD, JSON
"Artificial intelligence is transforming healthcare. Machine learning algorithms
can now analyze medical images with 95% accuracy. This technology is being
implemented in hospitals worldwide."
Sarah: So tell us about the data you've been looking at.
Dr. Martinez: Artificial intelligence is transforming healthcare. Machine
learning algorithms can now analyze medical images with 95% accuracy.
Sarah: Those are fascinating numbers. What makes them particularly significant?
Dr. Martinez: This technology is being implemented in hospitals worldwide.
This really shows us where the trends are heading.
Sarah: That puts things in a whole new perspective.
[PAUSE FOR EMPHASIS]
cd cloudflare-workers
npm install
npx wrangler deploycd cloudflare-workers
npm run devpip install -r requirements.txt
python python-scripts/script_generator.py- No Data Persistence: Content is not stored permanently
- Environment Variables: Secure API key management
- HTTPS Only: All communications encrypted
- Local Processing: Can run entirely offline (Python version)
- CORS Protection: Secure cross-origin requests
cd tests
python test_all.py# Test API deployment
curl https://your-worker.workers.dev/api/health
# Test web interface
python -m http.server 8000
# Open http://localhost:8000/web-interface/- Node.js 16+ (for Cloudflare Workers)
- Python 3.8+ (for Python scripts, optional)
- Modern Browser (for web interface)
- OpenAI API Key OR Anthropic API Key (at least one required)
- Cloudflare Account (free tier sufficient)
- Git (for version control)
- VS Code (recommended editor)
"No LLM provider configured"
- Ensure API keys are set in environment variables
- Check that secrets are properly deployed to Cloudflare Workers
"Failed to generate script"
- Verify API deployment is successful
- Check browser console for detailed error messages
- Ensure input content is not empty
"Enhancement failed, using fallback"
- API quota may be exceeded
- Check API key validity
- Try different enhancement type
- π Documentation: Check this README
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- β Multi-speaker conversation generation
- β Interview and multi-host formats
- β Conversational enhancement for articles
- β Intelligent content distribution between speakers
- β Varied conversation starters and natural flow
- β Basic transcript processing
- β Single-host script generation
- β Web interface
- β Cloudflare Workers API
- Voice Integration: AI voice generation for scripts
- Template System: Custom script templates
- Batch Processing: Multiple files at once
- Advanced Analytics: Script quality metrics
- Multi-language Support: International podcasts
- WordPress Plugin: Direct website integration
- Mobile App: Native iOS/Android apps
- Team Collaboration: Multi-user workspaces
- Premium Features: Advanced customization
- Podcast Networks: Multi-show management
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI and Anthropic for powerful LLM APIs
- Cloudflare for serverless computing platform
- Bootstrap for beautiful web interface
- Font Awesome for icons
ποΈ Built with β€οΈ for podcast creators who want to turn any content into engaging conversations
Transform your articles into podcast gold!