MioTTS BG/EN 64M — architecture preview
Untrained architecture preview. The weights are randomly initialized and cannot synthesize intelligible speech. This repository exists so the proposed network can be inspected in tools such as HF Viewer. It does not contain the previous NanoCodec model or any training dataset.
Main model
| Component | Structure |
|---|---|
| Input | Bulgarian Cyrillic or English Latin characters and punctuation; no digits, phonemes, or language ID |
| Text encoder | 5 bidirectional transformer blocks, width 384, 8 heads, SwiGLU width 1280 |
| Duration prior | Two convolution layers and a soft monotonic cross-attention bias |
| Main-model conditioning | Text tokens only; no reference audio or speaker embedding enters the model |
| Audio decoder | 11 causal transformer blocks, width 512, 8 heads, cross-attention to text, SwiGLU width 1280, KV cache |
| Output | One 12,800-way MioCodec content-token distribution per frame plus a separate stop head |
| Rate | 25 frames/s; at most 300 content frames for 12-second segments |
| Waveform and voice | External MioCodec 25 Hz / 44.1 kHz v2 decoder receives the predicted content tokens and its own global voice embedding |
The exact count of trainable main-model parameters is recorded in architecture.json. The external codec is not included in that count or in this repository. At inference, the only external input to the main model is text. Its autoregressive decoder internally consumes previously generated audio tokens. During training, ground-truth previous audio tokens are supplied by teacher forcing; these are targets from the training clip, not a reference voice. Audio input IDs use 0..12799 for codec codes and 12800 for beginning of speech. The output code head shares the first 12,800 rows of the audio embedding. The text vocabulary has no digit or language token.
Voice choice happens only after the main model has generated content tokens: a separate MioCodec encoder can extract a global embedding from a short example, and the separate MioCodec decoder uses that embedding while rendering the tokens. A stored default embedding also permits synthesis without supplying an example at inference. The main model itself never sees the voice embedding.
The duration predictor and Gaussian monotonic attention prior are implemented, but duration targets or a separate alignment procedure are needed for training. The architecture has only been checked with shape, finite-loss, serialization, and cached-decoding tests. Real-time factor and speech quality of this untrained model have not been measured. Four Bulgarian corpus utterances have been reconstructed successfully with MioCodec v2; that checks the codec, not text-to-token generation.
Loading the architecture
from transformers import AutoModel
model = AutoModel.from_pretrained(
"beleata74/MioTTS-BG-EN-64M-Architecture",
trust_remote_code=True,
)
print(sum(p.numel() for p in model.parameters()))
This loads random initial weights for inspection only. The codec weights are downloaded separately from their author when building a functioning system.