Menu

Offline voice replies on iPhone: LinnetTTS integration in SwiftUI
πŸ“°

Offline voice replies on iPhone: LinnetTTS integration in SwiftUI

DEV Community: iosΒ·VoxRTΒ·6 days ago
#GBPYbUlh
#devtoios#devto#dev#model#voice
Long article (1147 words) β€” no AI summary yet.
Reading 0:00
15s threshold

If you're building an iOS feature that speaks to the user (accessibility read-aloud, assistant replies, interactive storytelling), the default path is a cloud TTS API (OpenAI, ElevenLabs, Google) over the network. That works until the user is on a subway, or you need sub-100 ms time to first audio, or you want a privacy guarantee you can show a regulator.

This is a walkthrough of integrating LinnetTTS on iPhone. It's a streaming on-device neural TTS from VoxRT, 41M parameters, 83 MB of fp16 weights, 24 kHz output. The Swift package ships an xcframework (ios-arm64 and simulator slices) plus a one-screen SwiftUI sample. Everything runs locally; the network is only needed once to download the weights.

What you get, measured

On a stock iPhone 13 Pro Max (A15), one thread: step time 5.5 ms, real-time factor 7%. On an iPhone 11 (A13), one thread: step time 6.7-7.1 ms, RTF 8-9%. First chunk after 80 ms of model work plus the prime pass (about 30 ms with prepared voices).…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.