Skip to main content

langreader

Generate interactive language-learning HTML readers from Markdown using LLMs.

en ja fr

👀 Demo

Before reading further, check out what this tool generates:

👉 Live Demo: French Reader (Alsace)


md-llm-lang-reader (CLI command: langreader) converts standard Markdown text into a bilingual HTML reader. It uses Large Language Models (via multiai) to intelligently split paragraphs into natural sentences and provide translations, while adding Text-to-Speech (TTS) capabilities to every sentence.

Features

  • 🤖 AI-Powered Translation: Automatically splits paragraphs into natural sentences and translates them line-by-line.
  • 🔊 Text-to-Speech: Built-in audio buttons for every source sentence (uses browser Web Speech API).
  • ⏯️ Resumable Generation: Hit an API rate limit? Use --continue to resume generation exactly where it stopped.
  • 📝 Markdown Support: Preserves headings, code blocks, and basic formatting.
  • 🌍 Wikipedia Helper: Includes a script to easily fetch and format Wikipedia articles for learning.

📚 Documentation

For detailed installation instructions, CLI options, and tutorials, please visit the official documentation:

👉 https://sekika.github.io/langreader/

  • Usage Guide: Options for styling, resuming, and metadata.
  • Tutorial: Step-by-step guide to creating a reader from a Wikipedia article.
  • TTS Setup: How to configure high-quality voices on your device.

Installation

pip install md-llm-lang-reader

Note: This tool requires multiai configuration to access LLM providers (OpenAI, Anthropic, etc.).

Quick Start

  1. Create a Markdown file (input.md):

    # Bonjour
    Ceci est un exemple de phrase pour l'apprentissage.
    
  2. Run the generator:

    langreader -i input.md -o output.html --src fr --tgt en --provider openai --model gpt-4o-mini
    
  3. Open output.html in your browser to start reading and listening!

License

MIT

Release files for md-llm-lang-reader 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for md-llm-lang-reader 0.2.0
File Size Uploaded
md_llm_lang_reader-0.2.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for md-llm-lang-reader 0.2.0
File Interpreter ABI Platform
md_llm_lang_reader-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.9 kB

Release files / md_llm_lang_reader-0.2.0.tar.gz

Download URL md_llm_lang_reader-0.2.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6525db484d6da28c539a0b01e6c6f87ff12e43a52a5f1671fcd3cd5c8360cc0e
BLAKE2b-256 checksum
How to use checksums
9355c3c735aec4ad9b3e86c5715b9de526fa4ce5d255c6f82389b0ae51a5a5e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / md_llm_lang_reader-0.2.0-py3-none-any.whl

Download URL md_llm_lang_reader-0.2.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2a93db8b264c0485e25387d1298a235c07f52c4f1bdd328ffc7d27b576c7865
BLAKE2b-256 checksum
How to use checksums
6a6037c76db10e051c49e24bf18fb9ad67c3e1b13469ae9fc4b7cca2c5f9b932
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release 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