Hi @a710128,
Here are the test cases and reproduction instructions:
-
Clone and build audio.cpp
scripts/build_linux.sh --backend cuda --build-dir build/debug --build-type Debug --target audiocpp_cli --jobs 16
-
Download the GGUF models from https://huggingface.co/audio-cpp/audio.cpp-gguf
-
BF16 GGUF test:
python tools/audiocpp_cli/run_audiocpp_cli_path_tests.py \
--audiocpp-cli-bin build/debug/bin/audiocpp_cli \
--cases voxcpm2_clone_rtf_realistic_cases.json \
--only voxcpm2_clone_rtf_realistic_interleaved \
--backend cuda \
--model-path /path/to/voxcpm2-bf16.gguf \
--out-root build/logs/voxcpm2_clone_rtf_realistic_path_test
- Check the results
python3 - <<'PY'
import re, wave
from pathlib import Path
case = Path("build/logs/voxcpm2_clone_rtf_realistic_path_test/voxcpm2_clone_rtf_realistic_interleaved")
timing = {}
order = []
for line in (case / "stdout.log").read_text().splitlines():
m = re.match(r"\[TIMING\] request\.(.+)\.wall_ms ([0-9.]+)", line)
if m:
rid = m.group(1)
timing[rid] = float(m.group(2))
order.append(rid)
rows = []
for rid in order:
if rid.startswith("warmup"):
continue
wav = case / "outputs" / f"{rid}.wav"
with wave.open(str(wav), "rb") as w:
audio_sec = w.getnframes() / w.getframerate()
wall_ms = timing[rid]
rtf = (wall_ms / 1000.0) / audio_sec
rows.append((rid, audio_sec, wall_ms, rtf, 1.0 / rtf))
print("| request | audio sec | wall ms | RTF | x realtime |")
print("|---|---:|---:|---:|---:|")
for rid, audio_sec, wall_ms, rtf, speed in rows:
print(f"| {rid} | {audio_sec:.2f} | {wall_ms:.1f} | {rtf:.3f} | {speed:.2f}x |")
avg_rtf = sum(r[3] for r in rows) / len(rows)
weighted_rtf = sum(r[2] for r in rows) / 1000.0 / sum(r[1] for r in rows)
print()
print(f"Average RTF: {avg_rtf:.3f}, x realtime: {1.0 / avg_rtf:.2f}x")
print(f"Weighted RTF: {weighted_rtf:.3f}, x realtime: {1.0 / weighted_rtf:.2f}x")
PY
BF 16
| request |
audio sec |
wall ms |
RTF |
x realtime |
| short_r1 |
3.84 |
634.6 |
0.165 |
6.05x |
| medium_r1 |
9.12 |
1344.2 |
0.147 |
6.78x |
| long_r1 |
22.24 |
3199.9 |
0.144 |
6.95x |
| short_r2 |
3.84 |
756.4 |
0.197 |
5.08x |
| medium_r2 |
9.12 |
1438.5 |
0.158 |
6.34x |
| long_r2 |
22.24 |
3167.8 |
0.142 |
7.02x |
Average RTF: 0.159, x realtime: 6.29x
Weighted RTF: 0.150, x realtime: 6.68x
Q8:
| request |
audio sec |
wall ms |
RTF |
x realtime |
| short_r1 |
3.84 |
609.0 |
0.159 |
6.31x |
| medium_r1 |
8.80 |
1276.8 |
0.145 |
6.89x |
| long_r1 |
22.72 |
3236.3 |
0.142 |
7.02x |
| short_r2 |
3.84 |
751.9 |
0.196 |
5.11x |
| medium_r2 |
8.80 |
1401.3 |
0.159 |
6.28x |
| long_r2 |
22.72 |
3212.0 |
0.141 |
7.07x |
Average RTF: 0.157, x realtime: 6.37x
Weighted RTF: 0.148, x realtime: 6.74x
voxcpm2_clone_rtf_realistic_cases.json
Hi @a710128,
Here are the test cases and reproduction instructions:
Clone and build audio.cpp
scripts/build_linux.sh --backend cuda --build-dir build/debug --build-type Debug --target audiocpp_cli --jobs 16Download the GGUF models from https://huggingface.co/audio-cpp/audio.cpp-gguf
BF16 GGUF test:
BF 16
Average RTF: 0.159, x realtime: 6.29x
Weighted RTF: 0.150, x realtime: 6.68x
Q8:
Average RTF: 0.157, x realtime: 6.37x
Weighted RTF: 0.148, x realtime: 6.74x
voxcpm2_clone_rtf_realistic_cases.json