Blog

Vintage Rotary Phone Becomes Home Assistant with ChatGPT - Hackster.io

Please ensure that JavaScript is enabled in your browser to view this page.

ChatGPT is, ostensibly, a chatbot that relies on a large language model (LLM) built around an artificial neural network to generate text. But that underlying capability has proven to be extremely versatile and people have been able to use ChatGPT for everything from writing code to solving puzzles. It can even act as a voice assistant, like an advanced version of Siri or Alexa. Its abilities are almost limitless if you have the skill to teach it how to handle the desired tasks. Zoltan took advantage of that to turn a vintage rotary phone into a home assistant powered by ChatGPT. Multi Line Telephone Intercom

Vintage Rotary Phone Becomes Home Assistant with ChatGPT - Hackster.io

This is an update to a project that Zoltan completed years ago, in which he put basic a voice assistant into an old rotary phone. When he picked up the handset, he could speak a command and the assistant would respond—if it understood what was asked of it. But that wasn't very good at understanding or interpreting speech. If the spoken command didn't fit the right format or wasn't enunciated well, the assistant wouldn't be able to respond. Most of us have experienced similar problems with Siri and other voice assistants. But ChatGPT is very good at interpreting natural language, so Zoltan upgraded his rotary phone voice assistant to use that.

The only hardware in the phone itself is a Grandstream HT801, which is a device intended to convert analog phones into VoIP (Voice over Internet Protocol) devices. In this case, it turns audio picked up by the handset into a digital audio stream and vice-versa. That audio feeds to a Raspberry Pi single-board computer located elsewhere in Zoltan's home. The Raspberry Pi then handles all of the communication with the various services this project requires.

First, it sends audio to OpenAI's Whisper service, which provides speech recognition. The text generated by Whisper then goes to ChatGPT for interpretation. If it is something like a question, ChatGPT will return an answer in the form of text. That text is then passed AWS Polly, which handles the text-to-speech functionality. Finally, that audio goes back through the Grandstream HT801 to the handset's speaker.

If, however, ChatGPT interprets the text as a command, such as "turn on the lights," it will call a Python function. It is up to Zoltan what to do with those functions. He can, for instance, play a song through the Spotify API (Application Programming Interface). In theory, Zoltan can control anything that has an accessible API. But that does require that he set up the functions himself — ChatGPT can't make those connections.

And, of course, there is the issue of accuracy when it comes to factual information. ChatGPT is well-known for its "hallucinations" (read: lies). It can also be out of date, if an answer comes from training data gathered prior to an event happening. As Zoltan demonstrates, it was unaware of the death of Queen Elizabeth II because that occurred after its last training data update.

But even so, this is a fun project and it ultimately has more potential than your typical consumer voice assistant.

Vintage Rotary Phone Becomes Home Assistant with ChatGPT - Hackster.io

Old Fashioned Telephone Dial Hackster.io, an Avnet Community © 2023