I am sure many of you have Jasper running on your Raspberry Pi – in this post, I will show you how to talk to Jasper, through Siri.
For those of you who don’t know, it is an open-source, always on, voice assistant which you can use and extend to suit your own commands and operations. Here is the link to the Jasper Voice Assistant.
The idea of using Siri to control my Raspberry Pi sounded very cool to me so I searched on the internet to find SiriProxy, which redirects the Siri commands through the Raspberry Pi, which is then intercepted. However, this was too much of a hassle and with the update of iOS 7, this stopped working. Although my way is not exactly the same, its cool. So lets get started!
First of all, you will need a new gmail account and set it up as well as your iOS device, as stated in the previous post.
After carefully following the steps, you will need to navigate to
jasper -> client
folder in the file manager. Then, you will just need to replace the brain.py and conversation.py with my scripts, which can be found here. Then, edit the conversation.py and enter your username and password of your new gmail account. This should be self-explanatory.
Now, just run Jasper, as you normally would, and speak to Siri:
“Note what is the time”
Hopefully, Jasper should respond back, with the time as this is a built in module. If not, double-check you have followed the steps correctly. Also, I suggest running the script from the previous post, which will be easier to debug.
This works similar to the script in my last post. A new thread is started which fetches new Notes and inputs them into the ‘brain’ of Jasper – this works in the same way as when you directly say something to Jasper . As your Siri notes sync with the new gmail account, you will basically be able to talk to Jasper, through Siri.
So you will be able write your own modules in the same way you would for Jasper. Now, you may ask, what is the point? Well,
- First of all you will be able to talk to Jasper from anywhere in the world, through Siri, as long as you have an internet connection, which most people do nowadays
- This will be completely secure – the link is just your gmail account with the security provided by the Google mail servers
- This opens up a lot of possibilities, such as controlling and monitoring IoT devices for home automation, using your Raspberry Pi, away from home
The only disadvantage is that this is one way connection – Jasper cannot talk back to you through Siri, however, one workaround might be for Jasper to send an email back to you.
I hope you enjoy talking to Jasper via Siri with this simple hack. Please add comments and ask questions below.