Use AIUnderstand AIBuild with AI
Build with AI·Model deep dive·· 5 min read

Run EMA Lightning: 8.6M-Parameter Turkish Text-to-Speech

EMA Lightning is a 34 MB, Apache-2.0 Turkish TTS model with streaming output. Install it, generate files, stream audio and serve many callers.

The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.

EMA Lightning is a Turkish text-to-speech model by Canberk Aslan. It has 8.6M parameters in total (a 5.6M-parameter DiT acoustic model plus a 3M-parameter vocoder), about 34 MB, and the weights and code are Apache 2.0. The card says it has the lowest word error rate of every system it measured on Freya-TR-Eval, including ElevenLabs v4, Gemini 3.8 and the 2.38B-parameter Trendyol-TTS, and that it runs fully offline with no API key.

It does one thing: Turkish speech in a single voice. If that is what you need, it is very small and very fast.

Key specs

Parameters 5.6M acoustic model + 3.0M decoder = 8.6M (about 34 MB)
Output 48 kHz mono audio by default (also 24000, 16000, 8000)
Language Turkish only
Voices One. No voice cloning, no emotion control
Streaming Yes. First audio about 3.86 ms on an RTX 4090, per the card
Speed (RTX 4090, .lightning()) 440x real time for one request; 1,316x with a batch of 64
CPU About 6x real time (RTF 0.166, cloud-container CPU)
Training data An internal corpus of about 1000 hours of single-speaker Turkish speech
License Apache 2.0, weights and code, commercial use included

On Freya-TR-Eval (495 sentences) the card reports 0.92 +/- 0.13% WER for EMA Lightning, against 0.98% for Trendyol-TTS, 1.31% for Gemini 3.8 Flash-Lite and 1.43% for ElevenLabs v4. WER here is measured by running Whisper large-v3 on the generated audio, so some counted errors come from the recogniser. On naturalness the card is blunt: UTMOS is about 3.30, level with ElevenLabs v4 (3.30) and below Gemini 3.8 (3.52 to 3.61) and Trendyol-TTS (3.83). The card’s own tests are the ones to trust; rows marked with a dagger in the card’s table are numbers reported on the Anka TTS model card, not the author’s own runs.

Install

Terminal window
pip install ema-lightning

Run it

Make one EMA object and keep it for the whole program. Creating it downloads ema.pt and decoder.pt and uses the GPU if there is one.

hello_ema.py
from ema_lightning import EMA
tts = EMA()
speech = tts.say("Merhaba, size nasıl yardımcı olabilirim?", path="merhaba.wav")
print(speech.duration, speech.sample_rate) # seconds of audio, 48000

say() returns a Speech with audio (a float32 NumPy array, mono, between -1 and 1), sample_rate, duration in seconds, and the seed that made it. With path, it also writes a WAV file.

On NVIDIA GPUs, call .lightning() once at startup for the fast path:

tts = EMA().lightning()

It measures the best batch size for your GPU (once, then cached), compiles the model, records CUDA graphs, checks them against the plain path, and prints its first-audio time. Without it, or on a CPU, everything works the same, only slower.

Batch voiceovers

Pass a list to say() and the clips are made in shared batches, one Speech per text, in order. With path, they are written into that folder as 0.wav, 1.wav and so on.

batch_clips.py
from ema_lightning import EMA
tts = EMA()
speeches = tts.say(
["Günaydın.", "Siparişiniz yola çıktı.", "İyi günler dileriz."],
path="clips",
)
for i, s in enumerate(speeches):
print(i, round(s.duration, 2), s.seed)

The card lists these options: speed (0.25 to 4, default 1.0), seed (a non-negative integer; the same seed gives the same audio, otherwise random and returned in speech.seed) and sample_rate (48000, 24000, 16000 or 8000). The card’s example calls don’t pass them, but invalid settings raise ValueError before any work starts, so a wrong value fails fast.

Stream audio while it is generated

stream() yields audio piece by piece. The first chunk is one second of audio; the rest follows four seconds at a time, far faster than it plays. It takes one text per call.

stream_to_speaker.py
import sounddevice as sd # pip install sounddevice
from ema_lightning import EMA
tts = EMA()
with sd.OutputStream(samplerate=48000, channels=1, dtype="float32") as speaker:
for chunk in tts.stream(
"Merhaba! Bu ses siz dinlerken üretiliyor. İlk kelimeyi duyduğunuzda, "
"cümlenin geri kalanı çoktan hazır."
):
speaker.write(chunk)

Leave the loop early and the rest of that text’s work is dropped. Joined together, the chunks are the same audio say() gives.

Serve many callers from one model

To stream several texts at once, call stream() once per text, each from its own thread. All calls share the model, and the built-in scheduler, Playhead, runs their work together on the GPU.

concurrent_streams.py
from concurrent.futures import ThreadPoolExecutor
from ema_lightning import EMA
tts = EMA()
texts = [
"Merhaba, size nasıl yardımcı olabilirim?",
"Siparişiniz yola çıktı.",
"Randevunuz onaylandı, görüşmek üzere.",
]
def stream_one(text):
chunks = []
for chunk in tts.stream(text):
chunks.append(chunk) # in a real app: send it to this caller right away
return chunks
with ThreadPoolExecutor(max_workers=len(texts)) as pool:
results = list(pool.map(stream_one, texts)) # one list of chunks per text, in order
print([len(r) for r in results])

Per the card, Playhead keeps first-come-first-served queues, so nobody’s sentences are overtaken, a caller who hangs up leaves the queues, and a failed batch fails only its own callers. The card’s test: on one RTX PRO 6000, 64 streams started at the same instant made 887 seconds of audio in 0.74 seconds.

Gotchas

  • Turkish only. Foreign words are read with Turkish spelling rules.
  • One voice. There is no voice cloning and no emotion control.
  • Text normalization. Numbers, dates and abbreviations go through automatic normalization (the card credits the normalizer-tr project), which can misread unusual input. The card says that for banking, health, legal or emergency messages a person should check the text and audio before they reach anyone.
  • Disclose synthetic speech. The card asks you to tell listeners they are hearing an AI-generated voice and to label published audio, notes that laws in many places (it names the EU AI Act) require this, and says not to use the model for scams, impersonation or putting words in a real person’s mouth.
  • Call .lightning() at startup. The card says to call it once at startup; it measures, compiles and records CUDA graphs, so don’t leave that work for the first request.
  • Benchmarks are the author’s. Rows without a dagger in the card’s table are the author’s own runs, with a specific setup (Whisper large-v3, beam 5, Freya’s normalization).

When to pick it

Pick EMA Lightning if you need Turkish speech that runs offline, on a small GPU or a CPU, with streaming and low latency. The card’s own examples are files, voiceovers, batch jobs, and live playback such as speakers, phone calls and live apps, and the Apache 2.0 license allows commercial use.

Skip it if you need another language, several voices, voice cloning or emotion control. It’s also not the most natural-sounding option the card lists: Gemini 3.8 and Trendyol-TTS score higher on UTMOS. Listen to the card’s three sample clips before committing.

Related