Skip to main content

When to Use

  • Best quality, full generation — Kokoro generates all frames at once. Use when you can wait for complete audio before playback.
  • Need streaming/immediate playback — Use PocketTTS instead (~80ms to first audio).

Specs

Model: FluidInference/kokoro-82m-coreml

Quick Start

CLI

Swift

Chunk Metadata

Pipeline

Because espeak runs outside the model as a preprocessing step, you can intercept and edit phonemes before they reach the neural network. This is what enables SSML, custom lexicon, and markdown pronunciation control.

Pronunciation Control

Kokoro supports three ways to override pronunciation:
  • SSML tags<phoneme>, <sub>, <say-as>. See SSML documentation.
  • Custom lexicon — word → IPA mapping files loaded via setCustomLexicon(). See Custom Pronunciation.
  • Markdown syntax — inline [word](/ipa/) overrides in the input text.

Kokoro vs PocketTTS

Benchmarks

Same text samples generating 1s to ~300s of output audio, M4 Pro: CoreML matches MLX speed with 55% less peak RAM. PocketTTS benchmarks coming soon.

Enable in Your Project

Package.swift

Import