OpenBMB / OpenBMB/VoxCPM

[audio.cpp] New audio.cpp VoxCPM2 benchmark results on the RTX 5090 --- 0.140 RTF or 6.68x realtime.

Open
#369 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
37.8k
Forks
4.3k
Avg merge
7m
Merged PRs (30d)
1

Description

Hi @a710128,

Here are the test cases and reproduction instructions:

  1. Clone and build audio.cpp
    scripts/build_linux.sh --backend cuda --build-dir build/debug --build-type Debug --target audiocpp_cli --jobs 16

  2. Download the GGUF models from https://huggingface.co/audio-cpp/audio.cpp-gguf

  3. 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
  1. 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scripts/build_linux.sh and tools/audiocpp_cli/run_audiocpp_cli_path_tests.py, using the linked voxcpm2_clone_rtf_realistic_cases.json and the CUDA build command. Reproduce the BF16 and Q8 runs on an RTX 5090, then use the provided log-parsing script to verify the reported RTF values; the issue does not define a further change or completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
audio-video-rtc, performance
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.