Model reference · open weights
BlueMagpie-TTS is an open-weight audio or speech model from OpenFormosa. BlueMagpie-TTS (BF16) weighs 7.8 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the OpenFormosa/BlueMagpie-TTS model card, 2026-11-24
What it is
| Released by | OpenFormosa |
|---|---|
| Released | 2026-06-22 |
| VRAM | 7.8 GB for the weights |
What it runs on
| Card | One stream | Memory |
|---|---|---|
| RTX 3060 12 GB | fits | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
From the model card
BlueMagpie-TTS checkpoint for research and evaluation. The files in this Hub repository are the selected two-mode recovery release. Experimental branches are not promoted when they regress the production speaker-reference path.
This repository contains the inference artifact only: model weights, AudioVAE weights, tokenizer files, config, and usage documentation. It does not include optimizer state, scheduler state, training logs, private speaker registries, local configs, or training-data metadata.
git clone https://github.com/voidful/BlueMagpie-TTS
cd BlueMagpie-TTS
pip install -e ".[speaker]"
pip install soundfile
from huggingface_hub import snapshot_download
import soundfile as sf
from bluemagpie import BlueMagpieModel, speaker_embedding_from_wav
model_dir = snapshot_download("OpenFormosa/BlueMagpie-TTS")
model = BlueMagpieModel.from_local(model_dir, training=False, device="cuda")
reference_embedding = speaker_embedding_from_wav(
"reference_speaker.wav", window_sec=3.0, hop_sec=1.5
)
audio = model.generate(
target_text="這是 AI TTS code switching 測試。",
speaker_centroid=reference_embedding,
cfg_value=2.0,
inference_timesteps=10,
retry_badcase=False,
stop_threshold=0.65,
stop_consecutive=2,
)
sf.write("sample.wav", audio.detach().cpu().numpy(), model.sample_rate)
The hosted BlueMagpie-TTS Demo uses the same checkpoint weights with an inference-only endpoint guard. It starts with a 0.50 stop threshold, lowers the threshold only after 75% of the native-rate duration estimate, reaches 0.05 at 95%, and accepts one stop hit. Generation is still capped at the native-rate estimate plus one latent step. Playback pace is corrected only after generation has stopped, so pace control does not hold the model open and create extra speech.
This interactive policy is intentionally separate from the reproducible
offline evaluation default of stop_threshold=0.65 and
stop_consecutive=2. Neither policy uses retry selection or best-of-N
reranking in its standard path.
The hosted Space keeps Speaker A as the default and loads its fixed Speaker B
voice from checkpoints/speaker_b_embedding.pt. The artifact is a 192-dimensional,
L2-normalized embedding extracted from the clean Speaker B reference set. Its
payload uses the bluemagpie-speaker-embedding-v1 format and includes
speaker_id="female_voice", generation_seed=56789, and the Space runtime
profile speaker_projector_scale=1.125.
The deployed Space pins model revision
6f7cab914a1e27c56b504ec663c0144dc25cc0a3 and validates the embedding SHA-256
e9556e14723c140985a104c1659d1ff8a5078d2fa28ce2fb756f04906641a8a7 at
startup. Each text chunk is generated exactly once with retry_badcase=False;
the request path does not run ASR, speaker verification, candidate reranking,
or output-validation retries.
import os
import torch
payload = torch.load(
os.path.join(model_dir, "checkpoints", "speaker_b_embedding.pt"),
map_location="cpu",
weights_only=True,
)
speaker_b = torch.nn.functional.normalize(payload["embedding"].float(), dim=0)
audio = model.generate(
target_text="今天的會議改到下午三點。",
speaker_centroid=speaker_b,
cfg_value=2.0,
inference_timesteps=10,
retry_badcase=False,
stop_threshold=0.65,
stop_consecutive=2,
)
generation_seed and speaker_projector_scale are metadata for the hosted
Space's fixed Speaker B runtime profile; speaker_projector_scale is not a
public generate() keyword argument.
# centroid-only
audio = model.generate(
target_text="今天的會議改到下午三點。",
speaker_centroid=centroid_tensor,
cfg_value=2.0,
inference_timesteps=10,
stop_threshold=0.65,
stop_consecutive=2,
)
# speaker-reference-audio-only: extract once; no transcript required
reference_embedding = speaker_embedding_from_wav(
"reference_speaker.wav", window_sec=3.0, hop_sec=1.5
)
audio = model.generate(
target_text="今天的會議改到下午三點。",
speaker_centroid=reference_embedding,
cfg_value=2.0,
inference_timesteps=10,
stop_threshold=0.65,
stop_consecutive=2,
)
Only use reference audio or speaker centroids from speakers you have permission to synthesize. Reference clips should be at least 3 seconds. The speaker-reference-audio-only mode uses one window-averaged speaker embedding for the full request and does not require a reference transcript. Raw reference tokens remain a separately evaluated research path.
Use the CLI for long-form synthesis. It preserves punctuation, reuses one speaker embedding for every chunk, applies punctuation-aware pauses, and can set a minimum duration from the target speaking rate:
python scripts/generate_tts.py \
--checkpoint /path/to/model-snapshot \
--mode speaker-reference-audio-only \
--speaker-reference-wav /path/to/rights-cleared-reference.wav \
--reference-audio-conditioning speaker-embedding \
--text-file long_text.txt \
--chunk-chars 80 \
--min-chunk-chars 12 \
--target-chars-per-sec 4.0 \
--stop-threshold 0.65 \
--stop-consecutive 2 \
--crossfade-ms 80 \
--chunk-rms-match-db 4 \
--chunk-edge-fade-ms 80 \
--continuation-context-sec 0 \
--no-retry-badcase \
--out long.wav
The optional offline quality path generates multiple candidates and uses ASR plus speaker verification to select one. It is slower than ordinary generation and does not change the checkpoint weights:
python scrQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.