A fully on-device Russian text-to-speech voice for Apple platforms (iOS/macOS), plus everything needed to turn raw Russian text into the phoneme stream the model expects. The acoustic model is a StyleTTS2 fine-tune...
Fuente del modelo
Descripción de la fuente
A fully on-device Russian text-to-speech voice for Apple platforms (iOS/macOS), plus everything needed to turn raw Russian text into the phoneme stream the model expects. The acoustic model is a StyleTTS2 fine-tune exported to , designed to run through the runtime. No server, no network at inference time, no Python.
Fuentes
1 fuenteVerificado 13 sept
Artefactos del modelo
64 artefactosExtractos de fuentes
2 extractosStyleTTS2Built for the Subly app, released openly so anyone can use it. 24 kHz, female voice, neutral narration style.
| Path | What it is | Size |
|---|---|---|
models/*.mlmodelc | 14 StyleTTS2 stages compiled to Core ML (FLOAT32): text_encoder, bert (+t64/t128/t256 token buckets), ref_encoder, fused_diffusion_sampler (+buckets), duration_predictor, fused_f0n_har_source, decoder_pre, decoder_upsample | ~867 MB |
ru_stress.bin | Word→stress dictionary, 3.19 M entries (mmap, binary-searchable) | 87 MB |
ru_accent_oov_fp32.mlmodelc | Char-level RoFormer that predicts stress for out-of-dictionary words | 2.2 MB |
ru_yo.bin | ё-restoration dictionary, 85.5 K words (е→ё) | 2.5 MB |
ru_natasha_ref.wav | Reference clip — StyleTTS2 timbre is zero-shot from this audio (24 kHz mono) | 156 KB |
Russian text becomes audio in four steps. The first three are CPU-cheap; only the last touches the neural models.
raw text
→ ё-restoration (ru_yo.bin) "елка" → "ёлка"
→ stress marking (ru_stress.bin, "ёлка" → "+ёлка" (+ before the stressed vowel)
OOV model for misses)
→ grapheme→IPA (ru_g2p.py) "+ёлка" → "jˈolkə"
→ StyleTTS2 synthesis (models/, ref clip) IPA → 24 kHz waveform
This mirrors the training pipeline (RUAccent stress + a rule-based G2P), so the IPA fed at inference matches what the model was trained on.
| Param | Value | Note |
|---|---|---|
alpha | 0.5 | reference/diffusion style blend |
beta | 0.9 | more diffusion-driven prosody = livelier |
noiseSeed | 1 | a pleasant default; only changes the per-utterance sample |
| compute units | CPU-only | the diffusion stage is FP32 (can't run on ANE); under MPS the ref-encoder mixes FP16/FP32 and crashes — run on CPU |
import FluidAudio
// Point the manager at the `models/` directory from this repo.
let manager = StyleTTS2Manager(directory: modelsDir, computeUnits: .cpuOnly)
try await manager.initialize()
let ipa = "prjɪvjˈɛt ! ˈɛtə tjˈɛst rˈusskəvə djˈiktərə ." // from the pipeline above
let samples = try await manager.synthesize(
ipa: ipa,
referenceAudioURL: refClipURL, // ru_natasha_ref.wav
alpha: 0.5, beta: 0.9, noiseSeed: 1
) // -> [Float] PCM @ 24 kHz
The IPA is tokenized by FluidAudio's StyleTTS2TextCleaner (the StyleTTS2 178-symbol
set); any symbol outside that set is dropped, so feed clean IPA.
So you can read these from any language, not just Swift.
ru_stress.bin and ru_yo.binLittle-endian, sorted by UTF-8 byte order (so a byte-wise binary search works):
ru_stress.bin: ["RUS1"][u32 count][offsets: count × u32][records]
record = [u8 keyLen][key UTF-8][u8 pos]
pos = char index of the stressed vowel (where '+' is inserted); 255 = unstressed.
ru_yo.bin: ["RUYO"][u32 count][offsets: count × u32][records]
record = [u8 keyLen][key UTF-8][u8 posCount][posCount × u8 charIndex]
charIndex = positions in the (lowercased) word where 'е' should become 'ё'.
offsets[i] is the byte offset of record i relative to the start of the records
section (= 8 + count*4). Binary-search by reading offsets[mid], then the key.
ru_accent_oov_fp32.mlmodelc (OOV stress model)Char-level token classifier (converted from RUAccent's nn_accent).
input_ids: [1, 48] int32 — [bos]=2, then chars by the vocab below, [eos]=3, padded with [pad]=0.logits: [1, 48, 3] — labels 0=NO, 1=STRESS_PRIMARY, 2=STRESS_SECONDARY.+ before char i-1 when position i is argmax PRIMARY with probability ≥ 0.55.Vocab (id → token): 0 [pad], 1 [unk], 2 [bos], 3 [eos], 4 ', 5 -, 6 .,
7 ?, 8 `, 9 c, 10 e, 11 ́ (U+0301), then Cyrillic 12 а ... 43 я, 44 ё.
57/64/128/256.123 won't be voiced).This repository is released under CC BY 4.0 — use it commercially or non-commercially, just keep the attributions below.
Please credit "SOVA TTS Natasha (CC BY 4.0, Virtual Assistant LLC)" and this repo when you use the voice.
models/bert_fp16_t128.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 76d33b62ef8b…606e · Hugging Face
Descargarmodels/bert_fp16_t256.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 aab6f4e80f3a…a9e3 · Hugging Face
Descargarmodels/bert_fp16_t256.mlmodelc/coremldata.bin
bin · 441 B · SHA-256 a6be4cb0edd0…07f1 · Hugging Face
Descargarmodels/bert_fp16_t256.mlmodelc/weights/weight.bin
bin · 23,3 MB · SHA-256 40c3e10b5afa…a15d · Hugging Face
Descargarmodels/bert_fp16_t64.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 f7beefe8f597…f3d2 · Hugging Face
Descargarmodels/bert_fp16_t64.mlmodelc/coremldata.bin
bin · 437 B · SHA-256 fb93a6c5cc45…10f8 · Hugging Face
Descargarmodels/bert_fp16_t64.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 bbd7fef72cd0…4cdd · Hugging Face
Descargarmodels/bert_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 1dc0b35fffb6…345a · Hugging Face
Descargarmodels/bert_fp16.mlmodelc/coremldata.bin
bin · 437 B · SHA-256 928469517e42…d90e · Hugging Face
Descargarmodels/bert_fp16.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 5d98fa393bda…5fd5 · Hugging Face
Descargarmodels/decoder_pre_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 9376a753a257…31a0 · Hugging Face
Descargarmodels/decoder_pre_fp16.mlmodelc/coremldata.bin
bin · 490 B · SHA-256 b1dce025e38b…9324 · Hugging Face
Descargarmodels/decoder_pre_fp16.mlmodelc/weights/weight.bin
bin · 128 MB · SHA-256 c2427eac607c…ea80 · Hugging Face
Descargarmodels/decoder_upsample_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 a71b19d581e7…c0a4 · Hugging Face
Descargarmodels/decoder_upsample_fp16.mlmodelc/coremldata.bin
bin · 467 B · SHA-256 161c40ceadc9…4684 · Hugging Face
Descargarmodels/decoder_upsample_fp16.mlmodelc/weights/weight.bin
bin · 78,9 MB · SHA-256 b3b7c42b28c2…937f · Hugging Face
Descargarmodels/duration_predictor_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 7c6963b51287…4eac · Hugging Face
Descargarmodels/duration_predictor_fp16.mlmodelc/coremldata.bin
bin · 470 B · SHA-256 829e39feda9e…1798 · Hugging Face
Descargarmodels/duration_predictor_fp16.mlmodelc/weights/weight.bin
bin · 29,6 MB · SHA-256 2f5face6829b…97a5 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t128.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 adbb9416c3b4…af7d · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t128.mlmodelc/coremldata.bin
bin · 462 B · SHA-256 073af3e2b1da…7fe1 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t128.mlmodelc/weights/weight.bin
bin · 94,1 MB · SHA-256 38fa4543513f…37c9 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t256.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 6de3456a7b67…f50c · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t256.mlmodelc/coremldata.bin
bin · 462 B · SHA-256 8541ab25bb7a…b517 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t256.mlmodelc/weights/weight.bin
bin · 94,1 MB · SHA-256 38fa4543513f…37c9 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t64.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 90fb7f8121c1…fc9b · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t64.mlmodelc/coremldata.bin
bin · 461 B · SHA-256 07d596ba5d69…52f5 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16_t64.mlmodelc/weights/weight.bin
bin · 94,1 MB · SHA-256 38fa4543513f…37c9 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 790c55beced8…6f0e · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16.mlmodelc/coremldata.bin
bin · 461 B · SHA-256 ebddfa2bd931…30f2 · Hugging Face
Descargarmodels/fused_diffusion_sampler_fp16.mlmodelc/weights/weight.bin
bin · 94,1 MB · SHA-256 38fa4543513f…37c9 · Hugging Face
Descargarmodels/fused_f0n_har_source.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 2a942bab9c30…53f2 · Hugging Face
Descargarmodels/fused_f0n_har_source.mlmodelc/coremldata.bin
bin · 441 B · SHA-256 777f486931a7…4328 · Hugging Face
Descargarmodels/fused_f0n_har_source.mlmodelc/weights/weight.bin
bin · 32,1 MB · SHA-256 0103bde900eb…b6ff · Hugging Face
Descargarmodels/ref_encoder_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 6644754aa623…f644 · Hugging Face
Descargarmodels/ref_encoder_fp16.mlmodelc/coremldata.bin
bin · 372 B · SHA-256 898ccfedf04c…6030 · Hugging Face
Descargarmodels/ref_encoder_fp16.mlmodelc/weights/weight.bin
bin · 106 MB · SHA-256 5dc31c37b785…6995 · Hugging Face
Descargarmodels/text_encoder_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 632216b5d62f…0150 · Hugging Face
Descargarmodels/text_encoder_fp16.mlmodelc/coremldata.bin
bin · 452 B · SHA-256 559d31acf61a…4d73 · Hugging Face
Descargarmodels/text_encoder_fp16.mlmodelc/weights/weight.bin
bin · 21,4 MB · SHA-256 c2596ba452e8…7f54 · Hugging Face
Descargarru_accent_oov_fp32.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 32ab2cfacbed…c73e · Hugging Face
Descargarru_accent_oov_fp32.mlmodelc/coremldata.bin
bin · 374 B · SHA-256 b4a962493dff…5cad · Hugging Face
Descargarru_accent_oov_fp32.mlmodelc/weights/weight.bin
bin · 2,08 MB · SHA-256 4bfdcddea36c…7730 · Hugging Face
Descargarstyletts2/bert_fp16_t128.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 8ccaff5aae43…c14a · Hugging Face
Descargarstyletts2/bert_fp16_t128.mlmodelc/coremldata.bin
bin · 441 B · SHA-256 1b249e5af898…996f · Hugging Face
Descargarstyletts2/bert_fp16_t128.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 76d33b62ef8b…606e · Hugging Face
Descargarstyletts2/bert_fp16_t256.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 aab6f4e80f3a…a9e3 · Hugging Face
Descargarstyletts2/bert_fp16_t256.mlmodelc/coremldata.bin
bin · 441 B · SHA-256 a6be4cb0edd0…07f1 · Hugging Face
Descargarstyletts2/bert_fp16_t256.mlmodelc/weights/weight.bin
bin · 23,3 MB · SHA-256 40c3e10b5afa…a15d · Hugging Face
Descargarstyletts2/bert_fp16_t64.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 f7beefe8f597…f3d2 · Hugging Face
Descargarstyletts2/bert_fp16_t64.mlmodelc/coremldata.bin
bin · 437 B · SHA-256 fb93a6c5cc45…10f8 · Hugging Face
Descargarstyletts2/bert_fp16_t64.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 bbd7fef72cd0…4cdd · Hugging Face
Descargarstyletts2/bert_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 1dc0b35fffb6…345a · Hugging Face
Descargarstyletts2/bert_fp16.mlmodelc/coremldata.bin
bin · 437 B · SHA-256 928469517e42…d90e · Hugging Face
Descargarstyletts2/bert_fp16.mlmodelc/weights/weight.bin
bin · 23,1 MB · SHA-256 5d98fa393bda…5fd5 · Hugging Face
Descargarstyletts2/decoder_pre_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 9376a753a257…31a0 · Hugging Face
Descargarstyletts2/decoder_pre_fp16.mlmodelc/coremldata.bin
bin · 490 B · SHA-256 b1dce025e38b…9324 · Hugging Face
Descargarstyletts2/decoder_pre_fp16.mlmodelc/weights/weight.bin
bin · 128 MB · SHA-256 c2427eac607c…ea80 · Hugging Face
Descargarstyletts2/decoder_upsample_fp16.mlmodelc/analytics/coremldata.bin
bin · 243 B · SHA-256 a71b19d581e7…c0a4 · Hugging Face
Descargarstyletts2/decoder_upsample_fp16.mlmodelc/coremldata.bin
bin · 467 B · SHA-256 161c40ceadc9…4684 · Hugging Face
Descargar--- license: cc-by-4.0 language: - ru pipeline_tag: text-to-speech tags: - text-to-speech - tts - russian - styletts2 - coreml - on-device - ios - macos library_name: coreml --- # Subly RU TTS — On-device Russian voice "Natasha" (StyleTTS2 → Core ML) A **fully on-device Russian text-to-speech voice** for Apple platforms (iOS/macOS), plus everything needed to turn raw Russian text into the phoneme stream the model expects. The acoustic model is a [StyleTTS2](https://github.com/yl4579/StyleTTS2) fine-tune exported to **Core ML**, designed to run through the [FluidAudio](https://github.com/FluidInference/FluidAudio) `StyleTTS2` runtime. No server, no network at inference time, no Python. > Built for the **Subly** app, released openly so anyone can use it. 24 kHz, female > voice, neutral narration style. --- ## What's in this repo | Path | What it is | Size | |---|---|---| | `models/*.mlmodelc` | 14 StyleTTS2 stages compiled to Core ML (FLOAT32): `text_encoder`, `bert` (+`t64/t128/t256` token buckets), `ref_encoder`, `fused_diffusion_sampler` (+buckets), `duration_predictor`, `fused_f0n_har_source`, `decoder_pre`, `decoder_upsample` | ~867 MB | | `ru_stress.bin` | Word→stress dictionary, **3.19 M** entries (mmap, binary-searchable) | 87 MB | | `ru_accent_oov_fp32.mlmodelc` | Char-level RoFormer that predicts stress for **out-of-dictionary** words | 2.2 MB | | `ru_yo.bin` | ё-restoration dictionary, **85.5 K** words (е→ё) | 2.5 MB | | `ru_natasha_ref.wav` | Reference clip — StyleTTS2 timbre is zero-shot from this audio (24 kHz mono) | 156 KB | | `ru_g2p.py` | Reference grapheme→IPA phonemizer (rule-based Russian phonology) | — | | `manifest.json` | Flat list of every file + size (for on-demand downloaders) | — | --- ## The pipeline Russian text becomes audio in four steps. The first three are CPU-cheap; only the last touches the neural models. ``` raw text → ё-restoration (ru_yo.bin) "елка" → "ёлка" → stress marking (ru_stress.bin, "ёлка" → "+ёлка" (+ before the stressed vowel) OOV model for misses) → grapheme→IPA (ru_g2p.py) "+ёлка" → "jˈolkə" → StyleTTS2 synthesis (models/, ref clip) IPA → 24 kHz waveform ``` This mirrors the training pipeline (RUAccent stress + a rule-based G2P), so the IPA fed at inference matches what the model was trained on. ### Recommended runtime parameters | Param | Value | Note | |---|---|---| | `alpha` | `0.5` | r...
Source context: 0 downloads · 1 likes · Pipeline text-to-speech · Library coreml · Repo nakash1987/subly-ru-tts
ru_g2p.py | Reference grapheme→IPA phonemizer (rule-based Russian phonology) | — |
manifest.json | Flat list of every file + size (for on-demand downloaders) | — |