Pundora is an AI-powered Dad Joke generator that delivers groan-worthy humor in both text and voice. Think of it as opening Pandora's box—except instead of chaos, you unleash endless puns and cheesy one-liners! 😂
- 📝 Text Mode: Generates dad jokes instantly on screen
- 🔊 Voice Mode: Uses AI text-to-speech to deliver jokes out loud
- 🎛️ Settings: Adjust humor level (mild, medium, extra cringe)
- 🌍 Categories: Puns, knock-knock jokes, wordplay, dad classics, food, animals, technology
- 🎲 Randomizer: Never hear the same joke twice
- 🎙️ Custom Voice: Choose funny voices (robot, dad, dramatic narrator, cheerful)
- 🌐 Web Interface: Beautiful, modern UI with real-time joke generation
- 💻 CLI: Command-line interface for terminal users
- 🤖 AI Powered: Uses OpenAI for dynamic joke generation with fallback jokes
- Backend: Python (FastAPI)
- AI Text: OpenAI GPT-3.5-turbo for dynamic joke generation
- Voice: ElevenLabs API for realistic text-to-speech
- Frontend: Vanilla JavaScript + Tailwind CSS
- CLI: Python with argparse
- Configuration: Environment variables with .env support
# Clone the repository
git clone https://github.com/yourusername/pundora.git
cd pundora
# Install dependencies
pip install -r requirements.txt
# Or use the quick start script
python run.pyCopy the example environment file and add your API keys:
cp .env.example .envEdit .env with your API keys:
OPENAI_API_KEY=your_openai_api_key_here
ELEVENLABS_API_KEY=your_elevenlabs_api_key_herepython main.pyThen open http://localhost:8000 in your browser.
# Generate a random joke
pundora --joke
# Generate a pun joke with extra cringe
pundora --joke --category puns --level extra
# Generate a joke with voice
pundora --joke --voice --voice-type robot
# List available categories
pundora --list-categories
# List available voices
pundora --list-voices- Open http://localhost:8000
- Select your preferred category and humor level
- Choose voice settings if desired
- Click "Generate Joke" or "Joke + Voice"
- Enjoy the cringe! 😂
# Basic joke generation
pundora --joke
# Category-specific jokes
pundora --joke --category knock-knock
pundora --joke --category food --level extra
# Voice generation
pundora --joke --voice --voice-type dramatic
# Custom prompts
pundora --joke --prompt "Make a joke about programming"
# List options
pundora --list-categories
pundora --list-levels
pundora --list-voicesThe application also provides a REST API:
# Get a joke
curl "http://localhost:8000/api/joke?category=puns&humor_level=extra"
# Get a joke with voice
curl "http://localhost:8000/api/voice?text=Why don't scientists trust atoms? Because they make up everything!&voice=dad" --output joke.mp3
# Health check
curl "http://localhost:8000/api/health"- General: Classic dad jokes
- Puns: Pun-based humor
- Knock-Knock: Traditional knock-knock jokes
- Wordplay: Clever wordplay and double entendres
- Dad Classics: Timeless dad joke formats
- Food: Food-related puns and jokes
- Animals: Animal-themed humor
- Technology: Programming and tech jokes
- Mild: Family-friendly, mildly punny
- Medium: Moderately cringy and punny (default)
- Extra: Maximum cringe, groan-worthy, over-the-top punny
- Dad: Warm, fatherly voice perfect for dad jokes
- Robot: Mechanical voice for tech jokes
- Dramatic: Overly dramatic narrator voice
- Cheerful: Upbeat, happy voice
pundora/
├── pundora/
│ ├── __init__.py
│ ├── api.py # FastAPI backend
│ ├── cli.py # Command-line interface
│ ├── config.py # Configuration management
│ ├── joke_generator.py # AI joke generation
│ └── tts_service.py # Text-to-speech service
├── templates/
│ └── index.html # Web interface
├── main.py # Application entry point
├── run.py # Quick start script
├── requirements.txt # Python dependencies
├── setup.py # Package setup
└── README.md # This file
# Install in development mode
pip install -e .
# Run with auto-reload
python main.py
# Or use uvicorn directly
uvicorn pundora.api:app --reload --host 0.0.0.0 --port 8000OPENAI_API_KEY: Required for AI joke generationELEVENLABS_API_KEY: Required for voice generationELEVENLABS_VOICE_ID: Optional, specific voice IDHOST: Server host (default: 0.0.0.0)PORT: Server port (default: 8000)DEBUG: Debug mode (default: True)
- OpenAI: Get your API key from https://platform.openai.com/api-keys
- ElevenLabs: Get your API key from https://elevenlabs.io/app/settings/api-keys
- "Joke generator not available": Check your OpenAI API key
- "TTS service not available": Check your ElevenLabs API key
- Voice not working: Ensure ElevenLabs API key is valid and has credits
- Port already in use: Change the PORT in .env file
If API keys are not available, the application will run in fallback mode with pre-defined jokes.
Pull requests are welcome! Here are some ways to contribute:
- Add new joke categories - Extend the joke templates
- Improve voice options - Add new voice configurations
- Enhance the web UI - Make it even more beautiful
- Add new features - Joke ratings, favorites, sharing, etc.
- Fix bugs - Help make Pundora more stable
- Write tests - Improve code quality
# Fork and clone the repository
git clone https://github.com/yourusername/pundora.git
cd pundora
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
# Run tests (when available)
python -m pytest
# Run the application
python main.pyMIT License - see LICENSE file for details.
- OpenAI for the amazing GPT models
- ElevenLabs for realistic text-to-speech
- FastAPI for the excellent web framework
- All the dad joke enthusiasts who inspired this project
😂 Open the box. Unleash the puns. Welcome to Pundora! 🎭
Made with ❤️ and lots of dad jokes