Using Siri to control your computer

If only you could control your computer using Siri, life would be so much easier! Well, it turns out you can. In this post, I will explain how this cool hack works.

siri

Please look at my updated SiriControl: A Voice Control System, based on this ingenious hack.

First, you will need a gmail account. I suggest creating a new one, for security issues, as you will have to add your username and password to a simple python script.

Next, navigate to the following on your Apple device, in Settings:

Notes  ->  Accounts  ->  Add Account

and add your gmail account.

Then, check the Notes setting. You should also uncheck the other Mail, Contacts and Calendars settings as they aren’t needed.

Click Save, at the top right hand corner.

Ensure that the Default Account Setting is set to the gmail account you created, after navigating back to the home of the Notes settings. Now, you have finished setting up your device.

To check, ask Siri to take a note:

“Note this is awesome”

And you should see your note updated in the Notes app and also under the Notes folder of the new gmail account, after logging in.

You will also need to turn on the setting for access from less secure apps which can be done here, after logging in. Also, you will need to enable IMAP in the gmail settings.

Now, you just need to edit my python script, which can be found here, and insert your username and password, which is self-explanatory, after opening up the script.

The script basically checks for new Notes, every second, after logging into the new gmail account and as you can create a Note with Siri which syncs with your gmail account, you can get the Siri commands on your computer.

That’s it! Just run the script and enjoy controlling your computer using Siri. Here are the commands:

  • “Note shutdown”
  • “Note search (whatever you want)”
  • “Note chrome”
  • “Note notepad”
  • “Note logoff”

Of course, you could also create your own commands by just editing the voicecommands and shellcommands array.

Also, I suggest renaming file extension to .pyw, after checking that it runs smoothly. This is so that the horrible black console doesn’t appear when running the script.

You could also set the script up to start up on boot. Have fun commanding Siri (and pranking your friends 😀 )!

Please add comments or ask questions below.

 

Advertisements

5 thoughts on “Using Siri to control your computer

  1. Nice job Sanjeet!!!!! So far (I am at work now) the iphone is ready and Siri notes are where they have to!!!! At home will go on with the R-Pi… Do you think you can control hardware in the same way?
    Thank you very much!!!!

    Like

  2. I didn’t see an email listed to contact you, so hopefully you see these.

    I’m currently a software engineer, but have a LOT to learn. I’m greener than grass, and work in .net.

    Would you be able to comment each line by chance in the script? I am looking to heavily modify and implement, but have NO idea what’s going on, partially because it is python which is new to me, partially because it looks like it might use an API which I havnt gotten to use any as of yet, am I on the right course?

    If not, could you maybe post another article on your development process for this? I’m extremely interested on how you went about creating this, and unfortunately many people don’t blog about the process to heavily, only the end result. I feel if I am to be a successful engineer, that understanding the process is just as if not more important.

    Also, are the shell commands simply command line commands?

    Thank you and great job!

    Like

    1. Thanks! This was just a small test to get the concept working. I will try to dcoument the process in a few days time as I am busy with school work now.

      Please follow and share my blog to keep updated. Thanks again.

      Like

    2. I am also a software engineer, and have been for a long time. Can I give you some advice? Why don’t you try to comment each line, then ask specific questions about lines that you don’t understand. I don’t know python, but to me that code looks pretty readable. You will make much more progress trying to understand something than waiting for someone to spoon-feed you

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s