Run pip install git+https://github.com/vvwangvv/URGNET-MOS to use this model

AudioMOS NOTE

check this inference script to run inference on urgent-challgen/urgent2026-sqa

Python API (MOS and CMOS)

MOS (absolute score)

Single path, list of paths, or HuggingFace dataset:

from pathlib import Path
from urgent_mos.api.infer import infer
from urgent_mos.utils import load_model_from_checkpoint

model = load_model_from_checkpoint("path/to/model.pt", "cuda")

# Single audio path
scores = infer(model, ["/path/to/audio.wav"])
print(scores[0])  # e.g. {"mos_overall": 3.42, ...}

# List of audio paths
paths = ["a.wav", "b.wav", "c.wav"]
scores = infer(model, paths)
for p, s in zip(paths, scores):
    print(p, s["mos_overall"])

# HuggingFace dataset (e.g. urgent2026-sqa ACR)
from datasets import load_dataset
ds = load_dataset("urgent-challenge/urgent2026-sqa", "acr", split="test")
audios = []
srs = []
for i in range(len(ds)):
    row = ds[i]
    s = row["audio"].get_all_samples()
    audios.append(s.data.squeeze(0).float())
    srs.append(getattr(s, "sample_rate", row["sample_rate"]))
scores = infer(model, audios, sample_rate=srs)
for i, row in enumerate(ds):
    print(row["sample_id"], scores[i]["mos_overall"])

CMOS (comparative score)

Single pair, list of pairs, or HuggingFace dataset:

from urgent_mos.api.infer import infer_pairs
from urgent_mos.utils import load_model_from_checkpoint

model = load_model_from_checkpoint("path/to/model.pt", "cuda")

# Single pair (path_a, path_b)
scores = infer_pairs(model, [("/path/to/audio_a.wav", "/path/to/audio_b.wav")])
print(scores[0])  # e.g. {"mos_overall": 0.15, ...}  (positive = A better)

# List of path pairs
pairs = [("a1.wav", "b1.wav"), ("a2.wav", "b2.wav")]
scores = infer_pairs(model, pairs)
for (a, b), s in zip(pairs, scores):
    print(f"{a} vs {b}", s["mos_overall"])

# HuggingFace dataset (e.g. urgent2026-sqa CCR)
from datasets import load_dataset
ds = load_dataset("urgent-challenge/urgent2026-sqa", "ccr", split="test")
audios_a, audios_b, srs = [], [], []
for i in range(len(ds)):
    row = ds[i]
    sa = row["audio_a"].get_all_samples()
    sb = row["audio_b"].get_all_samples()
    audios_a.append(sa.data.squeeze(0).float())
    audios_b.append(sb.data.squeeze(0).float())
    sra = getattr(sa, "sample_rate", row["sample_rate"])
    srb = getattr(sb, "sample_rate", row["sample_rate"])
    srs.append((sra, srb))
scores = infer_pairs(model, list(zip(audios_a, audios_b)), sample_rate=srs)
for i, row in enumerate(ds):
    print(row["sample_id"], scores[i]["mos_overall"])
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