latex2voice

Make any TTS read math like a mathematician.

Verified by Whisper round-trip Fully offline Open weights No API English

Ask a stock TTS to read \limsup_{n \to \infty} a_n and you get “backslash lim sup underscore…” — or silence. Paper audiobooks, screen-reader access to lecture notes, video voice-overs: they all break the same way. latex2voice is a fine-tuned text-normalization front end that rewrites LaTeX into the sentence a person would actually say, then hands it to any TTS voice.

~2 GB
Runtime RAM (4B LoRA, CPU)
3–6 s
Per formula, CPU only
30+
amsmath operators
143
Symbol coverage audited

Hear the difference

Before / After
$$\limsup_{n \to \infty} a_n = \inf_{n} \sup_{k \geq n} a_k$$
Stock TTS reads the raw LaTeX
0:00 / 0:00
latex2voice
0:00 / 0:00
Before / After
$$a \equiv b \pmod{n}$$
Stock TTS reads the raw LaTeX
0:00 / 0:00
latex2voice
0:00 / 0:00

Every sample below shows the pipeline end to end: raw LaTeX (what the model sees) → spoken text (what it writes, the model’s real output, nothing handwritten) → audio. Each clip was verified by round-tripping through Whisper and judging the transcription semantically equivalent to the source formula.

Named operators · Deep Learning

Deep Learning1
$$\operatorname{softmax}(z)_i = \frac{e^{z_i}}{\sum_{j=1}^{n} e^{z_j}}$$
LaTeX\operatorname{softmax}(z)_i = \frac{e^{z_i}}{\sum_{j=1}^{n} e^{z_j}}
0:00 / 0:00
Deep Learning2
$$\hat{y} = \operatorname{ReLU}(W x + b)$$
LaTeX\hat{y} = \operatorname{ReLU}(W x + b)
0:00 / 0:00
Deep Learning3
$$\operatorname{LayerNorm}(x) = \gamma \cdot \frac{x - \mu}{\sqrt{\sigma^2 + \epsilon}}$$
LaTeX\operatorname{LayerNorm}(x) = \gamma \cdot \frac{x - \mu}{\sqrt{\sigma^2 + \epsilon}}
0:00 / 0:00

amsmath operators · Analysis & Algebra

Analysis4
$$\limsup_{n \to \infty} a_n = \inf_{n} \sup_{k \geq n} a_k$$
LaTeX\limsup_{n \to \infty} a_n = \inf_{n} \sup_{k \geq n} a_k
0:00 / 0:00
Linear Algebra5
$$\ker(A) = \{0\}, \quad \operatorname{tr}(A) = \sum_{i=1}^{n} \lambda_i, \quad \operatorname{rank}(A) = 3$$
LaTeX\ker(A) = \{0\}, \quad \tr(A) = \sum_{i=1}^{n} \lambda_i, \quad \rank(A) = 3
0:00 / 0:00
Linear Algebra6
$$\operatorname{diag}(v) \cdot \operatorname{sign}(v) \geq 0$$
LaTeX\diag(v) \cdot \sign(v) \geq 0
0:00 / 0:00
Number Theory7
$$a \equiv b \pmod{n}$$
LaTeXa \equiv b \pmod{n}
0:00 / 0:00
Probability8
$$\Pr(X > 0) \geq \hom(X, Y) - \lg n$$
LaTeX\Pr(X > 0) \geq \hom(X, Y) - \lg n
0:00 / 0:00

Use it

# pip install latextts  — TN front end, any TTS behind it
from latextts import tn
spoken = tn(r"\limsup_{n \to \infty} a_n")
# -> "the limit superior as n goes to infinity of a sub n"
tts.speak(spoken)  # Kokoro, Piper, Azure… your choice
GitHub — source & model Hugging Face — weights soon