Text-to-Speech
ONNX
GGUF
Chinese
English
onnxruntime
tts
on-device
jetson
telephony
vits
mb-istft-vits
multi-speaker
mandarin
taiwanese-mandarin
imatrix
conversational
Instructions to use Luigi/PrimeTTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Luigi/PrimeTTS with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Luigi/PrimeTTS", filename="streaming_llm/gemma270m_it_q8.gguf", )
llm.create_chat_completion( messages = "\"The answer to the universe is 42\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Luigi/PrimeTTS with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: llama cli -hf Luigi/PrimeTTS:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: llama cli -hf Luigi/PrimeTTS:F32
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: ./llama-cli -hf Luigi/PrimeTTS:F32
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Luigi/PrimeTTS:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Luigi/PrimeTTS:F32
Use Docker
docker model run hf.co/Luigi/PrimeTTS:F32
- LM Studio
- Jan
- Ollama
How to use Luigi/PrimeTTS with Ollama:
ollama run hf.co/Luigi/PrimeTTS:F32
- Unsloth Studio
How to use Luigi/PrimeTTS with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/PrimeTTS to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Luigi/PrimeTTS to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Luigi/PrimeTTS to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Luigi/PrimeTTS with Docker Model Runner:
docker model run hf.co/Luigi/PrimeTTS:F32
- Lemonade
How to use Luigi/PrimeTTS with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Luigi/PrimeTTS:F32
Run and chat with the model
lemonade run user.PrimeTTS-F32
List all available models
lemonade list
| #!/usr/bin/env python3 | |
| """Generate the PrimeTTS training corpus with VoxCPM2, cloning ONE reference (young-girl 'stacy') | |
| so en + zh + code-mix are all in a single consistent voice. Output 48 kHz (VoxCPM2 audiovae SR). | |
| Resumable (skips ids already in the manifest). Usage: | |
| CUDA_VISIBLE_DEVICES=N python gen_voxcpm_corpus.py --texts <jsonl> --manifest <out.jsonl> | |
| """ | |
| import argparse, json, os, time | |
| import numpy as np, soundfile as sf | |
| import text_norm # entity normalizer (phone/email/price/serial/date...) | |
| SR = 48000 | |
| def trim(w, thr=0.02): | |
| x = np.abs(w) | |
| if x.max() < 1e-5: return w | |
| idx = np.where(x > thr * x.max())[0] | |
| if len(idx) == 0: return w | |
| return w[max(0, idx[0] - int(0.05*SR)):min(len(w), idx[-1] + int(0.12*SR))] | |
| def main(): | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--texts", required=True) | |
| ap.add_argument("--ref", default="clone_ref_girl.wav") | |
| ap.add_argument("--ref-text", default="clone_ref_girl.txt") | |
| ap.add_argument("--out-dir", default="voxcpm_corpus") | |
| ap.add_argument("--manifest", required=True) | |
| ap.add_argument("--no-normalize", dest="normalize", action="store_false", | |
| help="disable text_norm entity pre-normalization (default: on)") | |
| a = ap.parse_args() | |
| os.makedirs(a.out_dir, exist_ok=True) | |
| rt = open(a.ref_text).read().strip() | |
| from voxcpm import VoxCPM | |
| m = VoxCPM.from_pretrained("openbmb/VoxCPM2") | |
| done = set() | |
| if os.path.exists(a.manifest): | |
| for l in open(a.manifest): | |
| try: done.add(json.loads(l)["id"]) | |
| except Exception: pass | |
| mf = open(a.manifest, "a", encoding="utf-8") | |
| rows = [json.loads(l) for l in open(a.texts) if l.strip()] | |
| t0 = time.time(); n = 0 | |
| for r in rows: | |
| if r["id"] in done: continue | |
| out = os.path.join(a.out_dir, r["id"] + ".wav") | |
| # PRE-NORMALIZE entities (phone/email/price/serial/date...) so the teacher reads the spoken form | |
| # and the manifest text matches the audio (digit-by-digit, not cardinalized). Idempotent. | |
| txt = text_norm.normalize(r["text"]) if a.normalize else r["text"] | |
| try: | |
| w = np.asarray(m.generate(text=txt, prompt_wav_path=a.ref, prompt_text=rt), dtype="float32").reshape(-1) | |
| w = trim(w) | |
| if len(w) < int(0.3*SR): print("SHORT skip", r["id"], flush=True); continue | |
| sf.write(out, w, SR) | |
| mf.write(json.dumps({"id": r["id"], "text": txt, "lang": r["lang"], | |
| "target_audio": os.path.abspath(out), "dur": round(len(w)/SR, 2)}, ensure_ascii=False) + "\n") | |
| mf.flush(); n += 1 | |
| if n % 20 == 0: print(f"{n} done | {n/(time.time()-t0)*3600:.0f}/h", flush=True) | |
| except Exception as e: | |
| print("FAIL", r["id"], str(e)[:90], flush=True) | |
| print(f"DONE {n} new clips", flush=True) | |
| if __name__ == "__main__": | |
| main() | |