Instructions to use Nebulixlabs/Horizon-1M-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nebulixlabs/Horizon-1M-TTS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="Nebulixlabs/Horizon-1M-TTS", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Nebulixlabs/Horizon-1M-TTS", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
ποΈ Horizon-1M-TTS
An Ultra-Tiny, 1M-Parameter Multi-Speaker Text-to-Speech Model
Built with π€ by Nebulixlabs
π§ Model Overview
Horizon-1M-TTS is an ultra-compact, experimental Text-to-Speech (TTS) model trained on 10 hours of speech data. Packing ~1M parameters, it is designed to push the boundaries of extreme model compression β making it one of the first ~1M-parameter TTS models capable of generating intelligible, multi-speaker audio across two distinct voices (en_sophia and en_sam).
While the synthesized speech can sound slightly robotic due to its tiny parameter budget and limited training data, Horizon-1M-TTS demonstrates that understandable multi-speaker speech synthesis is possible at a fraction of the size of conventional TTS models β ideal for edge-AI research, education, and ultra-low-resource experimentation.
ποΈ Supported Speakers
| Speaker ID | Language | Description |
|---|---|---|
en_sophia |
English (en) |
Female voice profile |
en_sam |
English (en) |
Male voice profile |
ποΈ Model Specifications
| Component | Value |
|---|---|
| π’ Parameters | ~1M |
| π£οΈ Speakers | 2 (en_sophia, en_sam) |
| π§ Training Data | ~10 hours of English speech |
| π Sampling Rate | 24,000 Hz (default) |
| π Language | English (en) |
| βοΈ Framework | PyTorch / Hugging Face transformers (trust_remote_code=True) |
π» How to Use
Prerequisites
pip install torch transformers huggingface_hub soundfile
Inference Code
Note: The snippet below includes a lightweight local patch for a known
NameErrorinmodeling_horizon.pybefore loading the model.
import inspect
import torch
import soundfile as sf
from pathlib import Path
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer, AutoModel
model_id = "Nebulixlabs/Horizon-1M-TTS"
device = "cuda" if torch.cuda.is_available() else "cpu"
# 1. Download the repository locally
local_dir = snapshot_download(repo_id=model_id)
# 2. Patch the NameError in modeling_horizon.py
modeling_file = Path(local_dir) / "modeling_horizon.py"
code = modeling_file.read_text(encoding="utf-8")
buggy_line = "_OrigHorizonForConditionalGeneration = HorizonForConditionalGeneration"
fixed_line = "_OrigHorizonForConditionalGeneration = HorizonTTSModel"
if buggy_line in code:
modeling_file.write_text(code.replace(buggy_line, fixed_line), encoding="utf-8")
# 3. Load the model
model = AutoModel.from_pretrained(local_dir, trust_remote_code=True).to(device)
model.eval()
# 4. Choose speaker: "en_sophia" or "en_sam"
speaker = "en_sophia" # or "en_sam"
text = "Hello, this is a test of the Horizon 1M TTS model."
# 5. Run inference (direct text method or tokenizer fallback)
with torch.no_grad():
if hasattr(model, "synthesize"):
audio = model.synthesize(text, speaker=speaker)
elif hasattr(model, "generate"):
sig = inspect.signature(model.generate)
if "text" in sig.parameters:
audio = model.generate(text=text, speaker=speaker)
else:
# Fallback to slow tokenizer
tokenizer = AutoTokenizer.from_pretrained(
local_dir, trust_remote_code=True, use_fast=False
)
inputs = tokenizer(text, return_tensors="pt").to(device)
if "speaker" in sig.parameters:
audio = model.generate(**inputs, speaker=speaker)
else:
if hasattr(model, "_switch_profile"):
model._switch_profile(speaker)
audio = model.generate(**inputs)
else:
raise RuntimeError(
f"No inference method found. Available methods: {[m for m in dir(model) if not m.startswith('_')]}"
)
# 6. Save the generated audio
audio_np = audio.cpu().numpy().squeeze() if isinstance(audio, torch.Tensor) else audio
sampling_rate = getattr(model.config, "sampling_rate", 24000)
output_file = f"output_{speaker}.wav"
sf.write(output_file, audio_np, sampling_rate)
print(f"Done! Audio saved to '{output_file}'.")
Usage tips:
- Keep input sentences clear and concise for the most intelligible pronunciation.
- Runs comfortably on both CPU and GPU thanks to its ~1M parameter footprint.
π― Intended Use
- β Educational purposes β exploring ultra-small neural TTS architectures and multi-speaker conditioning.
- β Edge-AI and low-resource prototyping where memory and compute are strictly constrained.
- β Research baseline for extreme parameter-efficiency in speech synthesis.
π« Out-of-Scope Use
- β Production voice assistants, commercial audiobooks, or studio-grade voiceovers.
- β High-stakes, medical, legal, or safety-critical announcements where crystal-clear natural prosody is mandatory.
- β Voice cloning or impersonation of real individuals.
β οΈ Limitations & Biases
- Robotic artifacts: With only ~1M parameters and 10 hours of training data, the generated audio can sound noticeably robotic or metallic compared to larger TTS models.
- English only: Trained exclusively on English speech; non-English words, rare proper nouns, or complex abbreviations may be mispronounced.
- Limited expressiveness: Emotional range, natural pauses, and complex prosody are limited.
- Experimental status: Requires
trust_remote_code=Trueand the temporarymodeling_horizon.pypatch shown above.
π Citation
@misc{horizon1mtts2026,
title = {Horizon-1M-TTS: An Ultra-Tiny Multi-Speaker Text-to-Speech Model},
author = {Nebulixlabs},
year = {2026},
howpublished = {\url{[https://huggingface.co/Nebulixlabs/Horizon-1M-TTS](https://huggingface.co/Nebulixlabs/Horizon-1M-TTS)}}
}
π Connect with Nebulixlabs
- Downloads last month
- -