Swift SDK
The Swift SDK wraps KittenTTS in a native actor with async generation, sentence streaming, speaker playback, WAV export, word timings, and bundled-asset support.
Apple platformsiOS 16+ and macOS 14+
Swift 5.9+Install through Swift Package Manager
Native async APIONNX Runtime, AVFoundation playback, 24 kHz output
import KittenTTS
let tts = try await KittenTTS()
let result = try await tts.generate("Hello from KittenTTS.", voice: .bella)
print(result.duration)
try await tts.speak("This plays through the device speakers.")
Included capabilities
- Four local models and eight voices.
- Native speaker playback and stop control.
AsyncThrowingStreamgeneration for long input.- WAV
Dataand atomic file export. - Model-predicted word timings.
- Built-in, eSpeak, or custom phonemizers.
- Downloaded cache or fully bundled app resources.
Repository: KittenML/KittenTTS-swift