Skip to main content

audia — turn your ideas into audio

Python 3.10+ License: MIT PyPI version PyPI Downloads Tests Coverage GitHub last commit

audia is an agentic Python package that converts PDFs — academic papers, reports, regulations — into podcast-style audio files. It uses an LLM to rewrite content into natural spoken language (math in plain English, tables as sentences, no citations) before passing it to a TTS engine, so the result actually sounds good when read aloud.

The audia CLI

Features

  • LLM-curated text — mandatory LLM pass rewrites math notation, condenses tables and acknowledgements, removes citation artefacts, and ensures smooth spoken flow
  • Chunk-level stitching — long documents are split at paragraph boundaries; each chunk receives the tail of the previous curated output as transition context
  • ArXiv research — search papers by query and convert them to audio in one command
  • Voice input (STT) — record a spoken query to trigger an ArXiv search
  • Multiple TTS backendsedge-tts (default, free), kokoro (local), or OpenAI TTS
  • Multiple LLM backends — OpenAI (gpt-4o-mini default) or Anthropic
  • CLIaudia convert, research, listen, serve, info
  • Web UI — FastAPI backend + SPA frontend
  • Local storage — SQLite database for papers and audio files via SQLAlchemy
  • Debug output — every run saves raw, preprocessed, and curated text to ~/.audia/debug/<run_id>/

Tech Stack

Backend

  • Python Python 3.10+ — package language
  • FastAPI FastAPI — backend for the web UI
  • LangGraph LangGraph — agentic pipeline orchestration (PDF → preprocess → LLM curate → TTS)
  • LangChain LangChain — LLM abstraction
    • Current support for LLMs from Anthropic Anthropic, Google Google, and OpenAI OpenAI
  • Microsoft edge-tts — default TTS backend, no API key required
  • Hugging Face faster-whisper — STT for voice input (by SYSTRAN on Hugging Face)
  • PyMuPDF PyMuPDF — PDF text extraction
  • SQLite SQLite — local database for papers and audio files

Frontend

  • React React — interactive frontend
  • Vite Vite — fast dev server and production bundler
  • Tailwind CSS Tailwind CSS — utility-first styling
  • TypeScript TypeScript — type-safe component and API code

CLI

  • Typer Typer + Rich — CLI with coloured progress output

Packaging

  • PyPI PyPI — distributed as an installable Python package

Installation

pip install audia

For CLI usage, pipx is recommended — it installs audia in an isolated environment while exposing the command globally:

pipx install audia

Optional extras:

Extra Installs
kokoro local Kokoro TTS
pip install "audia[kokoro]"

Configuration

Copy .env.example to .env in your working directory and set your API key:

cp .env.example .env

Minimum required settings:

AUDIA_LLM_PROVIDER=openai           # or anthropic
AUDIA_OPENAI_API_KEY=sk-...

All settings use the AUDIA_ prefix. Run audia info to see the active configuration.

Quick Start

Show active configuration:

audia info

Convert a local PDF:

audia convert paper.pdf

Convert multiple PDFs to a specific output folder:

audia convert paper1.pdf paper2.pdf --output ~/audiobooks

Search ArXiv and convert the top results:

audia research "retrieval augmented generation" --max-results 3 --convert

Start the web UI:

audia serve
# → http://localhost:8000

The audia UI

Pipeline

The pipeline can be entered in three ways:

Entry point Command
Voice input audia listen — record speech, LLM distils a search query, confirm, then runs the full pipeline
Text query audia research "retrieval augmented generation" — search ArXiv by text, select papers, run pipeline
Local PDF audia convert paper.pdf — skip Steps 0, go straight to extraction

When starting from voice or text, the full five-step LangGraph pipeline runs. For local PDFs, Steps 1–4 run directly:

 [voice input]          [text query]
      │                      │
      ▼                      │
  Microphone                 │
  (faster-whisper STT)       │
      │                      │
      ▼                      │
  LLM query distillation     │        ← extracts concise ArXiv search terms
      │                      │           from natural speech
      ▼                      │
  Confirm / re-record?       │
      │  yes                 │
      ▼                      ▼
Step 0 — ArXiv search    (or use local PDF)
 │        arxiv API: fetch metadata, download PDF
 │
 ▼
Step 1 — PDF extraction       PyMuPDF: text + metadata per page
 │
 ▼
Step 2 — Heuristic pre-pass   Regex: strip citations, LaTeX commands, figure captions
 │
 ▼
Step 3 — LLM curation         Chunked LLM pass: math → English, tables → sentences,
 │                             smooth spoken transitions between chunks
 ▼
Step 4 — TTS synthesis        edge-tts (or kokoro / OpenAI): split into ~3800-char
                               chunks, synthesise, concatenate → .mp3

Output files for a run on 2025_Xu+.pdf:

~/.audia/audio/2025_Xu+_20260329_084445.mp3
~/.audia/debug/2025_Xu+_20260329_084445/
    1_raw.txt            ← PyMuPDF output
    2_preprocessed.txt   ← after heuristic pass
    3_curated.txt        ← after LLM curation

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-change) and make your changes
  3. Run the test suite: pytest --cov=src --cov-report=term-missing
  4. Format and lint: ruff format src/ tests/ && ruff check src/ tests/
  5. Update the documentation
  6. Submit a pull request

License

MIT — see LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audia-0.8.0.tar.gz (166.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audia-0.8.0-py3-none-any.whl (150.8 kB view details)

Uploaded Python 3

File details

Details for the file audia-0.8.0.tar.gz.

File metadata

  • Download URL: audia-0.8.0.tar.gz
  • Upload date:
  • Size: 166.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for audia-0.8.0.tar.gz
Algorithm Hash digest
SHA256 71ff2505f372744aa1a8bc3eeeda2126924d95573a6c9039560bc5aaff033eae
MD5 a700e814910ae461f95d610ce976a4da
BLAKE2b-256 3909dd11012ab65302b1ed0a26c9162d8eee1631822fdbbaa246330924497030

See more details on using hashes here.

File details

Details for the file audia-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: audia-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 150.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for audia-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b3df82f6f4dd9e7e3a79c6907fd13c8f02f150341e15c10edf8938feae0b5c
MD5 a4f0e1b2d78b25c93a27e84f6756a497
BLAKE2b-256 1b6d380a2ceb290e33ac098f4ce004fda5e82f2b3dfee8981030a063e89b79be

See more details on using hashes here.

Release history Release notifications | RSS feed

0.9.0

2 files

This release

0.8.0 This release

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.5.1

2 files

0.5.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page