=== Post2Podcast ===
Contributors: samukbg
Tags: podcast, audio, ai, text to speech, tts, content repurposing, openai, conversational
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.3.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Transform your WordPress blog posts into engaging podcast episodes with AI-powered two-speaker conversations.

== Description ==

**Post2Podcast** is a powerful WordPress plugin that converts your written blog content into engaging podcast episodes using advanced AI text-to-speech technology. The plugin creates natural-sounding conversations between two AI speakers, making your content more accessible and engaging for audio consumption.

Whether you're a blogger, content creator, or business owner, Post2Podcast helps you reach a wider audience by repurposing your written content into professional-quality podcast episodes.

### 🎙️ Key Features

* **Two-Speaker Conversations**: Automatically converts blog posts into natural dialogues between two distinct AI speakers
* **Multiple AI Voice Options**: Choose from 10+ high-quality OpenAI voices (Alloy, Echo, Fable, Onyx, Nova, Shimmer, Sage, Ash, Ballad, Coral)
* **Customizable Speaker Instructions**: Define unique personality and tone for each speaker
* **Real-time Audio Generation**: Watch your podcast generate in real-time with live progress updates
* **Automatic Audio Embedding**: Generated podcasts are automatically embedded into your posts
* **Bulk Generation**: Generate podcasts for multiple posts simultaneously
* **Auto-Generation**: Automatically create podcasts for new posts as they're published
* **Cloud-Hosted Service**: Reliable hosted service with managed infrastructure
* **Professional Audio Player**: Built-in audio player with download functionality
* **Multi-language Support**: Supports content in multiple languages
* **Credit System**: Transparent usage tracking and subscription management

### 🎯 Perfect For

* **Bloggers** - Reach audio-first audiences and increase engagement
* **Content Creators** - Repurpose written content into podcast format
* **Businesses** - Create accessible content for all audiences
* **Educators** - Transform articles into audio learning materials
* **News Sites** - Offer audio versions of articles
* **Personal Brands** - Expand content reach across multiple formats

### 🏆 Two Simple Plans

**🆓 FREE Plan**
* 10 free podcast generations
* Up to 2 minutes per audio
* Multi-language support
* Standard support
* Perfect for testing and small blogs

**💎 PRO Plan ($9.99/month)**
* 300 credits per month
* Unlimited audio length
* Priority support
* Bulk generation tools
* Auto-generation for new posts
* Professional audio quality

## Installation

### Quick Setup (5 minutes)

1. **Install the Plugin**
   - Upload the `post2podcast` folder to `/wp-content/plugins/`
   - OR install directly from WordPress admin → Plugins → Add New
   - Activate the plugin

2. **Configure Authentication**
   - Go to **Post-to-Podcast** in your WordPress admin menu
   - Generate a WordPress Application Password in your user profile
   - Enter the Application Password in the plugin settings

3. **Start Creating Podcasts**
   - Edit any blog post
   - Find the "Podcast Settings" meta box in the sidebar
   - Customize voices and speaker instructions
   - Click "Generate Audio"
   - Your podcast will be embedded automatically!


## How to Use

### Creating Your First Podcast

1. **Write or Edit a Post**
   - Create a new blog post or edit an existing one
   - Ensure your content is well-structured with clear paragraphs

2. **Configure Podcast Settings**
   - In the post editor sidebar, find "Podcast Settings"
   - **Speaker 1 Voice**: Choose the first speaker's voice
   - **Speaker 1 Instructions**: Define their personality (e.g., "Speak in an enthusiastic and friendly tone")
   - **Speaker 2 Voice**: Choose the second speaker's voice  
   - **Speaker 2 Instructions**: Define their style (e.g., "Speak in a professional, analytical tone")

3. **Generate Audio**
   - Click "Generate Audio"
   - Watch real-time progress updates
   - Preview the generated podcast
   - Download or regenerate if needed

4. **Publish and Share**
   - The audio player is automatically embedded in your post
   - Visitors can listen directly on your site
   - Share your audio-enhanced content

### Advanced Features

#### Bulk Generation
1. Go to **Post-to-Podcast** → **Bulk Generation**
2. Select posts to convert
3. Configure default voice settings
4. Start bulk generation process
5. Monitor progress in real-time

#### Auto-Generation
1. Enable "Automatic Generation for Future Posts"
2. New posts will automatically generate podcasts
3. Uses your default voice settings
4. Runs in background after publishing

#### Custom Voice Instructions
Create unique speaker personalities:
- **Professional**: "Speak in a clear, authoritative tone with technical expertise"
- **Conversational**: "Use a friendly, casual tone like talking to a friend"
- **Educational**: "Explain concepts clearly with enthusiasm for learning"
- **Dramatic**: "Use expressive, engaging delivery with emotional emphasis"

### Voice Options

Choose from high-quality OpenAI voices:

| Voice | Style | Gender | Best For |
|-------|-------|---------|----------|
| Alloy | Neutral | Neutral | Professional content |
| Echo | Clear | Male | Technical discussions |
| Fable | Storytelling | Male | Creative content |
| Onyx | Deep | Male | Authority/News |
| Nova | Friendly | Female | Conversational content |
| Shimmer | Warm | Female | Personal stories |
| Sage | Wise | Neutral | Educational content |
| Ash | Smooth | Neutral | Business content |
| Ballad | Expressive | Neutral | Creative/Artistic |
| Coral | Energetic | Female | Lifestyle/Entertainment |

## Pricing & Credits

### Understanding Credits
- **1 Credit = 1 Podcast Generation** (regardless of length on PRO plan)
- **Free Plan**: 10 generations total, max 2 minutes each
- **PRO Plan**: 300 generations per month, unlimited length

