Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,128 +9,165 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# π MyPod - AI Based Podcast Generator
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
## π **Features**
|
| 19 |
|
| 20 |
-
|
| 21 |
-
- **Upload PDF:** Convert your PDF documents into podcasts.
|
| 22 |
-
- **Enter URL:** Convert the content of any webpage into a podcast.
|
| 23 |
-
- **YouTube Link:** Transcribe and convert YouTube videos into podcasts *(Requires User Authentication - Work in Progress)*.
|
| 24 |
-
- **Research a Topic:** Provide a detailed topic, and **MyPod** will research and generate a podcast based on the latest information.
|
| 25 |
|
| 26 |
-
|
| 27 |
-
- **Tone Options:** Choose from Humorous, Formal, Casual, or Youthful to set the desired tone of your podcast.
|
| 28 |
-
- **Duration Range:** Select from 1-3 Minutes, 3-5 Minutes, 5-10 Minutes, or 10-20 Minutes to specify the length of your podcast.
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
|
|
|
|
|
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
git clone https://github.com/yourusername/mypod.git
|
| 50 |
-
cd mypod
|
| 51 |
-
Create a Virtual Environment:
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
bash
|
| 54 |
Copy code
|
| 55 |
-
|
| 56 |
-
source
|
| 57 |
-
Install Dependencies
|
|
|
|
| 58 |
|
| 59 |
bash
|
| 60 |
Copy code
|
| 61 |
pip install -r requirements.txt
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
Ensure you have a valid Groq API key. Set it as an environment variable:
|
| 65 |
-
|
| 66 |
-
bash
|
| 67 |
-
Copy code
|
| 68 |
-
export GROQ_API_KEY='your_groq_api_key_here' # On Windows: set GROQ_API_KEY=your_groq_api_key_here
|
| 69 |
-
Run the Application:
|
| 70 |
|
| 71 |
bash
|
| 72 |
Copy code
|
| 73 |
python app.py
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
This process involves content analysis, script creation, and high-quality audio synthesis, which may take a few minutes.
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
YouTube Link: (Work in Progress) Enter a YouTube video URL to transcribe and convert into a podcast.
|
| 85 |
-
Research a Topic: Enter a detailed topic to research and convert into a podcast.
|
| 86 |
Select Tone and Duration:
|
| 87 |
|
| 88 |
Tone: Choose from Humorous, Formal, Casual, or Youthful.
|
| 89 |
Length: Select the desired duration range for your podcast.
|
| 90 |
Generate Podcast:
|
| 91 |
|
| 92 |
-
Click the "Submit" button
|
| 93 |
-
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
Backend Technologies:
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
This project is licensed under the MIT License.
|
| 132 |
|
| 133 |
-
|
| 134 |
-
For
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
|
|
|
| 12 |
|
| 13 |
+
Thought for a few seconds
|
| 14 |
+
markdown
|
| 15 |
+
Copy code
|
| 16 |
+
# ποΈ MyPod - AI Based Podcast Generator
|
|
|
|
| 17 |
|
| 18 |
+
Welcome to **MyPod**, your go-to AI-powered podcast generator! π Whether you have documents, webpages, YouTube videos, or topics you'd like to explore, MyPod transforms your content into engaging, conversational podcasts with ease.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
## π Features
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
- **Multiple Input Sources:**
|
| 23 |
+
- **Upload PDF:** Convert your PDF documents into podcasts.
|
| 24 |
+
- **Enter URL:** Transform the content of any webpage into a podcast.
|
| 25 |
+
- **YouTube Link (Requires User Auth - Work in Progress):** Transcribe and convert YouTube videos into podcasts.
|
| 26 |
+
- **Research a Topic:** Provide a detailed topic statement to generate a podcast based on researched information.
|
| 27 |
|
| 28 |
+
- **Customizable Output:**
|
| 29 |
+
- **Tone Selection:** Choose from Humorous, Formal, Casual, or Youthful tones to match your desired podcast style.
|
| 30 |
+
- **Duration Options:** Select the length of your podcast ranging from 1-3 minutes to 10-20 minutes.
|
| 31 |
|
| 32 |
+
- **Automated Pronunciation Handling:**
|
| 33 |
+
- **Abbreviation Splitting:** Automatically splits abbreviations and concatenated words for accurate pronunciation.
|
| 34 |
+
|
| 35 |
+
- **Distinct Speaker Voices:**
|
| 36 |
+
- **Jane & Emma:** Enjoy a conversation between two distinct voicesβJane with a natural tone and Emma with a deeper, richer voice.
|
| 37 |
|
| 38 |
+
- **Transcript Generation:**
|
| 39 |
+
- Receive a markdown-formatted transcript alongside your podcast audio.
|
| 40 |
|
| 41 |
+
## π¦ Installation
|
| 42 |
|
| 43 |
+
Follow these steps to set up and run MyPod on your local machine:
|
| 44 |
|
| 45 |
+
### 1. Clone the Repository
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
```bash
|
| 48 |
+
git clone https://github.com/yourusername/mypod.git
|
| 49 |
+
cd mypod
|
| 50 |
+
2. Create a Virtual Environment (Optional but Recommended)
|
| 51 |
bash
|
| 52 |
Copy code
|
| 53 |
+
python -m venv mypod_env
|
| 54 |
+
source mypod_env/bin/activate # On Windows: mypod_env\Scripts\activate
|
| 55 |
+
3. Install Dependencies
|
| 56 |
+
Ensure you have Python 3.7 or higher installed. Then, install the required packages:
|
| 57 |
|
| 58 |
bash
|
| 59 |
Copy code
|
| 60 |
pip install -r requirements.txt
|
| 61 |
+
π Usage
|
| 62 |
+
Launch the Gradio interface to start generating your podcasts:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
bash
|
| 65 |
Copy code
|
| 66 |
python app.py
|
| 67 |
+
This will start a local web server and provide a URL (e.g., http://127.0.0.1:7860) where you can interact with MyPod.
|
| 68 |
|
| 69 |
+
π How to Use
|
| 70 |
+
Choose Your Input Source:
|
|
|
|
| 71 |
|
| 72 |
+
Upload PDF: Click on "Upload PDF" and select your PDF document.
|
| 73 |
+
Enter URL: Input the URL of the webpage you want to convert into a podcast.
|
| 74 |
+
Enter YouTube Link: Provide the YouTube video URL (Note: Requires User Auth - Work in Progress).
|
| 75 |
+
Research a Topic: Enter a detailed topic statement. Be as specific as possible. If the topic is too niche or specific, the outcome may vary.
|
|
|
|
|
|
|
| 76 |
Select Tone and Duration:
|
| 77 |
|
| 78 |
Tone: Choose from Humorous, Formal, Casual, or Youthful.
|
| 79 |
Length: Select the desired duration range for your podcast.
|
| 80 |
Generate Podcast:
|
| 81 |
|
| 82 |
+
Click on the "Submit" button.
|
| 83 |
+
Wait for the processing to complete. YouTube transcriptions may take longer due to processing requirements.
|
| 84 |
+
Download Your Podcast:
|
| 85 |
+
|
| 86 |
+
Once generated, download the podcast audio and view the transcript.
|
| 87 |
+
π Input Sources Explained
|
| 88 |
+
1. Upload PDF
|
| 89 |
+
Purpose: Convert the text content of a PDF document into an audio podcast.
|
| 90 |
+
Supported Formats: Only .pdf files are accepted.
|
| 91 |
+
2. Enter URL
|
| 92 |
+
Purpose: Extract and convert the textual content of any webpage into a podcast.
|
| 93 |
+
Supported Content: Most standard webpages with readable text content.
|
| 94 |
+
3. Enter YouTube Link (Requires User Auth - Work in Progress)
|
| 95 |
+
Purpose: Transcribe the audio from a YouTube video and convert it into a podcast.
|
| 96 |
+
Note: This feature is currently a work in progress and requires user authentication to access certain videos.
|
| 97 |
+
4. Research a Topic
|
| 98 |
+
Purpose: Generate a podcast based on researched information from reputable sources.
|
| 99 |
+
Recommendation: Provide a detailed and specific topic statement to achieve the best results. Extremely niche or highly specialized topics may yield less comprehensive podcasts.
|
| 100 |
+
π¨ Customization Options
|
| 101 |
+
Tone Selection:
|
| 102 |
+
|
| 103 |
+
Humorous: Funny and exciting, making listeners chuckle.
|
| 104 |
+
Formal: Business-like, well-structured, and professional.
|
| 105 |
+
Casual: Like a relaxed conversation between close friends.
|
| 106 |
+
Youthful: Energetic and lively, similar to how teenagers might chat.
|
| 107 |
+
Duration Selection:
|
| 108 |
+
|
| 109 |
+
1-3 Minutes: Approximately 200-450 words.
|
| 110 |
+
3-5 Minutes: Approximately 450-750 words.
|
| 111 |
+
5-10 Minutes: Approximately 750-1500 words.
|
| 112 |
+
10-20 Minutes: Approximately 1500-3000 words.
|
| 113 |
+
βοΈ Technical Details
|
| 114 |
Backend Technologies:
|
| 115 |
|
| 116 |
+
Gradio: For building the interactive web interface.
|
| 117 |
+
Groq API: For generating podcast scripts.
|
| 118 |
+
TTS (Text-to-Speech): For converting scripts into audio.
|
| 119 |
+
Whisper ASR: For transcribing YouTube videos.
|
| 120 |
+
Pydub: For audio manipulation and processing.
|
| 121 |
+
Performance Optimizations:
|
| 122 |
+
|
| 123 |
+
Regex Precompilation: Combined and precompiled regex patterns to speed up abbreviation splitting.
|
| 124 |
+
Efficient Processing: Optimized text preprocessing to minimize podcast generation time.
|
| 125 |
+
π οΈ Development
|
| 126 |
+
Repository Structure
|
| 127 |
+
scss
|
| 128 |
+
Copy code
|
| 129 |
+
mypod/
|
| 130 |
+
βββ app.py
|
| 131 |
+
βββ utils.py
|
| 132 |
+
βββ prompts.py
|
| 133 |
+
βββ requirements.txt
|
| 134 |
+
βββ README.md
|
| 135 |
+
βββ ... (other files)
|
| 136 |
+
app.py: Contains the Gradio interface and main application logic.
|
| 137 |
+
utils.py: Handles text processing, audio generation, and other utility functions.
|
| 138 |
+
prompts.py: Defines the system prompt for the language model.
|
| 139 |
+
requirements.txt: Lists all Python dependencies.
|
| 140 |
+
Contributing
|
| 141 |
+
We welcome contributions to improve MyPod! Whether it's fixing bugs, enhancing features, or optimizing performance, your help is valuable.
|
| 142 |
+
|
| 143 |
+
Fork the Repository
|
| 144 |
+
Create a Feature Branch:
|
| 145 |
+
bash
|
| 146 |
+
Copy code
|
| 147 |
+
git checkout -b feature/YourFeature
|
| 148 |
+
Commit Your Changes:
|
| 149 |
+
bash
|
| 150 |
+
Copy code
|
| 151 |
+
git commit -m "Add some feature"
|
| 152 |
+
Push to the Branch:
|
| 153 |
+
bash
|
| 154 |
+
Copy code
|
| 155 |
+
git push origin feature/YourFeature
|
| 156 |
+
Open a Pull Request
|
| 157 |
+
Reporting Issues
|
| 158 |
+
If you encounter any bugs or have suggestions for improvements, please open an issue in the Issues section of the repository.
|
| 159 |
+
|
| 160 |
+
π License
|
| 161 |
This project is licensed under the MIT License.
|
| 162 |
|
| 163 |
+
π€ Acknowledgements
|
| 164 |
+
Gradio: For making it easy to build machine learning demos.
|
| 165 |
+
OpenAI Whisper: For powerful speech recognition capabilities.
|
| 166 |
+
TTS Community: For developing robust text-to-speech models.
|
| 167 |
+
Various RSS Feeds and Wikipedia: For providing reliable information sources.
|
| 168 |
+
π Get Started!
|
| 169 |
+
π₯ Ready to create your personalized podcast? Give MyPod a try now and let the magic happen! π₯
|
| 170 |
+
|
| 171 |
+
Launch MyPod and start transforming your content into engaging podcasts today!
|
| 172 |
|
| 173 |
+
Happy Podcasting! π§β¨
|