Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Podcast AI Assistant & Content Generator

An intelligent application that transforms long-form podcast transcripts into a queryable knowledge base. Ask questions, get summaries, and generate new content in seconds. This project demonstrates an end-to-end Retrieval-Augmented Generation (RAG) pipeline, from data processing to a user-friendly web interface.

App Screenshot


✨ Features

  • Conversational Q&A: Ask questions in natural language and get concise, context-aware answers sourced directly from the podcast transcripts.
  • On-the-Fly Summarization: Generate summaries of specific topics or entire episodes.
  • Content Extraction: Pull out key takeaways, mentioned names, or companies in a structured format.
  • Content Repurposing: Transform podcast discussions into new formats like Twitter threads or blog post outlines.
  • Source Citing: Each response includes the specific text chunks from the transcripts that were used to generate the answer, ensuring transparency and trust.

🛠️ Tech Stack & Architecture

This project is built on a modern, modular stack designed for building LLM applications.

  • LLM Framework: LlamaIndex for orchestrating the RAG pipeline.
  • LLM & Embeddings: Google Gemini API (gemini-1.5-flash-latest for generation, embedding-001 for embeddings).
  • Web Framework: Streamlit for creating the interactive user interface.
  • Language: Python 3.10+
  • Environment: python-dotenv for managing API keys.

Architecture Overview

The application follows a classic RAG pattern:

  1. Offline Indexing (engine.py):

    • Podcast transcripts are loaded from the /data directory.
    • Text is split into smaller, manageable chunks.
    • Each chunk is converted into a vector embedding using Gemini's embedding model.
    • The embeddings and corresponding text are stored in a local vector index using LlamaIndex's StorageContext.
  2. Real-time Querying (app.py):

    • A user submits a query through the Streamlit interface.
    • The query is converted into an embedding using the same model.
    • The vector index is searched to find the most semantically similar text chunks (the "context").
    • The context and the original query are passed to the Gemini Pro model in a carefully crafted prompt.
    • The LLM generates a response based only on the provided context, which is then streamed back to the user.

🚀 Getting Started

Follow these instructions to set up and run the project locally.

Prerequisites

1. Clone the Repository

git clone https://github.com/your-username/podcast-qa.git
cd podcast-qa

2. Set Up a Virtual Environment

Windows:

python -m venv .venv
.\.venv\Scripts\activate

macOS / Linux:

python3 -m venv .venv
source .venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure Your API Key

  1. Create a file named .env in the root of the project directory.

  2. Add your Gemini API key to this file:

    GEMINI_API_KEY="YOUR_API_KEY_HERE"

5. Prepare Your Data

  • Place your podcast transcript .txt files inside the /data directory.

6. Build the Vector Index

Run the indexing script. This only needs to be done once, or whenever you add new documents to the /data folder.

python engine.py

This will create a storage directory containing your vector index.

7. Run the Streamlit App

You're all set! Launch the application with:

streamlit run app.py

Your web browser should automatically open with the app running.


💡 Future Improvements

  • Implement conversation memory to allow for follow-up questions.
  • Add support for more data sources (e.g., YouTube video transcripts, RSS feeds).
  • Explore more advanced retrieval strategies like hybrid search.
  • Containerize the application with Docker for easier deployment.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Chat with your favorite podcasts (or books!). A Streamlit app that uses RAG and Gemini to answer questions, summarize topics, and generate content from audio transcripts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages