RooM Voice AI — Model Weights Hub 🎙️

GitHub License ONNX Runtime Language

RooM Voice AI Model Weights Hub cung cấp bộ trọng số mô hình AI được lượng tử hóa ở định dạng ONNX INT8, chạy thuần CPU AVX2 thời gian thực (0 MB GPU VRAM) cho hệ thống trợ lý giọng nói phòng họp thông minh RooM Voice AI (Voice Call Meeting AI).


📦 Các mô hình trong kho phát hành (Released Checkpoints)

Tệp mô hình Module Kiến trúc Định dạng Kích thước Độ trễ CPU
phobert_joint_meeting_nlu.onnx Module 4 PhoBERT-v2 Joint Multi-Task (Intent + BIO Slots) ONNX INT8 128 MB $\le 35.0\text{ ms}$
openwakeword_room.onnx / ai_star_light_openwakeword.onnx Module 2 OpenWakeWord Depthwise Separable Conv + Conformer KWS ONNX INT8 644 KB $\le 3.5\text{ ms / frame}$
tokenizer/ Module 4 PhoBERT BPE Tokenizer (vocab.txt, bpe.codes, configs) Tokenizer ~2 MB

🧠 1. Đặc tả kỹ thuật PhoBERT-Joint Multi-Task NLU (Module 4)

Mô hình phobert_joint_meeting_nlu.onnx được xây dựng trên nền tảng vinai/phobert-base-v2 với kiến trúc Dual-Head đồng thời giải quyết hai bài toán phân tích ngữ nghĩa hội thoại phòng họp tiếng Việt:

  1. Phân loại ý định hội thoại (Intent Classification): 6 nhóm ý định họp doanh nghiệp cốt lõi qua phân nhánh Softmax Head.
  2. Gán nhãn thực thể khe cắm (Slot Tagging): 11 nhãn BIO trích xuất nhân sự, thời gian, nhiệm vụ, chủ đề, công cụ qua phân nhánh Sequence Tagging Head.

Hàm mất mát tối ưu đồng thời (Joint Multi-Task Loss):

Ljoint=0.5Lintent(y^intent,yintent)+0.5Lslot(y^slot,yslot)\mathcal{L}_{\mathrm{joint}} = 0.5 \cdot \mathcal{L}_{\mathrm{intent}}(\hat{y}_{\mathrm{intent}}, y_{\mathrm{intent}}) + 0.5 \cdot \mathcal{L}_{\mathrm{slot}}(\hat{y}_{\mathrm{slot}}, y_{\mathrm{slot}})

Danh mục Ý định (Intent Labels):

  • Summarize_Meeting / Create_Meeting_Summary — Tóm tắt biên bản cuộc họp.
  • Query_Project_Knowledge — Tra cứu tri thức tài liệu dự án.
  • Assign_Action_Item — Phân công nhiệm vụ / Giao việc.
  • Schedule_Followup / Schedule_Followup_Meeting — Lên lịch họp tiếp theo.
  • Explain_Technical_Concept — Giải thích thuật ngữ / khái niệm kỹ thuật.
  • Chitchat_Clarification — Chào hỏi / Làm rõ thông tin.

Danh mục Thực thể (Slot Labels):

  • B-PER, I-PER (Tên người / Nhân sự chịu trách nhiệm)
  • B-TIME, I-TIME (Mốc thời gian / Hạn chót Deadline)
  • B-TASK, I-TASK (Tên đầu việc / Nhiệm vụ)
  • B-TOPIC, I-TOPIC (Chủ đề cuộc họp / Dự án)
  • B-TOOL, I-TOOL (Công cụ / Hệ thống: Jira, gRPC, Git, Docker, ...)
  • O (Từ đệm thông thường)

⚡ 2. Đặc tả kỹ thuật Wake-Word OpenWakeWord (Module 2)

Mô hình openwakeword_room.onnx (hay ai_star_light_openwakeword.onnx) được huấn luyện đặc thù cho từ khóa đánh thức trợ lý phòng họp tiếng Việt:

  • Từ khóa kích hoạt mục tiêu (Target Wake-words): "AI Star Light", "Star Light ơi", "AI Trợ lý", "Hey Star Light", "Starlight ơi".
  • Đầu vào âm học: Tensor Log-Mel Spectrogram 80 dải tần từ luồng âm thanh PCM 16kHz Mono sạch ($32\text{ms} = 512\text{ samples}$ mỗi bước nhảy).
  • Bộ đệm cửa sổ trượt (Circular RingBuffer): $1.5\text{ giây}$ ($24,000\text{ samples}$ ở tần số lấy mẫu $16\text{ kHz}$).
  • Bộ lọc làm mịn thời gian (Temporal Posterior Smoothing): Cửa sổ $K = 4$ khung hình liên tiếp ($P_{\text{smooth}}(t) = \frac{1}{4}\sum_{i=0}^{3} P_{\text{raw}}(t-i)$).
  • Cơ chế phân ngưỡng kép (Hysteresis Thresholding): Ngưỡng kích hoạt $\theta_{\text{wake}} = \theta_{\text{start}} = 0.75$, ngưỡng reset trạng thái $\theta_{\text{reset}} = 0.40$.
  • Khóa chống kích hoạt lặp (Refractory Debounce Cooldown): Khóa trơ $T_{\text{cooldown}} = 2.0\text{ giây}$ ($N_{\text{debounce}} \approx 62\text{ frames}$ ở bước nhảy $32\text{ms}$) sau khi trigger thành công.
  • Hiệu năng & Tài nguyên: Độ trễ suy luận $\le 3.5\text{ ms/frame}$ trên CPU Intel Core i7, RAM $< 30\text{ MB}$, $0\text{ MB}$ GPU VRAM.

💻 3. Hướng dẫn sử dụng nhanh (Python Code Snippets)

Cài đặt thư viện cần thiết:

pip install onnxruntime numpy transformers pyvi huggingface_hub

Chạy suy luận PhoBERT-Joint NLU:

import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer
from pyvi import ViTokenizer
from huggingface_hub import hf_hub_download

# 1. Tải mô hình và tokenizer từ Hugging Face Hub
model_path = hf_hub_download(repo_id="sh1kaku/room-voice-ai", filename="phobert_joint_meeting_nlu.onnx")
tokenizer = AutoTokenizer.from_pretrained("sh1kaku/room-voice-ai", subfolder="tokenizer", use_fast=False)

# 2. Khởi tạo ONNX Runtime Session (CPU AVX2)
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])

# 3. Tiền xử lý câu đầu vào qua PyVi Word Segmentation
text = "Giao cho anh Tuấn kiểm tra lỗi kết nối API gRPC trước 17h chiều nay"
segmented_text = ViTokenizer.tokenize(text)
inputs = tokenizer(segmented_text, return_tensors="np", padding="max_length", max_length=128, truncation=True)

# 4. Thực thi suy luận đa nhiệm
ort_inputs = {
    "input_ids": inputs["input_ids"].astype(np.int64),
    "attention_mask": inputs["attention_mask"].astype(np.int64),
}
intent_logits, slot_logits = session.run(None, ort_inputs)

# 5. Giải mã kết quả Intent và BIO Slots
INTENTS = [
    "Summarize_Meeting",
    "Query_Project_Knowledge",
    "Assign_Action_Item",
    "Schedule_Followup",
    "Explain_Technical_Concept",
    "Chitchat_Clarification",
]
SLOTS = [
    "O", "B-PER", "I-PER", "B-TIME", "I-TIME",
    "B-TASK", "I-TASK", "B-TOPIC", "I-TOPIC", "B-TOOL", "I-TOOL"
]

predicted_intent = INTENTS[np.argmax(intent_logits[0])]
predicted_slots = [SLOTS[idx] for idx in np.argmax(slot_logits[0], axis=-1)]

print(f"Text   : {text}")
print(f"Intent : {predicted_intent}")

Chạy suy luận Wake-Word Model:

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download

# 1. Tải model Wake-Word
ww_path = hf_hub_download(repo_id="sh1kaku/room-voice-ai", filename="openwakeword_room.onnx")
ww_session = ort.InferenceSession(ww_path, providers=["CPUExecutionProvider"])

# 2. Đầu vào âm thanh mô phỏng (Log-Mel Features tensor)
dummy_features = np.zeros((1, 16, 32), dtype=np.float32)
input_name = ww_session.get_inputs()[0].name
output_prob = ww_session.run(None, {input_name: dummy_features})[0]

print(f"Wake-Word Posterior Probability: {float(output_prob[0][0]):.4f}")

📊 4. Kết quả nghiệm thu Benchmark & Hiệu năng

Chỉ số (Metric) Giá trị đạt được Đánh giá
NLU Intent Accuracy $> 91.2%$ Đạt chuẩn hội thảo doanh nghiệp
NLU CPU Latency $\le 35.0\text{ ms}$ Vượt KPI thời gian thực
Wake-Word CPU Latency $\le 3.5\text{ ms / frame}$ Tiết kiệm điện năng CPU
Wake-Word TPR $\ge 96.2%$ Nhận diện giọng nói chuẩn xác
RAM Consumption $< 120\text{ MB}$ Siêu nhẹ trên hệ thống
GPU VRAM Usage $0\text{ MB}$ Dành trọn VRAM cho ASR & LLM Brain

🔗 Liên kết Dự án & Mã nguồn đầy đủ

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support