MycroftAI / mycroft-precise

A lightweight, simple-to-use, RNN wake word listener
Apache License 2.0
818 stars 228 forks source link

Is it possible to imitate mycroft-precise functionality without python using precise-engine binary? #95

Open light42 opened 4 years ago

light42 commented 4 years ago

Actual problem: I'm trying to find a way to minimize resources(both memory and ram) needed to run mycroft-precise, since I run it on a micro-processor which have very small resources.

I found that if I installed precise-engine via binary installation, it actually uses .so files to run the engine.

Because of that, I'm really curious about the possibility of running precise-engine using C only. Can I do that?

MatthewScholefield commented 4 years ago

As it is right now, precise-engine is actually a packaged python executable. It includes the .so files for the shared libraries that Python's C extensions use. This means that regardless of whether the driver code uses Python, the engine will still regardless.

However, if you wanted to, you could feasibly call precise-engine from C by reading audio samples from portaudio in c and then writing them to stdin of the engine subprocess. This would only provide a minor speedup, particularly with the startup time.