thalhammer / snowman Goto Github PK
View Code? Open in Web Editor NEWSnowboy reimplementation
Home Page: https://thalhammer.github.io/snowman
License: Other
Snowboy reimplementation
Home Page: https://thalhammer.github.io/snowman
License: Other
I set it to 0.01, but there are still many wrong activations
Hi! First of all, thanks for making snowman!
It's really great to see snowboy living on thanks to the open source community :)
I've noticed a small issue: Calling detector->SetAudioGain()
, with any other value than 1.0f
seems to be causing the detection to break.
Issue Source
Browsing the code, I think I've found the issue: In gain-control-stream.cpp:39
we devide the audio samples by m_maxAudioAmplitude
(set to 32767.0
in line 29), in order to normalize the values for applying the gain modifier.
I've noticed, that we never multiply by m_maxAudioAmplitude
afterwards, resulting in the samples becoming very quiet. Thus the detection stops working.
This explains that the detection stops working when setting a gain different from 1.0f
since the arithmetics are only applied when a different value than 1.0
is passed.
Solution
A simple fix is to add a multiplication in line 47:
- ptr[i] = v;
+ ptr[i] = v * m_maxAudioAmplitude;
Have you every tried to apply reverse engineering to picovoice?
Good morning!
First of all thank you very much for the efforts you are putting in reverse engineering and open sourcing the original snowboy library, those are impressive skills!
I have wanted a snowboy WASM build running in the browser for a while and now with the source code it seems it might be possible. I have made an attempt you can find in my fork of the project but although it builds and runs detection on the audio data sent to it, it always returns silence (-2).
I put up a demo you can try out here (it unfortunately only works with Chrome as Firefox does not support retrieving user audio at 16000 Hz and resampling in the browser would add another step where things might go wrong, I would like to focus on getting it to work now)
In order to make it build I had to comment out several self_assert
statements that assume a 64-bit architecture and I found an issue stating that only 32bit ARM is supported.
I assume thus that the WebAssembly build might not work due to some math assuming 64 bits? I am a bit "überfragt" :) so I was hoping you could shine some light on the issue or changes needed to make it work.
Thanks!
Has it been discontinued?
If I use the supplied resources/alexa/alexa.umdl I immediately get the Not Implemented exception in UniversalDetectStream::HotwordDtwSearch()
. I see that there's a lot of code in dtw-lib.cpp already (with some TODOs) so maybe that's doable. That said I have no idea how the author got so far without the original code or docs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.