I just rebooted him and the swap use dropped back to negligible.
Turns out I was working on the EasyPiCamSensor back in December, so there is a suspect to investigate … eventually.
My attention is totally focused on this voice commander now. When I do get around to connecting the voice commander to use the EasyPiCamSensor, I’ll have to research it. Right now, voice commander is only responding after hearing the hotword, he never initiates a dialog. I’m thinking that Carl might want to initiate some dialog when he sees motion, or the lights come on or go off in the room, so I will need to merge the voice commander with my EasyPiCamSensor for that.
Since a reboot solved the problem, it’s probably a memory leak somewhere.
I don’t remember exactly where, but while wandering around on the Internet I saw a few interesting articles on Python memory management and memory leaks. You might want to do some snooping around on that topic.
Believe me, I am eager to, but I’m waiting for Carl to get over his “Marvin” alternate personality.
This really is turning out a lot better than I expected. Four and a half years ago, when the first multi-core Pi came out (RPi3B) I began to think running voice recognition on a robot might leave some processing power left to actually do something.
The Pocketsphinx engine took 100% of one processor and 0.5 amps. With the progress in “neural net” / machine learning, the hot word engine takes less than a tenth of one core and about a tenth the load on the batteries. The command and natural language engine cut the load by 60% from Pocketsphinx, and is quicker to startup so it doesn’t have to be running all the time.
Thirty-seven years ago, I investigated the “new tech” back-prop neural nets for ships-at-sea identification from silhouette images on a mini-computer that filled a specially cooled room!
That my little robot can do speech reco, and image analysis using nets is just amazing.
(I just noticed a birthday cake next to my name - turns out I’ve been haunting this forum for six years today.)
And I didn’t realize they had back-propagation neural nets that long ago. I guess that’s one of those “ahead of its time” ideas that had to wait for hardware to catch up to be really useful.
A few years ago I read that a single Google search used about the same “computing power” (don’t recall what measure they were using) than the entirety of the Apollo space program. Now it probably exceeds it. Really just amazing how powerful a Raspberry Pi really is in the context of the history of computing.