Sometimes you want to listen instead of read — while cooking, commuting, or just giving your eyes a rest. Lion Reader’s narration feature transforms articles into natural-sounding audio using a two-stage pipeline that combines AI preprocessing with on-device speech synthesis.
Stage 1: AI Text Preprocessing
Raw article HTML isn’t ready for text-to-speech. Abbreviations like “Dr.” get mispronounced, URLs sound terrible when read aloud, and technical notation confuses speech engines. To solve this, Lion Reader first sends article content through an LLM (Llama 3.1 via Groq) that transforms the text for natural narration.
The AI expands abbreviations (“Dr.” becomes “Doctor”), converts URLs to readable phrases, formats lists and tables as natural language, and handles code blocks with clear verbal markers. Crucially, it maintains paragraph-level mapping so the app can synchronize highlighting as the audio plays. This preprocessing is cached by content hash, so the same article is only processed once — even if multiple users narrate it.
Stage 2: Audio Synthesis
After preprocessing, you can choose between two synthesis options. The Web Speech API uses your browser’s built-in voices for instant, zero-cost narration. Or enable Piper TTS for higher-quality neural voice synthesis powered by ONNX Runtime WebAssembly running locally in your browser — no server required, no per-character fees.
Reading Along
As narration plays, Lion Reader highlights each paragraph in sync with the audio and automatically scrolls to keep the current paragraph visible. You can control playback speed, skip forward or backward by paragraph, and use media session integration to control narration from your lock screen or notification shade. If the LLM service is unavailable, the system gracefully falls back to plain text narration so you can always listen to your articles.