{"id":30104209,"url":"https://github.com/mikeoliphant/neuralaudio","last_synced_at":"2025-10-15T14:16:13.974Z","repository":{"id":260952850,"uuid":"881016541","full_name":"mikeoliphant/NeuralAudio","owner":"mikeoliphant","description":"C++ library for real-time processing of audio neural network models","archived":false,"fork":false,"pushed_at":"2025-08-03T15:19:19.000Z","size":560,"stargazers_count":70,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-11T04:49:03.204Z","etag":null,"topics":["lstm","machine-learning","nam","neural-amp-modeler","wavenet"],"latest_commit_sha":null,"homepage":"","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/mikeoliphant.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,"zenodo":null}},"created_at":"2024-10-30T19:16:17.000Z","updated_at":"2025-08-08T08:05:41.000Z","dependencies_parsed_at":"2024-11-03T21:19:11.579Z","dependency_job_id":"95f5b755-6eb8-42d1-ac20-a8552e53f01d","html_url":"https://github.com/mikeoliphant/NeuralAudio","commit_stats":null,"previous_names":["mikeoliphant/neuralaudio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikeoliphant/NeuralAudio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeoliphant%2FNeuralAudio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeoliphant%2FNeuralAudio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeoliphant%2FNeuralAudio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeoliphant%2FNeuralAudio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeoliphant","download_url":"https://codeload.github.com/mikeoliphant/NeuralAudio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeoliphant%2FNeuralAudio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279085218,"owners_count":26100015,"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","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"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":["lstm","machine-learning","nam","neural-amp-modeler","wavenet"],"created_at":"2025-08-09T22:31:41.373Z","updated_at":"2025-10-15T14:16:13.969Z","avatar_url":"https://github.com/mikeoliphant.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NeuralAudio\n\nNeuralAudio is a C++ library designed to make it easy to use neural network machine learning models (ie: guitar amplifier captures/profiles) in real-time audio applications.\n\n# Supported Models\n\nNeuralAudio currently supports the following model types:\n\n- [Neural Amp Modeler](https://github.com/sdatkinson/neural-amp-modeler) (NAM) WaveNet and LSTM models\n- [RTNeural](https://github.com/jatinchowdhury18/RTNeural) keras models (LSTM, GRU)\n\n# Underlying Libraries and Performance\n\nBy default, NeuralAudio uses its own implementation of WaveNet and LSTM network models. This implementation has been designed to produce **exactly** the same output as the [NAM Core library](https://github.com/sdatkinson/NeuralAmpModelerCore), but with increased performance and reduced memory usage.\n\nFor completeness, and to facilitate accuracy and performance benchmarking, it can also load models using the [NAM Core implementation](https://github.com/sdatkinson/NeuralAmpModelerCore) and [RTNeural](https://github.com/jatinchowdhury18/RTNeural).\n\nThe internal NeuralAudio implmentation currently outperforms the other implementations on all tested platforms (Windows x64, Linux x64/Arm64). It also uses significantly less memory than the NAM Core WaveNet implementation (which, for example, uses about 10x as much memory for a \"standard\" WaveNet model).\n\nFor WaveNet, the internal implmeentation supports optimized static models of the offical NAM network architectures:  \"Standard\", \"Lite\", \"Feather\", \"Nano\".\n\nFor LSTM, the internal implementation supports optimized static models architectures:\n\n- LSTM 1x8\n- LSTM 1x12\n- LSTM 1x16\n- LSTM 1x24\n- LSTM 2x8\n- LSTM 2x12\n- LSTM 2x16\n\nAll NAM files with WaveNet and LSTM architectures not supported internally will fall back on a less performant dynamic implementation (although still faster than NAM Core).\n\nAll keras models not supported internally will fall back to the RTNeural implmentation.\n\n# API overview\n\nTo load a model:\n```\nNeuralModel* model = NeuralAudio::NeuralModel::CreateFromFile(\"\u003cpath to model file\u003e\");\n```\n\nTo process a model:\n\n```\nmodel-\u003eProcess(pointerToFloatInputData, pointerToFloatOutputData, int numSamples);\n```\n\n## Setting maximum buffer size\n\nSome models need to allocate memory based on the size of the audio buffers being used. You need to make sure that processing does not exceed the specified maximum buffer size.\n\nThe default maximum size is 128 samples. To change it, do:\n\n```\nNeuralAudio::NeuralModel::SetDefaultMaxAudioBufferSize(maxSize);\n```\n\nif you want to change the maximum buffer size of an already created model, do:\n\n```\nmodel-\u003eSetMaxAudioBufferSize(int maxSize);\n```\n\n***Note: this is not real-time safe, and should not be done on a real-time audio thread.***\n\n## Input/Output calibration\n\nUse ```model-\u003eGetRecommendedInputDBAdjustment()``` and ```model-\u003eGetRecommendedOutputDBAdjustment()``` to obtain the ideal input and output volume level adjustments in dB.\n\nTo set a known audio input level (ie: from an audio interface), use ```model-\u003eSetAudioInputLevelDBu(float audioDBu)```. This is set at 12DBu by default.\n\n## Model load behavior\n\nBy default, models are loaded using the internal NeuralAudio implementation. If you would like to force the use of the NAM Core or RTNeural implementations, you can use:\n\n```\nNeuralAudio::NeuralModel::SetWaveNetLoadMode(loadMode)\n```\n\nand\n\n```\nNeuralAudio::NeuralModel::SetLSTMLoadMode(loadMode)\n```\n\nwhere \"loadMode\" is one of:\n\n```\nNeuralAudio::EModelLoadMode::Internal\nNeuralAudio::EModelLoadMode::NAMCore\nNeuralAudio::EModelLoadMode::RTNeural\n```\n\nYou can check which implementation was actually used to load the model with ```model-\u003eGetLoadMode()```.\n\n**NOTE:** Because of compile time and executable size considerations, only the internal and dynamic RTNeural implementations are built by default. If you want to use RTNeural, it is recommended that you add ```-DBUILD_STATIC_RTNEURAL=ON``` to your cmake commandline. This will create static model implmentations for the same sets of WaveNet and LSTM models as the internal implmentation, and results in increased performance. If you want to use NAM Core, add ```DBUILD_NAMCORE=ON``` to your cmake commandline.\n\n# Building\n\nFirst clone the repository:\n```bash\ngit clone --recurse-submodules https://github.com/mikeoliphant/NeuralAudio\ncd NeuralAudio/build\n```\n\nThen compile the plugin using:\n\n**Linux/MacOS**\n```bash\ncmake .. -DCMAKE_BUILD_TYPE=\"Release\"\nmake -j4\n```\n\n**Windows**\n```bash\ncmake.exe -G \"Visual Studio 17 2022\" -A x64 ..\ncmake --build . --config=release -j4\n```\n\nNote - you'll have to change the Visual Studio version if you are using a different one.\n\n## CMake Options\n\n```-DBUILD_NAMCORE=ON```: Support loading models using the NAM Core implemenations.\n\n```-DBUILD_STATIC_RTNEURAL=ON```: Build static RTNeural model architectures (slower compile, larger size - only use if you plan on forcing RTNeural model loading).\n\n```-DWAVENET_FRAMES=XXX```: Sample buffer size for the internal WaveNet implementation. Defaults to **64**. If you know you are going to be using a fixed sample buffer smaller or larger than this, use that instead. Note that the model will still be able to process any buffer size - it is just optimized for this size.\n\n```-DBUFFER_PADDING=XXX```: Amount of padding to convolution layer buffers. This allows ring buffer resets to be staggered accross layers to improve performance. It also uses a significant amount of memory. It is set to **24** by default. It can be set all the way down to 0 to reduce memory usage.\n\n```-DWAVENET_MATH=XXX```\n```-DLSTM_MATH=XXX```: Which math approximations (tanh and sigmoid) to use for WaveNet and LSTM models. Options are:\n\n  - ```FastMath``` (the default): Use the same approximations as NAM Core.\n  - ```EigenMath```: Use Eigen's builtin tanh approximation. Somewhat slower, but more accurate.\n  - ```StdMath```: Use standard math functions. No approxmation used - much slower.\n\n```-DBUILD_UTILS=ON```: Build performance/accuracy testing tools (located in the \"Utils\" folder).\n\n# Software/Hardware Using NeuralAudio\n\nThe following applications and devices are using the NeuralAudio library for model processing:\n\n- [neural-amp-modeler-lv2](https://github.com/mikeoliphant/neural-amp-modeler-lv2): LV2 plugin for using neural network machine learning amp models.\n- [stompbox](https://github.com/mikeoliphant/stompbox): Guitar amplification and effects pedalboard simulation.\n- [NeuralRack](https://github.com/brummer10/NeuralRack): Neural Model and Impulse Response File loader for Linux/Windows.\n- [Darkglass Anagram](https://www.darkglass.com/creation/anagram): Bass guitar effects unit.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeoliphant%2Fneuralaudio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeoliphant%2Fneuralaudio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeoliphant%2Fneuralaudio/lists"}