Cant get sparkle to work on my snowflake

hi,

snowflakes works out of the box, and it looks like it updated to 5.6.0.

problem is that it does nothing different when you say sparkle, and when i look at the log (via putty) i see:

0000131785 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: unknown: 0.99609
0000132811 [app] VoicePulse.cpp:71, VoicePulse::start(): ERROR: TFLite: DSP: 65 ms., Classification: 2 ms., Anomaly: 0 ms.
0000132815 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: sparkle: 0.00000
0000132818 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: unknown: 0.99609
0000133867 [app] VoicePulse.cpp:71, VoicePulse::start(): ERROR: TFLite: DSP: 68 ms., Classification: 2 ms., Anomaly: 0 ms.
0000133870 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: sparkle: 0.00000
0000133873 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: unknown: 0.99609
0000134904 [app] VoicePulse.cpp:71, VoicePulse::start(): ERROR: TFLite: DSP: 68 ms., Classification: 2 ms., Anomaly: 0 ms.
0000134909 [app] VoicePulse.cpp:74, VoicePulse::start(): ERROR: Classification: sparkle: 0.00000

not sure that this is even the problem. but its suspicious as i see sparkle in there!

i also found a git note that says sparkle is turned off by default, and you need to enable it via the functions on the console, but my console says no functions available.

i'm not even sure what saying sparkle is supposed to do? does anybody know?

Hello!

I wrote most of this snowflake code and made the latest update (mrlambchop).

There are several versions of snowflake firmware available right now, but the master version is the one in GitHub. If you build this from the latest today and connect to the cloud, the functions should appear and you can turn the feature on. I just released this earlier today however.

The version that you would be running is likely to be the previous version without the functions and the sparkle turned off by default, so in theory, "it should trigger". Those error prints are not errors per say - I cheated and used the error priority so they would get printed and I could see what was happening without sending too much debug down the USB connection.

The reason I turned sparkle off is that having spent a lot of time using it, I found it was getting too many false positives for it to be enjoyable. The reason was that the training data set didn't include sufficient background noise in the training samples or negative / anti sparkle words such that it could do a clean job differentiating between a TV that sounded like 'sparkle' and a person saying it up close. Essentially it worked great on the lab bench, but not in a noisy household during the holidays. A lesson here in machine learning I am sure....

To get sparkle to trigger, I found saying it fast was the best way. However, your log shows a threshold of over 0.90 which is very confident in terms of having it trigger, so it's not clear why it's not firing.

If you hold down the middle button, does a holiday song play after 3-4 seconds?

Thanks

Nick.

1 Like

thanks for the feedback!

it does playa song when i hold the capacitive button, yes. i take it thats a good sign?

I am trying to build the git image now, but having some trouble when compiling the cloud functions. could be something i did, but will have to check later when i have more time.

when building application.cpp i see this error:

src/application.cpp: In function 'void setup()':
src/application.cpp:102:31: error: 'cloudMode' was not declared in this scope; did you mean 'ledMode'?
102 | Particle.function("Mode", cloudMode);
| ^~~~~~~~~
| ledMode
make[2]: *** [../build/target/user/platform-32-msrc/application.o] Error 1
make[2]: Leaving directory /firmware/user' make[1]: *** [user] Error 2 make[1]: Leaving directory /firmware/modules/tron/user-part'
make: *** [modules/tron/user-part] Error 2
at makeError (c:\Users\jonva.vscode\extensions\particle.particle-vscode-core-1.16.13\node_modules\execa\lib\error.js:59:11)
at handlePromise (c:\Users\jonva.vscode\extensions\particle.particle-vscode-core-1.16.13\node_modules\execa\index.js:114:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Hey,

My bad (again) - I merged in another community member's submission and it didn't build due to a merge issue. Need to add CI/CD to this repo!

Build instructions are in this thread: Builds & Flashes but doesn't Run · Issue #8 · particle-iot/snowflake · GitHub

Thanks

Nick.

1 Like