Speak to your car (almost) like K.I.T.T. from Knight Rider
Wouldn’t it be cool if you could speak to your car and give it commands? We remember our childhood in the last millennium where Michael Knight (David Hasselhoff) and his intelligent Pontiac Trans Am named K.I.T.T. solved crime together.
Did you know? K.I.T.T. is short for Knight Industries Two Thousand
While we may not be able to have a meaningful conversation with our car just yet, it’s now a possibility to talk to your car and give it commands to execute. We are here giving a short introduction to how this can be accomplished using the AutoPi.io system and Google Assistant.
What is AutoPi?
AutoPi is a small device that plugs into the OBD-II port of your car.
Once connected, the AutoPi device will automatically start working. It has 4G/3G connectivity, so it is always connected to the Internet. It also comes with a lot of other features, one is continuous GPS tracking.
It comes with an online dashboard, that you can login to from any device. From here you can setup your system and do real-time tracking of your vehicle telematics.
What is Google Assistant?
Google Assistant is Google’s version of Siri (Apple) and Alexa (Amazon). It lets you interact with your device, through voice commands and has typically been used together with Android devices where it comes integrated. More technically, the “Assistants” works by processing the speech recorded on the device and translate them into something understandable by a machine and this can thereby be parsed and an action can be taken. A typical use case is:
- You: “Hi. Tell me the weather in New York”
- Assistant: “It’s 10 degrees and raining”
How to use Google Assistant and AutoPi together?
As a new thing, Google recently released their Google Assistant SDK, with a python-based SDK. This SDK lets you integrate the Google Assistant with the AutoPi dongle, and give you the possibility to setup a system where you are able to give commands to your car.
When Google introduced the Google Assistant SDK with a python version, they must have thought of AutoPi, because the two things goes together perfectly.
AutoPi Core (software running on the dongle) is built using python. With the AutoPi dashboard it is possible to write custom python code modules and upload them directly to the AutoPi dongle. It is easy to program your AutoPi directly from the web interface and thereby set it up to integrate with Google Assistant.
The AutoPi comes with a built in speaker and a connection to your car (or should we call it K.I.T.T.?) through a built in OBD connector. The OBD connector lets the AutoPi communicate with the embedded computer system in your car. The only device you would need to add is a Microphone. But as the AutoPi has USB ports for external devices, this is easily added.
The main focus would be to setup the software on the device and it’s here that the Google Assistant SDK is able to help us. With this you can parse recording from your device, and turn it into an action. In short this is how it works:
- Speak a command using the USB Microphone
- Send the recorded action to Google for parsing
- The device initiates the action, based on the result from Google
The flow between the systems is:
- User speaks a command.
- The K.I.T.T. python application records and sends the spoken command to Google using the Assistant SDK.
- Google Cloud Platform translates the recorded speech into a text string.
- The text string is returned to the K.I.T.T. python application, using the SDK.
- The K.I.T.T. python application parses the text string and initiates the action found from the string, in this case the OBD subsystem.
- The OBD subsystem routine is triggered and it sends a command on the CAN bus through the OBD port. The command is to roll down the window.
- The window in the car is rolled down.
- The speaker subsystem routine is triggered. It sends the text to be spoken to Google to translate it into a sound file.
- Google returns the sound file.
- Speaker subsystem plays the sound file to the user.
- Great Success!
Let us know what you would like to have your car do and how you think this could be possible using the AutoPi and Google Assistant. Join the discussion here.
Be the first to get notified on launch
No spam - ever
Or follow us here
Other blog posts for further reading
Using a Raspberry Pi Zero as an IoT platform for your car
Internet of Things (IoT) is a popular buzzword in the tech/gadget community. The concept is that all the devices in our everyday life can be online/connected to the Internet 24/7, and thereby help to improve and make our lives more efficient. This includes our light bulbs, kitchen appliances, TVs, alarm and heating systems etc. All our "things" should be able to communicate with each other and be controlled from everywhere in order to achieve a more efficient and convenient world for us to live in.
How to easily add remote theft detection to your car
Your car is a valuable and expensive asset. Even with full insurance a car theft can be a cumbersome and expensive affair. But how can you help prevent theft of your car and possibly avoid an increased insurance premium? In this blog post, we explorer the possibilities to get remote theft detection, using the AutoPi platform.
How-to build a Raspberry Pi touch screen car computer
Integrated car computers are not only for expensive cars like the Tesla Model X nor is it only for complex car DIY projects that require you to have a degree in engineering. Not many people know how easy it is; by combining a few components it is possible to make any car intelligent. This guide will show you how similar functionality can be built into any car, by everyone.