### Subscription Management
- Upgrade or downgrade anytime
- Cancel without penalties
- Credits refresh monthly on PRO plan
- Free credits never expire until used

### Cost Comparison
- **Free**: $0 (perfect for testing)
- **PRO**: $9.99/month (~$0.06 per podcast)

## Frequently Asked Questions

### General Questions

**Q: How long does it take to generate a podcast?**
A: Typical generation times:
- Short posts (1-2 paragraphs): 30-60 seconds
- Medium posts (3-5 paragraphs): 1-2 minutes  
- Long posts (6+ paragraphs): 2-5 minutes

**Q: What content works best for podcasts?**
A: Post2Podcast works great with:
- Blog articles and tutorials
- News articles and opinion pieces
- Educational content and how-to guides
- Product reviews and comparisons
- Personal stories and experiences

**Q: Can I edit the generated audio?**
A: Currently, you can regenerate with different voices/instructions, but direct audio editing isn't supported. We recommend adjusting speaker instructions and regenerating for best results.

### Technical Questions

**Q: What audio format is generated?**
A: All podcasts are generated as MP3 files with high-quality 128kbps encoding, optimized for web streaming and downloads.

**Q: Where are audio files stored?**
A: Audio files are stored in your WordPress uploads directory (`/wp-content/uploads/post2podcast/`) and can be easily backed up with your regular site backups.

**Q: Does this work with other content types?**
A: Currently optimized for blog posts, but works with any content type that supports custom meta boxes (can be extended for pages, custom post types, etc.).

**Q: What happens to my podcasts if I cancel?**
A: Generated audio files remain on your server and continue to work normally. You just can't create new podcasts without credits or subscription.

### Troubleshooting

**Q: Generation failed - what should I check?**
A: Common solutions:
1. Verify you have available credits
2. Check WordPress Application Password is correct
3. Ensure content isn't empty or too short
4. Try regenerating with different voice settings
5. Check plugin error logs in WordPress admin

**Q: Audio player not showing?**
A: Check:
1. Audio file exists in uploads/post2podcast/ directory
2. File permissions allow web access
3. No conflicting audio plugins
4. Clear any caching plugins


## Support & Community

### Getting Help

1. **Documentation**: Visit our [GitHub repository](https://github.com/samukbg/post2podcast-server) for detailed setup guides
2. **Issues**: Report bugs and request features on [GitHub Issues](https://github.com/samukbg/post2podcast-server/issues)
3. **Community**: Join discussions in our GitHub repository
4. **PRO Support**: Priority email support included with PRO subscriptions

### Contributing

We welcome contributions! Post2Podcast is open source:
- **Plugin Code**: WordPress plugin (GPLv2 license)
- **Submit Issues**: Bug reports and feature requests
- **Code Contributions**: Pull requests welcome
- **Community Support**: Help other users in discussions

## Privacy & Security

### Data Handling
- **Content Processing**: Blog content is temporarily sent to AI servers for processing
- **No Content Storage**: Original content is not permanently stored on external servers
- **Audio Storage**: Generated audio files are stored on your WordPress server
- **Account Data**: Subscription and usage data securely managed

### Security Features
- **Application Password Authentication**: Secure WordPress-native authentication
- **HTTPS Required**: All API communications use encrypted connections
- **Regular Updates**: Security patches and improvements
- **Data Protection**: Your content is processed securely and not stored permanently

## Changelog

### 1.3.7 (Current)
* FIXED: A PHP parse error that was causing the plugin to crash.
* FIXED: A bug that caused the "Completed job is missing audio data" error.
* FIXED: A bug that caused 404 errors for the job status endpoint.
* IMPROVED: The text sent to the TTS server is now cleaned to prevent special characters from being spelled out.
* CLEANUP: Removed a significant amount of unused and dead code from both the plugin and the server project.
* REFACTOR: Refactored the bulk generation and auto-generation features to use a more robust asynchronous polling mechanism.

### 1.1.2 (Previous)
* **Security**: Fixed output escaping issues for WordPress.org compliance
* **UI**: Improved subscription management interface
* **Bulk**: Enhanced bulk generation with better error handling
* **Credits**: Fixed credit system synchronization
* **Compatibility**: Updated for WordPress 6.8

### 1.0.6 (Previous)
* Initial public release
* Core podcast generation functionality
* Basic subscription system
* Cloud-hosted service

## Upgrade Notice

### 1.3.6
**Important:** After updating to version 1.3.6, you may find a file named `upgrade.php` in the root of the plugin's folder (`wp-content/plugins/post2podcast/`). This file is no longer used and can be safely deleted. This is a result of a one-time file structure cleanup.

### 1.1.2
**Security Update Required**: This version includes important security fixes for WordPress.org compliance. Please update immediately for continued security and functionality.

## Requirements

### WordPress Environment
- **WordPress**: 5.0 or higher
- **PHP**: 7.4 or higher  
- **cURL**: Enabled (for API communications)
- **File Permissions**: Write access to uploads directory
- **Memory**: 128MB minimum (256MB recommended for bulk operations)


### Browser Compatibility
- Modern browsers with HTML5 audio support
- JavaScript enabled for admin interface
- Chrome, Firefox, Safari, Edge (latest versions)

## Credits & Acknowledgments

**Developed by**: Samuel Bezerra ([GitHub](https://github.com/samukbg))

**Powered by**:
- OpenAI Text-to-Speech API
- WordPress REST API
- Modern web technologies
- Cloud infrastructure

**Special Thanks**:
- WordPress community for feedback and testing
- OpenAI for providing excellent TTS technology
- Early adopters and beta testers

---

**Ready to transform your blog into a podcast?** 

Install Post2Podcast today and start reaching audio-first audiences with professional-quality podcast episodes generated from your existing content.

[Get Started Now] | [View Documentation] | [GitHub Repository]