NotebookLlama: An Open-Source NotebookLM Alternative with AI Voice

7月13日 Published inAI Tools

NotebookLlama is a fully open-source alternative to NotebookLM, designed for those who want local control over their document analysis. The system leverages LlamaCloud to index and manage data, utilizing a dedicated Llama extraction agent to retrieve information from uploaded files. While the OpenAI API provides the core analytical power for text processing and question answering, ElevenLabs adds a high-quality voice synthesis layer, enabling users to listen to responses or generate complete spoken summaries. The application features a streamlined interface built on Streamlit, allowing you to upload files and interact directly with your materials. The entire codebase is open for inspection and local deployment.

Installation and Setup

Prerequisites

This project utilizes uv for dependency management. Ensure it is installed on your system before proceeding.

  • macOS and Linux: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

For alternative installation methods, please refer to the official uv documentation.

Step-by-Step Guide

1. Clone the Repository

git clone https://github.com/run-llama/notebookllama
cd notebookllama/

2. Install Dependencies Execute uv sync to install all required packages and set up the environment.

3. Configure API Keys

  • Rename the environment example file: mv .env.example .env
  • Open the .env file and input the following credentials:
    • OPENAI_API_KEY: Available from the OpenAI platform.
    • ELEVENLABS_API_KEY: Located in your ElevenLabs account settings.
    • LLAMACLOUD_API_KEY: Retrievable from the LlamaCloud dashboard.

4. Activate the Virtual Environment

  • macOS / Linux: source .venv/bin/activate
  • Windows: .\.venv\Scripts\activate

5. Initialize LlamaCloud Agent and Pipeline

  • First, create the data extraction agent by running: uv run tools/create_llama_extract_agent.py
  • Next, follow the interactive wizard to configure your index pipeline: uv run tools/create_llama_cloud_index.py
    • Quick Start: Select "With Default Settings" to use OpenAI’s text-embedding-3-small model.
    • Advanced: Select "With Custom Settings" to specify your preferred embedding model.

6. Start Backend Services

Run docker compose up -d to launch the Postgres and Jaeger containers in the background.

7. Launch the Application

You will need two separate terminal windows for this step:

  • Terminal 1: Start the MCP server. uv run src/notebookllama/server.py
  • Terminal 2: Launch the Streamlit frontend. streamlit run src/notebookllama/Home.py

Note: Ensure ffmpeg is installed on your system, as it is required for audio processing.

Once both services are active, navigate to http://localhost:8501/ in your browser. From here, you can upload documents to begin querying your data or generating audio content.