RepositoryC++
Torsion-Audio

Torsion-Audio/nn-inference-template

Neural network inference template for real-time cricital audio environments - presented at ADC23

138stars
6forks
0issues
5views

A Template Audio Plugin for Real-time Neural Network Inference

This repository was started as a companion repository to the talk Real-time inference of neural networks: a practical approach for DSP engineers at the Audio Developer Conference 2023. The video can be found here.

Since the conference, we have continued to refine and extend the codebase. For more flexible and easier use of the inference architecture, we have consolidated this work into a library called anira, which is now used in this repository. For those interested in the state of the repository as presented at ADC23, it can be found under the tag ADC23-talk.

Authors: Valentin Ackva & Fares Schulz

Overview

mockup

Build Status

This repository provides a comprehensive JUCE plugin template that demonstrates the use of anira to implement neural network inference in real-time audio applications. In this template, we use all three inference engines currently supported by the library:

  • TensorFlow Lite
  • LibTorch
  • ONNXRuntime.

anira, an architecture for neural network inference in real-time audio applications, covers all critical aspects of ensuring real-time safety and seamless signal flow for real-time inference. Detailed information can be found on the library's github repo.

Build instruction

Build with CMake

# clone the repository
git clone https://github.com/Torsion-Audio/nn-inference-template/
cd nn-inference-template/

# initialize and set up submodules
git submodule update --init --recursive

# use cmake to build debug
cmake . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug
cmake --build cmake-build-debug --config Debug

# use cmake to build release
cmake . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-release --config Release

To run the plugin or standalone application with the default model, you need to copy the model files to the correct location. The application will attempt to load the neural models from the user's application data directory at runtime. Therefore, you must copy the folder ./modules/GuitarLSTM/* to the following locations, depending on your operating system:

Linux: ~/.config/nn-inference-template/GuitarLSTM/*

macOS: ~/Library/Application Support/nn-inference-template/GuitarLSTM/*

Windows: %APPDATA%\nn-inference-template\GuitarLSTM\*

Install from release

To install the plugin, please follow the instructions provided for your operating system:

LinuxmacOSWindows

Unit Test / Benchmark

The previous unit test for benchmarking the plugin performance across different audio configurations and inference backends is replaced by the benchmarking options within anira. These new benchmarks have been improved in many ways and provide a range of simple to complex benchmarks that can be used to compare the inference time for different models, inference engines, and audio configurations.

Licenses

The primary license for the code of this project is the MIT license, but be aware of the licenses of the submodules:

  • The anira library is licensed under the Apache 2.0
  • The GuitarLSTM fork is licensed under the GPLv3
  • The JUCE library is licensed under the JUCE License
  • The ONNXRuntime library is licensed under the MIT
  • The Libtorch library is licensed under the Modified BSD
  • The TensorflowLite library is licensed under the Apache 2.0
  • All other code within this project is licensed under the MIT License.

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026
RepositoryJavaScript
lutzroeder/netron

Visualizer for neural network, deep learning and machine learning models

33.8k
Dec 1, 2026
RepositoryPython
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

105.8k
Dec 1, 2026
RepositoryC++
google-ai-edge/mediapipe

Cross-platform, customizable ML solutions for live and streaming media.

38.0k
Nov 30, 2026
RepositoryPython
deepspeedai/DeepSpeed

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

43.4k
Dec 1, 2026
RepositoryJupyter Notebook
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

109.4k
Nov 26, 2026
RepositoryPython
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

82.9k
Jul 30, 2024
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryC++
CMU-Perceptual-Computing-Lab/openpose

OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation

34.6k
Aug 3, 2024