{"id":50834402,"url":"https://github.com/anira-project/anira","last_synced_at":"2026-06-14T02:11:18.916Z","repository":{"id":221026327,"uuid":"752685028","full_name":"anira-project/anira","owner":"anira-project","description":"an architecture for neural network inference in real-time audio applications","archived":false,"fork":false,"pushed_at":"2026-06-05T12:03:24.000Z","size":1368,"stargazers_count":217,"open_issues_count":6,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-06-05T14:05:37.654Z","etag":null,"topics":["audio","audio-processing","deep-learning","libtorch","onnxruntime","real-time","tensorflow-lite"],"latest_commit_sha":null,"homepage":"https://anira-project.github.io/anira/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anira-project.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-04T14:25:31.000Z","updated_at":"2026-06-01T17:56:15.000Z","dependencies_parsed_at":"2024-04-16T20:25:39.025Z","dependency_job_id":"54a69dd7-509a-4756-ab8c-059785864683","html_url":"https://github.com/anira-project/anira","commit_stats":null,"previous_names":["tu-studio/aari","tu-studio/anira","anira-project/anira"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/anira-project/anira","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anira-project%2Fanira","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anira-project%2Fanira/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anira-project%2Fanira/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anira-project%2Fanira/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anira-project","download_url":"https://codeload.github.com/anira-project/anira/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anira-project%2Fanira/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34306827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-processing","deep-learning","libtorch","onnxruntime","real-time","tensorflow-lite"],"created_at":"2026-06-14T02:11:17.891Z","updated_at":"2026-06-14T02:11:18.910Z","avatar_url":"https://github.com/anira-project.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![anira Logo](https://raw.githubusercontent.com/anira-project/anira/main/docs/img/anira-logo.png)\n\n![build_test](https://github.com/anira-project/anira/actions/workflows/build_test.yml/badge.svg)\n![build_benchmark](https://github.com/anira-project/anira/actions/workflows/build_benchmark.yml/badge.svg)\n![build_examples](https://github.com/anira-project/anira/actions/workflows/build_examples.yml/badge.svg)\n![build_docs](https://github.com/anira-project/anira/actions/workflows/build_docs_and_deploy.yml/badge.svg)\n![on_tag](https://github.com/anira-project/anira/actions/workflows/on_tag.yml/badge.svg)\n\n---\n\n**Anira** is a high-performance library designed to enable easy real-time safe integration of neural network inference within audio applications. Compatible with multiple inference backends, [LibTorch](https://github.com/pytorch/pytorch/), [ONNXRuntime](https://github.com/microsoft/onnxruntime/), and [Tensorflow Lite](https://github.com/tensorflow/tensorflow/), anira bridges the gap between advanced neural network architectures and real-time audio processing. In the [paper](https://doi.org/10.1109/IS262782.2024.10704099) you can find more information about the architecture and the design decisions of **anira**, as well as extensive performance evaluations with the built-in benchmarking capabilities.\n\n## Documentation\n\nAn extensive documentation of anira can be found at [https://anira-project.github.io/anira/](https://anira-project.github.io/anira/).\n\n\u003c!-- Features --\u003e\n\n## Features\n\n- **Real-time Safe Execution**: Ensures deterministic runtimes suitable for real-time audio applications\n- **Thread Pool Management**: Utilizes a static thread pool to avoid oversubscription and enables efficient parallel inference\n- **Minimal Latency**: Designed to minimize latency while maintaining real-time safety\n- **Built-in Benchmarking**: Includes tools for evaluating the real-time performance of neural networks\n- **Comprehensive Inference Engine Support**: Integrates common inference engines, LibTorch, ONNXRuntime, and TensorFlow Lite\n- **Flexible Neural Network Integration**: Supports a variety of neural network models, including stateful and stateless models\n- **Cross-Platform Compatibility**: Works seamlessly on macOS, Linux, and Windows\n\n## Usage\n\nThe basic usage of anira is as follows:\n\n```cpp\n#include \u003canira/anira.h\u003e\n\nanira::InferenceConfig inference_config(\n        {{\"path/to/your/model.onnx\", anira::InferenceBackend::ONNX}}, // Model path\n        {{{256, 1, 1}}, {{256, 1}}},  // Input, Output shape\n        5.33f // Maximum inference time in ms\n);\n\n// Create a pre- and post-processor instance\nanira::PrePostProcessor pp_processor(inference_config);\n\n// Create an InferenceHandler instance\nanira::InferenceHandler inference_handler(pp_processor, inference_config);\n\n// Pass the host configuration and allocate memory for audio processing\ninference_handler.prepare({buffer_size, sample_rate});\n\n// Select the inference backend\ninference_handler.set_inference_backend(anira::InferenceBackend::ONNX);\n\n// Optionally get the latency of the inference process in samples\nunsigned int latency_in_samples = inference_handler.get_latency();\n\n// Real-time safe audio processing in process callback of your application\nprocess(float** audio_data, int num_samples) {\n    inference_handler.process(audio_data, num_samples);\n}\n// audio_data now contains the processed audio samples\n```\n\n## Installation\n\nAnira can be easily integrated into your CMake project. You can either add anira as a submodule, download the pre-built binaries from the [releases page](https://github.com/anira-project/anira/releases/latest), or build from source.\n\n### Option 1: Add as Git Submodule (Recommended)\n\n```bash\n# Add anira repo as a submodule\ngit submodule add https://github.com/anira-project/anira.git modules/anira\n```\n\nIn your `CMakeLists.txt`:\n\n```cmake\n# Setup your project and target\nproject(your_project)\nadd_executable(your_target main.cpp ...)\n\n# Add anira as a subdirectory\nadd_subdirectory(modules/anira)\n\n# Link your target to the anira library\ntarget_link_libraries(your_target anira::anira)\n```\n\n### Option 2: Use Pre-built Binaries\n\nDownload pre-built binaries from the [releases page](https://github.com/anira-project/anira/releases/latest).\n\nIn your `CMakeLists.txt`:\n\n```cmake\n# Setup your project and target\nproject(your_project)\nadd_executable(your_target main.cpp ...)\n\n# Add the path to the anira library as cmake prefix path and find the package\nlist(APPEND CMAKE_PREFIX_PATH \"path/to/anira\")\nfind_package(anira REQUIRED)\n\n# Link your target to the anira library\ntarget_link_libraries(your_target anira::anira)\n```\n\n### Option 3: Build from Source\n\n```bash\ngit clone https://github.com/anira-project/anira.git\ncd anira\ncmake . -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --config Release --target anira\ncmake --install build --prefix /path/to/install/directory\n```\n\n### Build options\n\nBy default, all three inference engines are installed. You can disable specific backends as needed:\n\n- LibTorch: ``-DANIRA_WITH_LIBTORCH=OFF``\n- OnnxRuntime: ``-DANIRA_WITH_ONNXRUNTIME=OFF``\n- Tensorflow Lite: ``-DANIRA_WITH_TFLITE=OFF``\n\nMoreover, the following options are available:\n\n- Build anira with benchmark capabilities: ``-DANIRA_WITH_BENCHMARK=ON``\n- Build example applications, plugins and populate example neural models: ``-DANIRA_WITH_EXAMPLES=ON``\n- Build anira with tests: ``-DANIRA_WITH_TESTS=ON``\n- Build anira with documentation: ``-DANIRA_WITH_DOCS=ON``\n- Disable the logging system: ``-DANIRA_WITH_LOGGING=OFF``\n\n## Examples\n\n### Build in examples\n\n- [Simple JUCE Audio Plugin](https://github.com/anira-project/anira/tree/main/examples/juce-audio-plugin/): Demonstrates how to use anira in a real-time audio JUCE / VST3-Plugin.\n- [CLAP Plugin Example](https://github.com/anira-project/anira/tree/main/examples/clap-audio-plugin/): Demonstrates how to use anira in a real-time clap plugin.\n- [Benchmark](https://github.com/anira-project/anira/tree/main/examples/benchmark/): Demonstrates how to use anira for benchmarking of different neural network models, backends and audio configurations.\n- [Minimal Inference](https://github.com/anira-project/anira/tree/main/examples/minimal-inference/): Demonstrates how minimal inference applications can be implemented in all three backends.\n\n### Other examples\n\n- [nn-inference-template](https://github.com/Torsion-Audio/nn-inference-template): Another more JUCE / VST3-Plugin that uses anira for real-time safe neural network inference. This plugin is more complex than the simple JUCE Audio Plugin example as it has a more appealing GUI.\n\n## Real-time safety\n\nanira's real-time safety is checked in [this](https://github.com/anira-project/anira-rt-principle-check) repository with the [rtsan](https://github.com/realtime-sanitizer/rtsan) sanitizer.\n\n## Citation\n\nIf you use anira in your research or project, please cite either the [paper](https://doi.org/10.1109/IS262782.2024.10704099) or the software itself:\n\n```bibtex\n@inproceedings{ackvaschulz2024anira,\n    author={Ackva, Valentin and Schulz, Fares},\n    booktitle={2024 IEEE 5th International Symposium on the Internet of Sounds (IS2)},\n    title={ANIRA: An Architecture for Neural Network Inference in Real-Time Audio Applications},\n    year={2024},\n    volume={},\n    number={},\n    pages={1-10},\n    publisher={IEEE},\n    doi={10.1109/IS262782.2024.10704099}\n}\n\n@software{ackvaschulz2024anira,\n    author = {Valentin Ackva and Fares Schulz},\n    title = {anira: an architecture for neural network inference in real-time audio application},\n    url = {https://github.com/anira-project/anira},\n    version = {x.x.x},\n    year = {2024},\n}\n```\n\n## Contributors\n\n- [Fares Schulz](https://github.com/faressc)\n- [Valentin Ackva](https://github.com/vackva)\n\n## Sponsor\n\u003cimg src=\"docs/img/bmftr-funding.png\" alt=\"Funded by the German Federal Ministry of Research, Technology and Space (BMFTR)\" width=\"200\"\u003e\n\n## License\n\nThis project is licensed under [Apache-2.0](https://github.com/anira-project/anira/tree/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanira-project%2Fanira","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanira-project%2Fanira","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanira-project%2Fanira/lists"}