Generate language-learning HTML readers (with sentence-level LLM translations and TTS) from Markdown.
Project description
langreader
Generate interactive language-learning HTML readers from Markdown using LLMs.
👀 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
--continueto 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
-
Create a Markdown file (
input.md):# Bonjour Ceci est un exemple de phrase pour l'apprentissage. -
Run the generator:
langreader -i input.md -o output.html --src fr --tgt en --provider openai --model gpt-4o-mini
-
Open
output.htmlin your browser to start reading and listening!
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md_llm_lang_reader-0.2.0.tar.gz.
File metadata
- Download URL: md_llm_lang_reader-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6525db484d6da28c539a0b01e6c6f87ff12e43a52a5f1671fcd3cd5c8360cc0e
|
|
| MD5 |
8c8eb81224902fb333c764704eb1bd54
|
|
| BLAKE2b-256 |
9355c3c735aec4ad9b3e86c5715b9de526fa4ce5d255c6f82389b0ae51a5a5e5
|
File details
Details for the file md_llm_lang_reader-0.2.0-py3-none-any.whl.
File metadata
- Download URL: md_llm_lang_reader-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2a93db8b264c0485e25387d1298a235c07f52c4f1bdd328ffc7d27b576c7865
|
|
| MD5 |
2bcdde97c9242034f82209069e821786
|
|
| BLAKE2b-256 |
6a6037c76db10e051c49e24bf18fb9ad67c3e1b13469ae9fc4b7cca2c5f9b932
|