That's a great question, and it's a core design goal for Nanowakeword.
The short answer is: it should be very easy.
Since Nanowakeword is designed to be a full framework, the plan is for it to have an inference API that is largely compatible with how openWakeWord works. My understanding of the HA pipeline is that it's a Python-based system.
In theory, the steps would be:
1. `pip uninstall openwakeword` and `pip install nanowakeword`.
2. In the relevant Home Assistant Python script, change the import from `from openwakeword import ...` to something like `from nanowakeword import Model`.
3. Instantiate the model with the path to your custom `.onnx` file.
The Nanowakeword `Model` class is designed to handle the necessary audio preprocessing (feature extraction) internally, so you shouldn't need to worry about manually replicating it. The `.onnx` models are already compatible.
While I haven't tested the Home Assistant integration myself yet, building a seamless replacement path is a top priority. Your question is a great confirmation that this is what users want. If you run into any issues trying this, please open an issue on the GitHub repo, and I'll be happy to help you debug it.
arcosoph_ai|4 months ago
The short answer is: it should be very easy.
Since Nanowakeword is designed to be a full framework, the plan is for it to have an inference API that is largely compatible with how openWakeWord works. My understanding of the HA pipeline is that it's a Python-based system.
In theory, the steps would be: 1. `pip uninstall openwakeword` and `pip install nanowakeword`. 2. In the relevant Home Assistant Python script, change the import from `from openwakeword import ...` to something like `from nanowakeword import Model`. 3. Instantiate the model with the path to your custom `.onnx` file.
The Nanowakeword `Model` class is designed to handle the necessary audio preprocessing (feature extraction) internally, so you shouldn't need to worry about manually replicating it. The `.onnx` models are already compatible.
While I haven't tested the Home Assistant integration myself yet, building a seamless replacement path is a top priority. Your question is a great confirmation that this is what users want. If you run into any issues trying this, please open an issue on the GitHub repo, and I'll be happy to help you debug it.
Thanks!