Four-stage pipeline; per-stage compute-unit placement; selective int8 PTQ on
the text-and-prosody predictor; fp32 decoder.
These weights carry use restrictions beyond MIT. Read the License
section before downloading.
They are not a drop-in permissively-licensed
TTS model. If you need permissive terms, use
Kokoro
instead.
License & use restrictions
The upstream repository code is MIT, but the pre-trained LibriTTS weights
carry
two non-negotiable restrictions
declared in
yl4579/StyleTTS2's README
:
Synthetic-origin disclosure.
Any deployment that produces audio from
these weights must clearly disclose to listeners that the audio is
synthetic. No undisclosed synthetic-speech publishing.
Speaker consent for voice cloning.
Cloning a real person's voice
requires their consent. No unauthorized celebrity / public-figure /
non-consenting third-party voice cloning.
These restrictions ride with the weights through every redistribution,
fine-tune, and downstream derivative. Anyone downloading this repo inherits
them and must propagate them in turn.
If you cannot or will not honor these terms,
do not download these
weights
.
License-of-record:
github.com/yl4579/StyleTTS2
upstream README at the time of conversion (see
Conversion provenance
below
for the pinned commit).
Both source
.mlpackage
(uncompiled, portable across Xcode versions) and
pre-compiled
.mlmodelc
(Apple Silicon, ready for
MLModel(contentsOf:)
)
are shipped. The
.mlmodelc
artifacts are under
compiled/
. Pick one:
*.mlpackage
— load via
MLModel(contentsOf:)
; the OS compiles on
first load (~5–20 s cold start the first time, cached afterward).
compiled/*.mlmodelc
— already compiled; same loader path skips the
on-device compile. Useful for shipping inside an app bundle.
The diffusion sampler loop (ADPM2 + Karras schedule + CFG) and the
hard-alignment matrix (cumsum-of-durations → one-hot → matmul) live in your
host application (Swift / Python). Per-step inference is in CoreML; control
flow is not.
Why the precision split looks like this
text_predictor is fp16.
Selective int8 PTQ was tried and dropped:
on Apple Silicon ANE the int8 path saves only ~3 MB per bucket of
weight bandwidth, has no exposed int8 GEMM, and dequantizes back to
fp16 on load. The savings did not justify the parity risk on small
projections.
diffusion_step stays fp16.
It runs 5 times per utterance through an
ODE-style sampler; quantization noise compounds through iterations.
Same lesson as PocketTTS issue #7.
f0n_energy stays fp16.
~6 MB. No bandwidth payoff; quantizing
small projections injects audible pitch noise.
decoder is fp32, not fp16.
SineGen's harmonic source accumulates
phase via
cumsum × 2π × hop=300
, reaching magnitudes
4000
mid-frame. fp16 precision at that magnitude (
4) is much larger than
the per-sample increment (~0.05 rad), which scrambles the sine output
and produces audibly robotic synthesis. fp32 is required end-to-end.
Why only one diffusion bucket
Empirically every observed
bert_dur
fits in B=512. The 32/64/128/256
buckets were dead weight (~192 MB) given the non-linear cost ladder
(B=32 ≈ 66 ms/step, B=512 ≈ 152 ms/step). Dropping them adds at most
~430 ms per utterance in the worst short case.
Performance
RTFx:
4.32× warm on M-series Mac (5-step ADPM2 sampler, all buckets
pre-warmed).
Log-mel cosine vs PyTorch fp32:
0.9687.
ECAPA-TDNN cosine to reference clip:
0.18 — at the model's
architectural ceiling. PyTorch fp32 itself only reaches 0.29 on the
same metric. Voice-clone fidelity is bounded by StyleTTS2's
architecture, not by this conversion.
How to use
Phonemizer
espeak-ng IPA + stress. The 178-token vocabulary in
constants/text_cleaner_vocab.json
mirrors
text_utils.TextCleaner
from
the upstream repo:
[pad] + punctuation + ASCII letters + IPA letters
.
English (LibriTTS) only.
No multilingual support in this
checkpoint.
HiFi-GAN decoder, not iSTFTNet.
LibriTTS upstream uses HiFi-GAN, so
no
torch.stft
/ complex tensors in the conversion path.
Decoder is fp32, not fp16.
Documented above. The mlpackage size
reflects this (≈210 MB per bucket).
Voice-clone fidelity ceiling is architectural.
ECAPA-TDNN cosine
to reference clip ≈ 0.18 here, ≈ 0.29 in PyTorch fp32. The same-speaker
threshold is ~0.30. This isn't a quantization or conversion artifact;
see PR #46 TRIALS.md Phase 5.
No streaming.
Whole utterance only. Add chunked streaming on the
host side if you need it.
Citation & acknowledgments
Yinghao Aaron Li et al. — StyleTTS2 architecture and LibriTTS
checkpoint.
LibriTTS authors (CC-BY-4.0 training data).
espeak-ng — phonemization frontend.
@inproceedings{li2023styletts2,
title = {StyleTTS 2: Towards Human-Level Text-to-Speech through Style Diffusion and Adversarial Training with Large Speech Language Models},
author = {Li, Yinghao Aaron and Han, Cong and Raghavan, Vinay and Mischler, Gavin and Mesgarani, Nima},
booktitle = {NeurIPS},
year = {2023}
}
Runs of FluidInference StyleTTS-2-coreml on huggingface.co
534
Total runs
0
24-hour runs
0
3-day runs
13
7-day runs
470
30-day runs
More Information About StyleTTS-2-coreml huggingface.co Model
StyleTTS-2-coreml huggingface.co is an AI model on huggingface.co that provides StyleTTS-2-coreml's model effect (), which can be used instantly with this FluidInference StyleTTS-2-coreml model. huggingface.co supports a free trial of the StyleTTS-2-coreml model, and also provides paid use of the StyleTTS-2-coreml. Support call StyleTTS-2-coreml model through api, including Node.js, Python, http.
StyleTTS-2-coreml huggingface.co is an online trial and call api platform, which integrates StyleTTS-2-coreml's modeling effects, including api services, and provides a free online trial of StyleTTS-2-coreml, you can try StyleTTS-2-coreml online for free by clicking the link below.
FluidInference StyleTTS-2-coreml online free url in huggingface.co:
StyleTTS-2-coreml is an open source model from GitHub that offers a free installation service, and any user can find StyleTTS-2-coreml on GitHub to install. At the same time, huggingface.co provides the effect of StyleTTS-2-coreml install, users can directly use StyleTTS-2-coreml installed effect in huggingface.co for debugging and trial. It also supports api for free installation.