Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-25 23:49:48 +02:00
.gitignore init 2026-03-03 18:50:57 +01:00
build.zig Update to Zig 0.17.0-dev.1464+6aff551f1 2026-07-25 23:49:48 +02:00
build.zig.zon Update to Zig 0.17.0-dev.1464+6aff551f1 2026-07-25 23:49:48 +02:00
LICENSE init 2026-03-03 18:50:57 +01:00
README.md minor fixes 2026-03-04 15:50:58 +01:00

Zig build for xiph/rnnoise

Build script

Run zig build to create static and dynamic libraries. See zig build -h for all custom options.

Project-Specific Options:
  -Dtarget=[string]            The CPU architecture, OS, and ABI to build for
  -Dcpu=[string]               Target CPU features to add or subtract
  -Dofmt=[string]              Target object format
  -Ddynamic-linker=[string]    Path to interpreter on the target system
  -Doptimize=[enum]            Prioritize performance, safety, or binary size
                                 Supported Values:
                                   Debug
                                   ReleaseSafe
                                   ReleaseFast
                                   ReleaseSmall
  -Dlittle=[bool]              embed the little model (default false)
  -Drtcd=[bool]                Enable x86 rtcd
  -Ddisable-debug-float=[bool] (default true)
  -Dassertions=[bool]          Enable assertions (enabled by default in debug)

Usage from Zig

If you're using this library from Zig, import the rnnoise module, which will contain the full implementation and translated C header files which you can use like so:

const rnnoise = @import("rnnoise");

test {
    std.testing.expectEqual(480, rnnoise.rnnoise_get_frame_size());
}

If you want to make use of dynamic linking, then you can import the headers module, which will contain the translated C header files, but none of the implementation.

Usage note

This library expects float samples to be in the [−32768, +32767] range. If your float samples are in [-1, 1], you will need to multiply (and then divide) them by 32768.