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.
- 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
frontend: emit ㄭ for empty-rime syllables
Browse files- scripts/frontend_bopomofo.py +11 -1
scripts/frontend_bopomofo.py
CHANGED
|
@@ -14,7 +14,11 @@ ARPABET = ['AA','AE','AH','AO','AW','AY','B','CH','D','DH','EH','ER','EY','F','G
|
|
| 14 |
'UH','UW','V','W','Y','Z','ZH']
|
| 15 |
PUNCT = [',', '.', '?', '!', '…', '-', "'"]
|
| 16 |
SPECIAL = ['_blank', '_pad', 'UNK', 'SP'] # SP = inter-word/space pause
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
SYM2ID = {s: i for i, s in enumerate(SYMBOLS)}
|
| 19 |
LANG = {'ZH': 0, 'EN': 1} # per-phone language id
|
| 20 |
|
|
@@ -34,6 +38,12 @@ def _split_syllable(syl: str):
|
|
| 34 |
if syl and syl[-1].isdigit():
|
| 35 |
tone = int(syl[-1]); syl = syl[:-1]
|
| 36 |
units = [c for c in syl if c in SYM2ID]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
return units, tone
|
| 38 |
|
| 39 |
def text_to_phones(text: str):
|
|
|
|
| 14 |
'UH','UW','V','W','Y','Z','ZH']
|
| 15 |
PUNCT = [',', '.', '?', '!', '…', '-', "'"]
|
| 16 |
SPECIAL = ['_blank', '_pad', 'UNK', 'SP'] # SP = inter-word/space pause
|
| 17 |
+
# ㄭ = syllabic-vowel symbol for empty-rime syllables (是/十/日/司...). U+312D is outside the
|
| 18 |
+
# U+3105..U+3129 ZHUYIN range so it was missing. APPENDED AT END to preserve all existing phone ids
|
| 19 |
+
# (warm-start compatibility); new id, embedding row trained during the re-align retrain.
|
| 20 |
+
SYLLABIC = ['ㄭ']
|
| 21 |
+
SYMBOLS = SPECIAL + ZHUYIN + ARPABET + PUNCT + SYLLABIC
|
| 22 |
SYM2ID = {s: i for i, s in enumerate(SYMBOLS)}
|
| 23 |
LANG = {'ZH': 0, 'EN': 1} # per-phone language id
|
| 24 |
|
|
|
|
| 38 |
if syl and syl[-1].isdigit():
|
| 39 |
tone = int(syl[-1]); syl = syl[:-1]
|
| 40 |
units = [c for c in syl if c in SYM2ID]
|
| 41 |
+
# Empty-rime syllables (zhi/chi/shi/ri/zi/ci/si: 是/十/日/司/思/資...) are written in bopomofo as
|
| 42 |
+
# the bare retroflex/dental sibilant with an IMPLICIT syllabic vowel. Without an explicit vowel
|
| 43 |
+
# phone the model renders a clipped fricative that merges into the next syllable. Append the
|
| 44 |
+
# syllabic-vowel symbol ㄭ so these carry a proper rime. (Requires training data with ㄭ.)
|
| 45 |
+
if len(units) == 1 and units[0] in "ㄓㄔㄕㄖㄗㄘㄙ" and "ㄭ" in SYM2ID:
|
| 46 |
+
units = [units[0], "ㄭ"]
|
| 47 |
return units, tone
|
| 48 |
|
| 49 |
def text_to_phones(text: str):
|