Hi, I notice a number of differences when using this myself from the demo provided.
Firstly the default model on the classifier tab is 2D convolutional, to get the screenshot you provide in the tutorial I have to change it to dense network which forces a change in architecture.
Secondly the windows.bat file does not work and I receive the following errors:
You're using an untested version of Arduino CLI, this might cause issues (found: 0.32.1, expected: 0.18.x
Finding Nicla Voice core v9.9.9
Finding Nicla Voice core OK
Finding Nicla Voice...
Finding Nicla Voice OK at COM11
Flashing Arduino firmware...
Error during Upload: Platform 'arduino-git:mbed' not found: unknown package arduino-git
Platform arduino-git:mbed is not found in any known index
Maybe you need to add a 3rd party URL?
Press any key to continue . . .
Please wait target to reboot
Waiting for 0 seconds, press CTRL+C to quit ...
Finding Nicla Voice...
Writing synpkg to flash, skipping if present...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Writing NN model OK
Press any key to continue . . .
Fortunately I can flash the model manually:
D:\Training\NiclaColourSounds\Firmware\ndp120>syntiant-uploader-win send -m "Y" -w "Y" -p COM11 dsp_firmware_v91.synpkg
Sending 79828 bytes
blocks : 78
2023/04/22 11:13:01 main.go:81: dsp_firmware_v91.synpkg sent successful
D:\Training\NiclaColourSounds\Firmware\ndp120>syntiant-uploader-win send -m "Y" -w "Y" -p COM11 mcu_fw_120_v91.synpkg
Sending 22636 bytes
blocks : 23
2023/04/22 11:13:21 main.go:81: mcu_fw_120_v91.synpkg sent successful
D:\Training\NiclaColourSounds\Firmware\ndp120>syntiant-uploader-win send -m "Y" -w "Y" -p COM11 ei-model.synpkg
2023/04/22 11:13:25 main.go:64: open ei-model.synpkg: The system cannot find the file specified.
D:\Training\NiclaColourSounds\Firmware\ndp120>syntiant-uploader-win send -m "Y" -w "Y" -p COM11 ei_model.synpkg
Sending 545768 bytes
blocks : 533
2023/04/22 11:15:11 main.go:81: ei_model.synpkg sent successful
I then upload my program, using the arduino ide and it shows in the output that all words are identified as not_word.
#include "NDP.h"
//const bool lowestPower = true;
const bool lowestPower = false;
void wordDetected(char* label) {
nicla::leds.begin();
nicla::leds.setColor(blue);
delay(200);
nicla::leds.setColor(off);
if (!lowestPower) {
Serial.println(label);
}
nicla::leds.end();
}
void eventDetected() {
nicla::leds.begin();
nicla::leds.setColor(green);
delay(200);
nicla::leds.setColor(off);
nicla::leds.end();
}
void errorDetected() {
while (1) {
nicla::leds.begin();
nicla::leds.setColor(red);
delay(200);
nicla::leds.setColor(off);
delay(200);
nicla::leds.end();
}
}
void setup() {
Serial.begin(115200);
nicla::begin();
nicla::disableLDO();
nicla::leds.begin();
NDP.onError(errorDetected);
NDP.onMatch(wordDetected);
NDP.onEvent(eventDetected);
Serial.println("Loading synpackages");
NDP.begin("mcu_fw_120_v91.synpkg");
NDP.load("dsp_firmware_v91.synpkg");
NDP.load("ei_model.synpkg");
Serial.println("packages loaded");
NDP.getInfo();
Serial.println("Configure mic");
NDP.turnOnMicrophone();
NDP.interrupts();
// For maximum low power; please note that it's impossible to print after calling these functions
nicla::leds.end();
if (lowestPower) {
NRF_UART0->ENABLE = 0;
}
//NDP.turnOffMicrophone();
}
void loop() {
uint8_t command = 0xFF;
while (Serial.available()) {
command = Serial.read();
if (command == 'f') {
Serial.println("Interrupts disabled");
NDP.noInterrupts();
} else if (command == 'o') {
Serial.println("Interrupts enabled");
NDP.interrupts();
}
}
//Serial.println("in the loop");
delay(100);
}
This identifies everything as not word. In my classifer section of the model it was able to identify each of the words with 90% accuracy. If I go back to the performance classification part of the model it tells me that it will misidentify all words with 100% certainty which is what I experience in practice. i.e the model is good but just doesn't work on the Nicla voice.
I have made the model public so you can confirm what I am saying:
I have wasted many hours on trying to get the Nicla voice to work and other than the Alexa sample I cannot so far get anything from it. I am disappointed as so far it is a waste of £70.