Skip to content

Simple PDF TTS reader with drop-in OpenAI compatible api endpoint. Use with your own local Kokoro 82M api! (WIP)

License

Notifications You must be signed in to change notification settings

richardr1126/OpenReader-WebUI

Repository files navigation

OpenReader WebUI

OpenReader WebUI is a web-based PDF reader with integrated Text-to-Speech capabilities. It provides a clean interface for reading PDF documents while offering synchronized text-to-speech playback using OpenAI's TTS API.

Demo

Screen.Recording.2025-01-20.at.7.18.12.PM.mov

Features

  • PDF Document Management

    • Local document storage using IndexedDB
    • PDF text extraction and rendering
  • Text-to-Speech Integration

    • Real-time text-to-speech using OpenAI's TTS API, Kokoro TTS API, or anything else that follows the OpenAI API format
    • Synchronized text highlighting
    • Configurable playback speed
    • Multiple voice options
    • Click-to-read functionality
  • User Interface

    • Light/Dark/System theme support
    • Responsive design
    • Configurable API settings
    • Interactive PDF text selection

Tech Stack

  • Framework: Next.js with React
  • Storage: IndexedDB for document storage
  • PDF Processing:
    • react-pdf for rendering
    • pdf.js for text extraction
    • compromise for text analysis
  • UI Components:
    • Headless UI for modals and dropdowns
    • Tailwind CSS for styling
  • TTS Integration: OpenAI TTS API

Installation

You will need node and npm installed on your machine. If you don't have it, I recommend installing it using nvm.

  1. Clone the repository:
git clone https://github.com/richardr1126/OpenReader-WebUI.git
cd OpenReader-WebUI
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.template .env

Edit the .env file with your configuration settings.

  1. Start the development server:
npm run dev

The application will be available at http://localhost:3000.

Available Scripts

  • npm run dev - Start development server with Turbopack
  • npm run build - Create production build
  • npm run start - Start production server
  • npm run lint - Run ESLint for code quality

Project Structure

src/
├── app/                    # Next.js app router
├── components/             # UI components
├── contexts/               # Contexts for state management
└── services/               # Utility functions

Browser Support

The application requires modern browser features:

  • IndexedDB for document storage
  • PDF.js for document rendering

License

MIT License

Acknowledgements

Thank you ❤️

About

Simple PDF TTS reader with drop-in OpenAI compatible api endpoint. Use with your own local Kokoro 82M api! (WIP)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published