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 Desktop
- 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
- Atomic Chat
reproduction: actual VoxCPM2-TW pipeline scripts + master run + eval set
Browse files- scripts/gen_codemix.py +109 -0
scripts/gen_codemix.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Generate DIVERSE zh-TW + English code-mix sentences to fix the mix-CER weak spot.
|
| 3 |
+
|
| 4 |
+
The existing corpus code-mix (~4.4k rows) is templated — a few frames repeated with swapped English
|
| 5 |
+
nouns — so the model overfits frames and fails on diverse eval code-mix (mix CER 0.318). This builds a
|
| 6 |
+
broad frame bank (varied syntax + English in varied positions) x varied insertions -> many distinct
|
| 7 |
+
sentences, matching the Taiwan office / phone-attendant register the eval set uses.
|
| 8 |
+
|
| 9 |
+
Usage: python gen_codemix.py --n 2800 --out codemix_corpus.txt
|
| 10 |
+
"""
|
| 11 |
+
import argparse, random, re
|
| 12 |
+
|
| 13 |
+
NAMES = ["Jason", "Kelly", "Daniel", "Rita", "Amy", "Kevin", "Linda", "Peter", "Vivian", "Frank",
|
| 14 |
+
"Tom", "Cindy", "Eric", "Grace", "Sam", "Joyce", "Leo", "Nina", "Oscar", "Sandy", "Ryan",
|
| 15 |
+
"Emma", "Jack", "Mia", "Henry", "Chloe", "Ivan", "Wendy", "Alan", "Tina"]
|
| 16 |
+
SUR = ["王", "陳", "林", "李", "張", "黃", "吳", "劉", "蔡", "楊", "許", "鄭", "謝", "郭", "洪"]
|
| 17 |
+
TITLE = ["經理", "助理", "工程師", "專員", "主任", "課長", "副理", "顧問", "店長"]
|
| 18 |
+
DEPT = ["技術部", "客服部", "業務部", "品保部", "財務部", "人資部", "採購部", "研發部", "行銷部", "資訊部", "法務部"]
|
| 19 |
+
APP = ["App", "Line", "Email", "Portal", "Outlook", "Teams", "Slack", "ERP 系統", "CRM 系統", "官網"]
|
| 20 |
+
ITEM = ["Excel 報表", "PDF 檔", "QR Code", "VIP 等級", "Zoom 連結", "email", "發票", "合約", "報告書",
|
| 21 |
+
"專案", "預算表", "行事曆", "購物車", "訂單", "帳號", "密碼", "會員卡", "序號", "授權碼", "點數"]
|
| 22 |
+
ACT_EN = ["login", "logout", "update", "reset", "upload", "download", "check", "confirm", "submit",
|
| 23 |
+
"cancel", "review", "approve", "sync", "backup", "scan"]
|
| 24 |
+
STATUS = ["ready", "done", "updated", "confirmed", "cancelled", "pending", "online", "offline", "expired"]
|
| 25 |
+
EVENT = ["meeting", "Zoom 會議", "conference call", "interview", "presentation", "demo", "workshop", "training"]
|
| 26 |
+
ADJ = ["busy", "urgent", "important", "ready", "OK", "fine"]
|
| 27 |
+
def ext(): return str(random.randint(1000, 9999))
|
| 28 |
+
def num(): return str(random.randint(100000, 999999))
|
| 29 |
+
def time_(): return random.choice(["上午九點", "上午十點半", "中午十二點", "下午兩點", "下午三點半",
|
| 30 |
+
"下午四點", "明天上午", "後天下午", "這個禮拜五", "下週一早上"])
|
| 31 |
+
def disc(): return random.choice(["九折", "八五折", "七九折", "買一送一", "免運"])
|
| 32 |
+
|
| 33 |
+
FRAMES = [
|
| 34 |
+
"您好,{dept}的 {name} {sur}{title}為您服務。",
|
| 35 |
+
"幫您轉接給 {name} {sur}{title},他的分機是 {ext}。",
|
| 36 |
+
"請問您要查詢的{item}編號是多少?",
|
| 37 |
+
"您的{item}已經 {status} 了,請至 {app} 查看。",
|
| 38 |
+
"{name} 的 {event} 改到{time}。",
|
| 39 |
+
"請至 {app} 點選 {act} 重新登入。",
|
| 40 |
+
"我這邊先幫您 {act} 這筆{item}。",
|
| 41 |
+
"這個{item}需要重新 {act},麻煩您稍等。",
|
| 42 |
+
"您的會員 {status},現在升級 VIP 可享{disc}優惠。",
|
| 43 |
+
"麻煩您把 {item} email 到我的信箱,謝謝。",
|
| 44 |
+
"系統顯示您的{item}需要 {act},請聯絡{dept}。",
|
| 45 |
+
"請問 {name} 在嗎?我這邊有一份 {item} 要給他。",
|
| 46 |
+
"您的訂單編號是 {num},預計{time}送達。",
|
| 47 |
+
"我幫您預約{time}的 {event},地點在三樓會議室。",
|
| 48 |
+
"不好意思,{app} 現在 {status},請您稍後再試。",
|
| 49 |
+
"請先 {act} 一下您的{item},我這邊同步處理。",
|
| 50 |
+
"{name} 說他今天比較 {adj},{event}可能要延到{time}。",
|
| 51 |
+
"您的{item}我已經 {status},等一下會 send 給您。",
|
| 52 |
+
"麻煩您提供一下 {item} 的序號,我幫您 {act}。",
|
| 53 |
+
"這個 case 我先 update 到系統,{dept}會再回覆您。",
|
| 54 |
+
"我的 {item} 今天有點問題,可以幫我 {act} 嗎?",
|
| 55 |
+
"請問這個 {event} 的 link 是哪一個?",
|
| 56 |
+
"您好,這裡是 {dept},請問需要什麼 service?",
|
| 57 |
+
"{name} 的分機 {ext} 現在忙線中,要幫您留言嗎?",
|
| 58 |
+
"您的 password 已經過期,請用 {app} 重設一個新的。",
|
| 59 |
+
"我這邊收到您的 {item} 了,正在 {act} 中,請稍候。",
|
| 60 |
+
"下午的 {event} 我會把 agenda 先寄給大家。",
|
| 61 |
+
"麻煩 {name} 在{time}前把{item} {act} 完成。",
|
| 62 |
+
"這份{item}的 deadline 是{time},請務必準時。",
|
| 63 |
+
"您的 VIP 點數還有 {num} 點,可以折抵{disc}。",
|
| 64 |
+
"請問您的 {app} 帳號是用 email 還是手機註冊的?",
|
| 65 |
+
"我幫您把{item} upload 到雲端了,連結在 Line 裡面。",
|
| 66 |
+
"{name} {sur}{title}稍後會 call 您,大概{time}。",
|
| 67 |
+
"您的退款已經 {status},三到五個 working day 會入帳。",
|
| 68 |
+
"這台機器的 firmware 要 {act},我請 {name} 過去處理。",
|
| 69 |
+
"麻煩您先 confirm 一下{time}的 {event} 方不方便。",
|
| 70 |
+
"您的 {item} 目前 {status},如需協助請撥分機 {ext}。",
|
| 71 |
+
"我把今天的 meeting note 整理成 PDF 寄給您。",
|
| 72 |
+
"請問您要的是 standard 版還是 premium 版的{item}?",
|
| 73 |
+
"您好,{name} 的 schedule 我看一下,他{time}有空。",
|
| 74 |
+
]
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
def fill(frame):
|
| 78 |
+
s = frame.format(
|
| 79 |
+
name=random.choice(NAMES), sur=random.choice(SUR), title=random.choice(TITLE),
|
| 80 |
+
dept=random.choice(DEPT), app=random.choice(APP), item=random.choice(ITEM),
|
| 81 |
+
act=random.choice(ACT_EN), status=random.choice(STATUS), event=random.choice(EVENT),
|
| 82 |
+
adj=random.choice(ADJ), ext=ext(), num=num(), time=time_(), disc=disc())
|
| 83 |
+
return s
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
def main():
|
| 87 |
+
ap = argparse.ArgumentParser()
|
| 88 |
+
ap.add_argument("--n", type=int, default=2800)
|
| 89 |
+
ap.add_argument("--out", default="codemix_corpus.txt")
|
| 90 |
+
ap.add_argument("--seed", type=int, default=42)
|
| 91 |
+
a = ap.parse_args()
|
| 92 |
+
random.seed(a.seed)
|
| 93 |
+
out, tries = set(), 0
|
| 94 |
+
while len(out) < a.n and tries < a.n * 40:
|
| 95 |
+
tries += 1
|
| 96 |
+
s = fill(random.choice(FRAMES))
|
| 97 |
+
# keep only genuine code-mix (has both Han + ASCII letters) and a sane length
|
| 98 |
+
if re.search(r"[一-鿿]", s) and re.search(r"[A-Za-z]", s) and 8 <= len(s) <= 60:
|
| 99 |
+
out.add(s)
|
| 100 |
+
out = sorted(out)
|
| 101 |
+
with open(a.out, "w", encoding="utf-8") as f:
|
| 102 |
+
f.write("\n".join(out) + "\n")
|
| 103 |
+
print(f"wrote {len(out)} diverse code-mix sentences -> {a.out} (from {len(FRAMES)} frames)")
|
| 104 |
+
import random as _r; _r.seed(1)
|
| 105 |
+
for s in _r.sample(out, 8): print(" ", s)
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
if __name__ == "__main__":
|
| 109 |
+
main()
|