OpenViSTAI · Agents · Blockchain · Crypto
Menu
Audio & Voice AI

KokoroSwift

KokoroSwift is a Swift Package Manager library that ports the Kokoro text-to-speech engine from MLX Python to MLX Swift for integration into iOS and macOS apps. An app supplies the model file and voice style, passes in text, and receives synthesized audio.

Independent OpenViST project profile, based on linked sources.

KokoroSwift — OpenViST project profile in Audio & Voice AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you are building an iOS or macOS app and want to integrate Kokoro text-to-speech through Swift and MLX Swift, with your app managing the model and voice-style files.

Who it is for

  • iOS and macOS developers adding Kokoro speech generation to an app.
  • Swift developers building a text-to-speech demonstration or spoken-text feature.

Documented uses

  • Generate speech audio from text supplied by an app or its users.
  • Include synthesized speech alongside app content.
  • Access token timestamps as part of an integrating app's speech workflow.
Before you choose

Requirements & limits

The repository identifies the project as open source under the MIT License.

  • Requires iOS 18+ or macOS 15+; other Apple platforms are described only as potentially workable.
  • The model file and voice style are not bundled and must be supplied by the integrating app.
  • MLX Swift, MisakiSwift, and MLXUtilsLibrary are listed dependencies.
  • Misaki is the documented default G2P processor; eSpeakNG is mentioned but commented out in the current version.
  • The reported 3.3-times-real-time performance is limited to an iPhone 13 Pro release build after warm-up.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Add KokoroSwift to an iOS or macOS target

Declare the package and product dependency with Swift Package Manager.

Before you start

  • An iOS 18+ or macOS 15+ project
  • Swift Package Manager

Steps

  1. Add https://github.com/mlalma/kokoro-ios.git as a package dependency, using version 1.0.0 or later.

  2. Add the KokoroSwift product from the kokoro-ios package to the target's dependencies.

Expected outcome

The target declares KokoroSwift as a package dependency.

Guide limitations

  • This covers package integration only; it does not configure model or voice files or generate audio.
Source-based practical guide

Generate speech from text in an integrating app

Use the documented API flow to request synthesized speech from text.

Before you start

  • KokoroSwift included in the target
  • A Kokoro model file and voice-style embedding supplied by the app
  • iOS 18+ or macOS 15+

Steps

  1. Import KokoroSwift and create a model URL for the supplied model file.

  2. Initialize KokoroTTS with the model path and the documented default .misaki G2P option.

  3. Provide a voice embedding, text, and language to generateAudio.

  4. Use the returned audio buffer in the integrating app.

Expected outcome

The API returns an audio buffer containing synthesized speech for the supplied text.

Guide limitations

  • The package requires the app to provide the model file and voice style.
  • The README's example specifies English (enUS); it does not establish support for other languages.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
mlalma/kokoro-ios · Official homepage title · retained in its source language