# Argmax Open-Source SDK (Swift)

> WhisperKit, TTSKit and SpeakerKit — on-device speech for Apple Silicon in one Swift package

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Swift
- Licence: MIT
- Repository: https://github.com/argmaxinc/argmax-oss-swift
- Website: https://argmaxinc.com/blog
- Canonical page: https://ai-tldr.dev/tools/argmax-oss-swift/

## In short

Argmax Open-Source SDK (Swift) is WhisperKit, TTSKit and SpeakerKit — on-device speech for Apple Silicon in one Swift package. WhisperKit handles speech-to-text with OpenAI Whisper, SpeakerKit does speaker diarization with Pyannote, and TTSKit does text-to-speech with Qwen-TTS. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Swift and licensed MIT.

## Overview

Argmax Open-Source SDK Swift is a collection of turn-key on-device inference frameworks for Apple Silicon, distributed as one Swift package with three library products. WhisperKit handles speech-to-text with OpenAI Whisper, SpeakerKit does speaker diarization with Pyannote, and TTSKit does text-to-speech with Qwen-TTS.

Everything runs locally on the device rather than calling a hosted API, which is the point: audio never leaves the machine, there is no per-minute billing, and transcription works offline. WhisperKit in particular has become a common way to put Whisper into a macOS or iOS app without shipping a Python runtime alongside it.

You add the package once and pick the products you need — WhisperKit, TTSKit and SpeakerKit individually, or the ArgmaxOSS umbrella product to import all three. Each kit also ships a Swift CLI, WhisperKit adds a local server exposing HTTP endpoints for non-Swift callers, and the transcription and diarization kits can be combined so a transcript carries speaker labels. The project requires macOS 14.0 or later and Xcode 16.0 or later. Argmax also sells a commercial Pro SDK covering real-time transcription with speakers, custom vocabulary, a local server for non-native apps and Android support via a Kotlin SDK; this repository is the open-source subset.

## What it does

- WhisperKit: on-device speech-to-text with OpenAI Whisper, including memory-efficient loading for large files and selectable model sizes
- SpeakerKit: speaker diarization with Pyannote, combinable with transcription and able to emit RTTM output
- TTSKit: text-to-speech with Qwen-TTS, custom voices, real-time streaming playback and style instructions on the 1.7B model
- Distributed as one Swift package with per-kit library products plus an ArgmaxOSS umbrella product
- A Swift CLI for each kit, and a WhisperKit local server with HTTP endpoints and a generated API specification for non-Swift clients
- Runs entirely on-device on Apple Silicon — no audio leaves the machine and transcription works offline

## Getting started

Add the Swift package to your project and select the kits you need. macOS 14.0+ and Xcode 16.0+ are required. For command-line transcription only, Homebrew is faster.

1. Add the package in Xcode

   File > Add Package Dependencies…, enter the repository URL, choose a version, then select ArgmaxOSS for all kits or pick individual products.

```text
https://github.com/argmaxinc/argmax-oss-swift
```

2. Or declare it in Package.swift

   Add the package dependency, then list the products you want as target dependencies.

```text
dependencies: [
    .package(url: "https://github.com/argmaxinc/argmax-oss-swift.git", from: "0.9.0"),
],

.target(
    name: "YourApp",
    dependencies: [
        // Import everything at once:
        .product(name: "ArgmaxOSS", package: "argmax-oss-swift"),

        // Or pick individual kits:
        // .product(name: "WhisperKit", package: "argmax-oss-swift"),   // speech-to-text
        // .product(name: "TTSKit", package: "argmax-oss-swift"),       // text-to-speech
        // .product(name: "SpeakerKit", package: "argmax-oss-swift"),   // speaker diarization
    ]
),
```

3. Transcribe a file with WhisperKit

   Initialize the pipeline with default settings and transcribe a local audio file.

```text
import WhisperKit

// Initialize WhisperKit with default settings
Task {
    let pipe = try? await WhisperKit()
    let results = try? await pipe?.transcribe(audioPath: audioPath)
}
```

4. Install the CLI with Homebrew

   For transcription from the terminal without building an app.

```bash
brew install whisperkit-cli
```

## When to use it

- Ship Whisper transcription inside a macOS or iOS app without a hosted API or a bundled Python runtime
- Produce a diarized transcript that labels who spoke when, by combining SpeakerKit with WhisperKit
- Add on-device text-to-speech with custom voices and streaming playback to an Apple-platform app
- Transcribe audio on a machine with no network access, or where recordings must not leave the device
