Repository navigation
New Community Model: Voice Isolator v1 (Inworld) - #1343
Conversation
|
@Etherll Thanks for the PR! Please move the model to the community models section. Also, please remove the test fixtures. You can add/keep the script for producing the fixtures. After the next release, I'll do some test cleanup to remove unnecessary or unreachable tests and fixtures from the repo to keep its size under control. |
Mamba1Module builds one mamba_ssm layer: in_proj, the causal depthwise convolution with SiLU, the selective scan with its D skip and gate, and out_proj. It can carry the convolution and scan state between calls for streaming. CPU, Vulkan and Metal use ggml's fused Mamba-1 ops; CUDA and HIP use the existing scan and convolution ops. core::cpu_backend_has_feature reports whether the CPU kernels behind a backend were built with a named feature such as AVX512_BF16. Both are new; no existing function changes.
f1814d5 to
ffaffb8
Compare
|
Thanks for the review, and for the background on
The branch builds on main without #1342 and uses exact GELU. I also ran it on Vulkan this time, and the description has the parity and timing numbers for CPU, CUDA and Vulkan. One thing I need your call on: |
|
Uploading the GGUF rn |
A 48 kHz voice isolation model with an offline checkpoint and a causal realtime checkpoint that share one network. The voice_isolator family runs the s2s task offline and streaming through a spec-backed loader. It reads the released safetensors files, or a GGUF made by tests/voice_isolator/convert_gguf.py.
The domain test runs under ctest without a checkpoint. The reference test compares offline and streaming output with fixtures that make_fixtures.py writes from the Python package; the fixtures stay outside the repository.
Model page, the audio tools and README rows, and the license entry.
ffaffb8 to
79b83a0
Compare
|
Quick update: I went ahead and uploaded the two GGUFs to Etherll/voice-isolator-GGUF so CI isn't blocked on the question above. The spec now has If you'd rather have them on |
|
@Etherll Thanks for the quick updates! Hosting the models on your HF repo is fine. I actually prefer to see more repos hosting audio.cpp-compatible models. I've decided to include this model in the next release, so if there are any other issues, I'll just make changes directly to the PRs. |
Summary
Adds
voice_isolator, a community port of Inworld's Voice Isolator v1 (Apache-2.0 weights). It is a 48 kHz speech isolation model for thes2stask: it keeps the foreground voice and removes background sound. The release has two checkpoints that share one network. The offline checkpoint is two-sided and renders a recording in overlapping 12 s windows. The realtime checkpoint is causal and streams with a look-ahead of 0, 2 or 4 frames (62.7 ms algorithmic latency at the default 2).Reworked after review:
src/community_models/voice_isolator/with model spec v1 and a spec-backed loader. Nothing touchesbuiltin_audio_utilsany more.tests/voice_isolator/make_fixtures.pywrites them from the Python package.ExactErf; I will add theApproxErfopt-in here once ggml-cpu: speed up Mamba-1 and quantized-V flash attention; add an opt-in GELU erf approximation #1342 is merged.Implementation
config.cpp,spectral.cpp,attention_window.cpp): config parsing, band layout, STFT framing, render windows and the ring attention window. None of it depends on ggml; it sits behind aBackboneinterface.network.cpp): the ggml graphs. The streaming graphs for each block size and the rebase graph share onecore::PreparedGraphworkspace, and stream state lives in its persistent storage.session.cpp):RuntimeSessionBasewith offline and streamings2s. Input at any sample rate and channel count is mixed to mono and resampled to 48 kHz, in streaming too. With the model directory as--model, streaming loads the realtime checkpoint and offline loads the offline one; a checkpoint file or a GGUF as--modelselects that checkpoint.Framework additions
Both are new code; no existing function changes.
Mamba1Module(mamba_modules.h): onemamba_ssmlayer, with optional convolution and scan state carried between calls for streaming. CPU, Vulkan and Metal use ggml's fused Mamba-1 ops; CUDA and HIP use the existing scan and convolution ops.core::cpu_backend_has_feature: reports whether the CPU kernels behind a backend were built with a named feature such asAVX512_BF16. It asks the CPU backend through the registry, so it works withGGML_BACKEND_DL.Build
Run
Download packages
voice_isolator_realtime_f32(default) andvoice_isolator_offline_f32: self-contained F32 GGUFs (233 MB and 256 MB) from Etherll/voice-isolator-GGUF, pinned to a revision.tests/voice_isolator/convert_gguf.pymakes them. Both install intomodels/voice-isolator-GGUF; a GGUF holds one checkpoint, so the file is passed as--model.voice_isolator_safetensors: both checkpoints frominworld/voice-isolatorat the pinned revision.I installed all three into an empty models root with
model_manager_v2.py installand ran the CLI from the result. The CLI output from each installed GGUF is identical, byte for byte, to the output from its safetensors file.tools/check_loader_catalog_sync.pypasses. If you would rather host the files onaudio-cpp/audio.cpp-gguf, I will switch the spec.Parity
test_voice_isolator_referencecompares the offline and streaming outputs withinworld.voice_isolation1.0.0 on a fixed synthetic signal: uneven push sizes, the three look-aheads, a 20 s stream past the attention window, stream reset and offline windows. Largest sample difference from the reference:The test's limits are 2e-3 on the largest difference and 2e-4 on the mean. It passes on all three backends.
Performance
AMD Ryzen 9 9950X3D (AVX512-BF16), 16 threads, and RTX 5090, idle machine. Real-time factor (RTF, lower is faster) from
voice_isolator_warm_bench, best of 3, default cache and 4-frame blocks.CPU, on main's kernels:
A 10 ms push runs one frame per graph and does not keep up with real time on CPU, so the session asks the CLI for chunks of
block_framesframes (40 ms by default). With #1342 the same build runs at 0.42 offline (30 s, BF16), 0.51 with 40 ms pushes and 0.77 with 10 ms pushes.GPU (F32 weights, F16 cache):
Through the CLI path runner (
tools/audiocpp_cli/run_audiocpp_cli_path_tests.py --cases tests/voice_isolator/cli_cases.json), one session per case:VRAM is the same after three short requests and after the 418 s recording. The 14 s clip is the offline worst case on CPU: it is a little longer than one 12 s window, so it costs two.
Testing
voice_isolator_domain_testruns under ctest without a checkpoint: config parsing, band layout, STFT round trips, the attention window and the offline window plan.test_voice_isolator_referencepasses on CPU, CUDA and Vulkan (table above).fe6d1535: two tests do not pass, and both fail the same way on main.lfm3_audio_blocks_testdoes not compile, andgranite_speech5_b1_units_testfails in its own string handling. The branch is now rebased on11aeb8d4; I rebuilt and re-ran the domain test and the CPU parity test there.Known limitations