Text-to-Speech
Transformers
Safetensors
Greek
qwen2
text-generation
neutts
text-generation-inference
Instructions to use moiralabs/GenosTTSAir with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moiralabs/GenosTTSAir with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="moiralabs/GenosTTSAir")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("moiralabs/GenosTTSAir") model = AutoModelForCausalLM.from_pretrained("moiralabs/GenosTTSAir", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from moiralabs/GenosTTSAir: direct link, hf CLI and curl.
- Browser
- Download file 6.14 kB
-
https://huggingface.co/moiralabs/GenosTTSAir/resolve/main/README.md
- Command line
-
hf download hf://moiralabs/GenosTTSAir/README.md
-
curl -L -o README.md https://huggingface.co/moiralabs/GenosTTSAir/resolve/main/README.md
6.14 kB
| license: apache-2.0 | |
| library_name: transformers | |
| tags: | |
| - text-to-speech | |
| - qwen2 | |
| - neutts | |
| language: | |
| - el | |
| # GenosTTSAir (male voice) | |
| Male-voice Greek fine-tune of [NeuTTS-Air](https://github.com/neuphonic/neutts) | |
| for the MoiraAI voice stack: a single-voice speech language model that turns | |
| text into [NeuCodec](https://huggingface.co/neuphonic/neucodec) audio tokens | |
| in Genos's voice. It is fine-tuned to produce this one specific voice — | |
| not to clone arbitrary voices. | |
| Built off the open NeuTTS LM + codec design — small on-device backbone, | |
| 50 Hz single-codebook neural codec, GGUF-friendly for phones and laptops. | |
| ## Samples | |
| Reference transcript (`samples/greek.txt`): "Ο βροντόσαυρος έψαχνε τροφή στην αυλή." | |
| | clip | audio | | |
| |---|---| | |
| | Reference voice | <audio controls src="https://huggingface.co/moiralabs/GenosTTSAir/resolve/main/samples/greek.wav"></audio> | | |
| | Generated example | <audio controls src="https://huggingface.co/moiralabs/GenosTTSAir/resolve/main/samples/greek_output.wav"></audio> | | |
| ## Model details | |
| - **Voice:** male, single voice — Genos. Fine-tuned to speak as Genos; | |
| always generate with a reference clip of Genos's voice. | |
| - **Backbone:** Qwen2-family causal LM (0.5B scale; NeuTTS-Air builds on | |
| Qwen2.5-0.5B) — 24 layers, hidden size 896, 14 attention heads / | |
| 2 KV heads, bfloat16. | |
| - **Vocabulary:** 217,652 tokens — Qwen2 BPE plus added audio tokens | |
| (`added_tokens.json`). | |
| - **Codec:** [neuphonic/neucodec](https://huggingface.co/neuphonic/neucodec) | |
| (50 Hz, single codebook) — this repo holds the LM half only. | |
| - **Input:** phonemised text (handled automatically by the `neutts` | |
| package via `espeak-ng`). | |
| - **Operating window:** 2048 tokens ≈ ~30 s of audio including the | |
| voice prompt (config allows up to 32768 positions). | |
| - **Training:** fine-tuned for 1 epoch (15,188 steps) — loss curve in | |
| `trainer_state.json`. | |
| - **Sampling defaults:** temperature 0.7, top-k 20, top-p 0.8, | |
| repetition penalty 1.1 (`generation_config.json`). | |
| - **Base project:** [neuphonic/neutts](https://github.com/neuphonic/neutts) | |
| (NeuTTS-Air is Apache 2.0). | |
| ## Usage | |
| Requires `espeak-ng` on your system | |
| ([install guide](https://github.com/espeak-ng/espeak-ng/blob/master/docs/guide.md)). | |
| This is a public repo — no login needed. Note: the `neuphonic/neucodec` | |
| codec repo is auto-gated, so accept access once while logged in; the | |
| backbone itself needs nothing. | |
| ```bash | |
| pip install neutts soundfile | |
| ``` | |
| ```python | |
| from neutts import NeuTTS | |
| import soundfile as sf | |
| tts = NeuTTS( | |
| backbone_repo="moiralabs/GenosTTSAir", | |
| backbone_device="cpu", | |
| codec_repo="neuphonic/neucodec", | |
| codec_device="cpu", | |
| language="el", # required: non-Neuphonic backbones raise without it | |
| ) | |
| input_text = "Γεια σου! Χαίρομαι που σε γνωρίζω." | |
| ref_text = open("samples/greek.txt").read().strip() # transcript of Genos's ref clip | |
| ref_codes = tts.encode_reference("samples/greek.wav") # short clip of Genos's voice | |
| wav = tts.infer(input_text, ref_codes, ref_text) | |
| sf.write("out.wav", wav, 24000) | |
| ``` | |
| For on-device/quantised inference, convert the backbone to GGUF and | |
| pass the `.gguf` repo as `backbone_repo` with `llama-cpp-python` | |
| installed (`pip install "neutts[llama]"`) — same pattern as the | |
| upstream [neutts-air-q4-gguf](https://huggingface.co/neuphonic/neutts-air-q4-gguf) / | |
| [neutts-air-q8-gguf](https://huggingface.co/neuphonic/neutts-air-q8-gguf) releases. | |
| Other inference paths (see `examples/` in | |
| [neuphonic/neutts](https://github.com/neuphonic/neutts)): | |
| - **Pre-encoded references:** `encode_reference()` can be run once and | |
| the codes saved with `torch.save(ref_codes, "ref.pt")` to skip | |
| re-encoding on every run. | |
| - **ONNX decoder:** pass `codec_repo="neuphonic/neucodec-onnx-decoder"` | |
| (needs `onnxruntime` and a pre-encoded `.pt` reference) for | |
| lower-latency decoding without the codec encoder. | |
| - **Streaming:** `tts.infer_stream(...)` yields audio chunks as they | |
| generate, but only works with GGUF backbones (needs `pyaudio`). | |
| ## Notes | |
| - **CPU-only machines:** plain `pip install neutts` pulls CUDA torch plus | |
| gigabytes of NVIDIA deps. Skip them by installing the CPU builds first | |
| (keep their versions matched to each other): | |
| `pip install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cpu` | |
| - **`torchao` vs `torchtune`:** current `torchao` removed `NF4Tensor`, | |
| which `torchtune` 0.6.1 still imports (`No module named | |
| 'torchao.dtypes.nf4tensor'`). Until upstream agrees, stub it — those | |
| names only serve quantization helpers inference never calls: | |
| ```python | |
| # torchao/dtypes/nf4tensor.py | |
| class NF4Tensor: pass | |
| def linear_nf4(*a, **k): raise RuntimeError("nf4 shim") | |
| def to_nf4(*a, **k): raise RuntimeError("nf4 shim") | |
| def implements(*a, **k): return lambda f: f | |
| ``` | |
| ## Files | |
| - `model.safetensors` — backbone weights (Git LFS) | |
| - `config.json`, `generation_config.json` — model and sampling config | |
| - `vocab.json`, `merges.txt`, `added_tokens.json` — tokenizer | |
| - `trainer_state.json`, `training_args.bin` — training provenance | |
| - `chat_template.jinja` — Qwen chat template (kept from the base model) | |
| - `samples/greek.wav`, `samples/greek.txt` — Genos reference clip + transcript | |
| - `samples/greek_output.wav` — example output in Genos's voice | |
| ## Limitations | |
| - Tuned for short Greek utterances. | |
| - Research-grade voice: expect artifacts on long or out-of-domain text. | |
| - Audio generated through the NeuTTS pipeline carries a watermark. | |
| ## Disclaimer | |
| Genos and Moira are fictional AI personas created for the MoiraAI project's | |
| own products. Do not use these models to impersonate any real individual or | |
| to create misleading recordings, robocalls, scams, or disinformation. You | |
| are responsible for complying with all applicable laws on synthetic media | |
| and voice rights. We do not condone any misuse of these models. | |
| ## Acknowledgments | |
| Special thanks to [Neuphonic](https://neuphonic.com) — pioneers of the open | |
| text-to-speech space — for releasing NeuTTS and NeuCodec as open source. | |
| This model would not exist without their work. | |