Downloads · 30 days
4
7% of all-time downloads
augustZheng/TTS-Core-AI
TTS-Core-AI is a text-to-speech model from augustZheng. Use it when you need text read aloud. It is set up for supertonic.
This repository contains Core AI .aimodel assets converted for an arm64 iOS application running on physical iPhone hardware. It is the model-asset companion to the TTSCoreAILab iOS app.
Downloads · 30 days
4
7% of all-time downloads
All-time downloads
60
Public
Repo size
6.3 GB
Likes
0
Public
Click a slice to open those files.
.mlirb4 GB · 82%
From the Hugging Face model README
This repository contains Core AI .aimodel assets converted for an arm64
iOS application running on physical iPhone hardware. It is the model-asset
companion to the TTSCoreAILab iOS app.
Deployment target: iOS 27.0+ on arm64 iPhone hardware.
Benchmark device: iPhone 17 Pro. This identifies the device used for the current RTF benchmark; it is not a guarantee that every included profile has passed end-to-end validation on every iPhone.
| Runtime | Upstream model | Conversion output | Intended use |
|---|---|---|---|
| Kokoro | hexgrad/Kokoro-82M PyTorch model | 11-stage Core AI .aimodel pipeline plus fixed-shape profiles | On-device iOS TTS research and profiling |
| Supertonic 3 | Supertone/supertonic-3 ONNX pipeline | Four Core AI .aimodel stages per fixed-shape profile | On-device iOS TTS research and profiling |
Kokoro subgraphs are exported through torch.export and converted with
coreai_torch. Supertonic ONNX graphs are recovered at fixed shapes, converted
through onnx2torch and torch.export, then converted with coreai_torch.
The resulting assets use the versioned AICode layout required by the iOS 27
device compiler.
These are deployment assets, not general-purpose PyTorch, ONNX, Core ML, web,
Android, macOS, or iOS Simulator models. Use them only with the matching
TTSCoreAILab app and its Core AI runtime integration.
arm64 iPhone hardware with deployment target iOS 27.0.64x64, 128x256, and 256x512 routed profiles,
plus legacy/reference profiles.64x32, 128x64, 128x128, and 128x256
fixed-shape profiles.The iOS project downloads the two directories below into its repository root:
TTSCoreAILab/ModelsTTSCoreAILab/SupertonicResourcesFrom the app repository, run:
./scripts/download-assets.sh
Local iOS workbench for incrementally porting and profiling the split Kokoro pipeline in Swift.
The app integrates the official KittenTTS Swift package and Supertonic 3 ONNX pipeline, and provides four modes:
KittenTTS downloads its Nano model and phonemizer assets on first use. Kokoro and Supertonic 3 use Core AI model assets hosted separately on Hugging Face: https://huggingface.co/augustZheng/TTS-Core-AI.
The Xcode project expects these asset directories:
TTSCoreAILab/ModelsTTSCoreAILab/SupertonicResourcesThey are not committed to GitHub because the full asset bundle is about 4.2 GB and contains files larger than GitHub's regular 100 MB file limit.
Download them from Hugging Face before building:
./scripts/download-assets.sh
The script uses uv to run the Hugging Face CLI without creating a project
virtual environment.
The current stage runs a fixed Hi. text-to-acoustic-feature chain:
fixed token ids + attention mask
-> ALBERT
-> BERT projection
-> fixed-length duration encoder
-> duration head
-> Swift duration/alignment calculation
-> text encoder CNN + LSTM
-> Swift ASR alignment
-> F0/noise shared LSTM + residual blocks
Bundled assets:
kokoro_bert_eager_64.aimodelkokoro_bert_projection.aimodelkokoro_duration_encoder_no_pack_64_intmask.aimodelkokoro_duration_head.aimodelkokoro_text_encoder_conv_64_intmask.aimodelkokoro_text_encoder_lstm.aimodelkokoro_f0n_shared_lstm_64.aimodelkokoro_f0n_blocks_64.aimodelTTSCoreAILab.xcodeproj in Xcode.TTSCoreAILab app target.Run Acoustic Stage.Expected reference result from the Python CoreAI runtime:
[1,64,768], [1,512,64], [1,64,640], [1,64,50][18, 2, 5, 9, 6, 1]4164[1, 512, 64][1, 128][1, 128]Python CoreAI reference mean-absolute values:
0.3592372.44526.594440.023990.164300.18732The current build now also includes:
kokoro_decoder_pre.aimodelkokoro_generator_core.aimodelkokoro_istft.aimodelHi. decoder style and harmonic-source fixturesAVAudioPlayerThe current UI mirrors the browser Local Lab:
af_heart voice selection;64 / 64, 128 / 256, and 256 / 512), with automatic profile escalation for longer segments;The PyTorch reference and native Kokoro comparison controls are visible but disabled because those runtimes are not bundled in the iOS app.
The bundled profiles increase the text/frame budget from 64 / 64 to
128 / 256 and 256 / 512; automatic mode chooses the smallest profile that
fits a segment. Supertonic ships its validated 64 / 32 baseline assets under
SupertonicResources/coreai-assets-baseline.
Tap Generate Locally. A successful run should play generated audio and report:
generator input: [1, 512, 128]
spec/phase: [1, 22, 7681]
audio: [1, 1, 38400]
audio mean absolute value: approximately 0.01756
audio min/max: approximately -0.2076 / 0.3555
The current benchmark on iPhone 17 Pro.
RTF (Real-Time Factor) measures how long it takes to generate one second of audio.
RTF < 1.0 → Faster than real time (suitable for interactive TTS)
Lower is better
The benchmark below compares the same prompt on the same device across different runtimes.
<p align="center"> <img src="docs/images/rtf-result.png" width="900"> </p>