{"id":13728856,"url":"https://github.com/Torsion-Audio/nn-inference-template","last_synced_at":"2025-05-08T01:30:26.374Z","repository":{"id":198665211,"uuid":"692856370","full_name":"Torsion-Audio/nn-inference-template","owner":"Torsion-Audio","description":"Neural network inference template for real-time cricital audio environments - presented at ADC23","archived":false,"fork":false,"pushed_at":"2024-09-23T21:13:22.000Z","size":19510,"stargazers_count":97,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-14T19:40:25.382Z","etag":null,"topics":["audio","audio-plugin","deep-learning","inference","inference-engine","juce","libtorch","machine-learning","neural-network","onnx","onnxruntime","pytorch","tensorflow","tensorflow-lite"],"latest_commit_sha":null,"homepage":"https://torsion-audio.github.io/nn-inference-template/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Torsion-Audio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-17T19:38:48.000Z","updated_at":"2024-10-11T10:00:37.000Z","dependencies_parsed_at":"2023-10-16T03:32:31.671Z","dependency_job_id":"0dc5d36e-18c2-4e2f-b1d2-280fae169eac","html_url":"https://github.com/Torsion-Audio/nn-inference-template","commit_stats":null,"previous_names":["torsion-audio/nn-inference-template"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torsion-Audio%2Fnn-inference-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torsion-Audio%2Fnn-inference-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torsion-Audio%2Fnn-inference-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torsion-Audio%2Fnn-inference-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Torsion-Audio","download_url":"https://codeload.github.com/Torsion-Audio/nn-inference-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252981359,"owners_count":21835414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-plugin","deep-learning","inference","inference-engine","juce","libtorch","machine-learning","neural-network","onnx","onnxruntime","pytorch","tensorflow","tensorflow-lite"],"created_at":"2024-08-03T02:00:51.328Z","updated_at":"2025-05-08T01:30:23.809Z","avatar_url":"https://github.com/Torsion-Audio.png","language":"C++","funding_links":[],"categories":["Templates","Machine Learning"],"sub_categories":[],"readme":"#  A Template Audio Plugin for Real-time Neural Network Inference\n\n\u003e 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](https://www.youtube.com/watch?v=z_RKgHU59r0).\n\n\u003e 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](https://github.com/tu-studio/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](https://github.com/Torsion-Audio/nn-inference-template/tree/ADC23-talk).\n\n\u003e Authors: **Valentin Ackva** \u0026 **Fares Schulz**\n\n## Overview\n\n![mockup](assets/graphics/mockup.png)\n\n![Build Status](https://github.com/Torsion-Audio/nn-inference-template/actions/workflows/build.yml/badge.svg)\n\nThis repository provides a comprehensive JUCE plugin template that demonstrates the use of [anira](https://github.com/tu-studio/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:\n\n- TensorFlow Lite\n- LibTorch\n- ONNXRuntime.\n\n[anira](https://github.com/tu-studio/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](https://github.com/tu-studio/anira).\n\n## Build instruction\n\n**Build with CMake**\n\n```bash\n# clone the repository\ngit clone https://github.com/Torsion-Audio/nn-inference-template/\ncd nn-inference-template/\n\n# initialize and set up submodules\ngit submodule update --init --recursive\n\n# use cmake to build debug\ncmake . -B cmake-build-debug -DCMAKE_BUILD_TYPE=Debug\ncmake --build cmake-build-debug --config Debug\n\n# use cmake to build release\ncmake . -B cmake-build-release -DCMAKE_BUILD_TYPE=Release\ncmake --build cmake-build-release --config Release\n```\n\nTo 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:\n\nLinux: ```~/.config/nn-inference-template/GuitarLSTM/*```\n\nmacOS: ```~/Library/Application Support/nn-inference-template/GuitarLSTM/*```\n\nWindows: ```%APPDATA%\\nn-inference-template\\GuitarLSTM\\*```\n\n\n## Install from release\n\nTo install the plugin, please follow the instructions provided for your operating system:\n\n| [Linux](assets/docs/install_linux.md) | [macOS](assets/docs/install_mac.md) | [Windows](assets/docs/install_win.md) |\n|---|---|---|\n\n## Unit Test / Benchmark\n\nThe previous unit test for benchmarking the plugin performance across different audio configurations and inference backends is replaced by the benchmarking options within [anira](https://github.com/tu-studio/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.\n\n## Licenses\n\nThe primary license for the code of this project is the MIT license, but be aware of the licenses of the submodules:\n\n\n - The *anira* library is licensed under the [Apache 2.0](https://github.com/tensorflow/tensorflow/blob/master/LICENSE)\n - The *GuitarLSTM* fork is licensed under the [GPLv3](https://github.com/GuitarML/GuitarLSTM/blob/main/LICENSE.txt)\n - The *JUCE* library is licensed under the [JUCE License](https://github.com/juce-framework/JUCE/blob/master/LICENSE.md)\n - The *ONNXRuntime* library is licensed under the [MIT](https://github.com/microsoft/onnxruntime/blob/main/LICENSE)\n - The *Libtorch* library is licensed under the [Modified BSD](https://github.com/pytorch/pytorch/blob/main/LICENSE)\n - The *TensorflowLite* library is licensed under the [Apache 2.0](https://github.com/tensorflow/tensorflow/blob/master/LICENSE)\n - All other code within this project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTorsion-Audio%2Fnn-inference-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTorsion-Audio%2Fnn-inference-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTorsion-Audio%2Fnn-inference-template/lists"}