I have built a prototype for a product that consists of a microphone, a raspberry pi 3B+, an arduino and several motor drivers and some motors.
I have written a script in python that listens to what is being said through the microphone, uses google API to translate the sounds into words, and then searches a file for those words. Each word has a sequence of vibrations that is associated with it - this sequence is sent to the arduino over serial which then causes the motors to vibrate in a recognisable pattern dependant on what has been said. I am now at the stage that I want to scale this down as the hardware listed above is quite bulky, and this needs to be a wearable device.
I have tried the same setup with the raspberry pi 0 w but it just crashes - the file that the python script is opening then importing to an array is quite large and the pi can't seem to handle it.
I essentially need a board that can access the internet to use google's API, store a file of 130000+ words and related sequences, run a python script and 'talk' to an arduino/motor driver setup on a small scale. Speed is quite essential as the vibrations need to happen as close to the trigger word's occurrence as possible.
I am pretty much at the limit of my knowledge so was just wondering if anyone would have any suggestions as to how to tackle this? Would this be something the Raspberry Pi Compute Module would be used for? Or is there a possibility of creating a custom board?
Any help is appreciated.