In this project, we have designed a personal voice assistant that would take voice commands and perform tasks accordingly. It would perform as a personal assistant that would help the user with daily chores. We have used Raspberry Pi and Amazon's Alexa API for this purpose. We have also designed a system for detection of handwriting. We have used Accelerometer to get data while the writing process occurs and used that data to train machine learning models that would predict the handwriting.
Raspberry Pi:2 Model: B
USB sound card
USB power cable
HDMI to VGA converter
We used Amazon's voice recognition API 'Alexa'.
We start the services required to get the device token for the API.
After running the companion service and javaClient the wakeword agent is run. The device must have an internet connection set up already through either ethernet or wifi.
The user then has to speak to the microphone 'Alexa'.
Alexa gives a beep sound as a reply.
The device is ready now. One can ask questions, set alarm, make to do list etc.
The data recieved from accelerometer are processed and saved into a csv file which is then fed to java machine larning library java-ml. We used three different appoaches in choosing the filters: NearestMeanClassifier, RandomTree, RandomForest. The neural network constructed with 10 test samples of 5 letters each of which contained 300 x and y values extracted from the accelerometer attached to the pen. Then new runtime data was analysed against the given data and it achived maximum 60% accuracy.
fig.1 Block Diagram
2.Request for Alexa Device Token.
3.Get the device token from server.
4.Alexa waits for the wake up word.
5.If wake up word received
6.Alexa responds and waits for a command.
7.If the command is valid
8.Alexa performs the command.
2.Write an alphabet with the accelerometer attached pen in a paper and collect data.
3.Process the data.
In the first part of our project, Personal Assistant, we don't need any GPIO pin as we are using the USB ports. In the second part which is Handwriting recognition using accelerometer, we needed to use the GPIO pin. The pin diagram for Personal Assistant is the same as our block diagram. Here we are giving the pin diagram for the second part of our project.
fig.2 Pin Diagram(Raspberry Pi GPIO pin with accelerometer)