Poetry on the line: a vintage phone brought to life with Raspberry Pi

When Théo Z V Champion visited a vintage market in London, he noticed that shoppers were rather intrigued by a rotary phone — the type that needed callers to choose a number by inserting their fingers into the relevant holes of a dial before turning the wheel in order to initiate a telephone call. It was disconnected, but that didn’t prevent many people — acting out of curiosity or feeling pangs of nostalgia — from lifting the handset and placing it against one of their ears.

No modifications were made to the housing, so it looks, to all intents and purposes, like an ordinary old-fashioned phone

In each case, they were met with silence. They’d place the handset back onto the base, inevitably smile, and turn their attention to another retro device. But what if they had been able to listen to a voice? Would they have engaged with the phone for longer and potentially gained something more from the experience? With that thought in mind, Théo acquired an old landline phone of his own — albeit a push-button type — and he got to work on retrofitting it with a speaker.

The concept was that, upon lifting the handset, the user would hear a voice reading out a poem and this, he explains, would indulge a burning passion to mix technology with art. “I believe technology and engineering are underrepresented in art, so I create pieces that use technology as both the medium and the message to reveal the invisible world of engineering around us — be they algorithms, communications/surveillance tech, artificial intelligence, the internet and so on.”

Listen up

Théo selected a vintage French Socotel S63 phone, opting for a model that was designed by the Centre national d’études des télécommunications in the 1980s as a standard-issue device for homes the length and breadth of France.

He then opened the housing and decided to make a Raspberry Pi Zero 2 W single-board computer the heart of his modernised device. Since Raspberry Pi Zero 2 W doesn’t have an on-board audio amp, he connected it to a pair of 3W amplifier chips (MAX98357A). “This would drive audio to the phone earpieces via I2S,” says Théo, who attached all of the components to a 3D-printed support and inserted it into the housing.

Raspberry Pi Zero 2 W is connected to the two small 3W amps, and these components are housed in their own 3D-printed case, which is then secured inside the phone

Raspberry Pi Zero 2 felt like a perfect fit and not simply because it was small enough to squeeze into the relatively cramped space within the phone. “I needed the phone to have internet access over Wi-Fi and to be able to play audio,” he explains. “Being a software engineer, having a full Linux environment is also a blessing for me as opposed to more constrained environments such as ESP32, MicroPython, and so on. All the tools and packages I could think of are compatible with this single-board computer.”

Finding inspiration

With the components sorted out and a switch hook connected so that, upon lifting the phone’s handset, the Raspberry Pi would spring into action, Théo began to work on the software. He’d discovered the Poetry Foundation website, which contains large collection of poems, and was delighted to find that a good number of them included audio narrated by the author.

“I poked around the website code and was quickly able to find an open access to their database,” he recalls. “I was able to download all the audio poems, but there was one issue: the poems contained an intro/outro by the author.”

The phone has a cache of a few gigabytes of poems for use offline, while audio is streamed when online with the phone directly connecting to the internet using Raspberry Pi’s wireless LAN capabilities

Théo wanted the poem to sound like the poet was actually on the other side of the phone, not just a recording. “One of the main challenges was to clean up all the audio-narrated poems from their intro/outro to only have the actual poem play when the phone is picked up,” he says. “The solution involved transcribing all the poems and then using a large language model (LLM) to cut out irrelevant portions.”

AI for rhyme

To transcribe the audio poems, Théo used WhisperX, an advanced, fast automatic speech recognition model which is capable of transcribing audio with word-level timing. Building upon OpenAI’s Whisper model that has been trained on about 680,000 hours of diverse audio, it allowed Théo to get a handle on exactly when each word was spoken in an audio clip. He could then turn to Open AI’s LLM, GPT-4o-mini, to complete the next stage of the task.

“I passed the transcription into GPT-4o-mini, asking it to remove any intro/outro [material],” he explains. “I was left with a database of more than 3000 perfectly cut audio poems.” This method also meant that the device is ‘future-proof’, so to speak. “The database updates every day as new poems are uploaded to the Poetry Foundation website,” Théo reveals, and Whispering Wires is capable of playing them all.

Of course, there are some ethical questions surrounding this move: is it right to remove the credit from the beginning of the audio simply to gain a seamless experience? Théo has already considered this and he says all of the information about the poets and the names of the poems is being saved and organised in a database. He plans to create some way to show the credits when the phone plays the poem and he’s currently looking for a small enough display.

In the meantime, Théo has been working on making his project as authentic an experience as possible. Although sound comes out of both the handset speaker and an extra earpiece that allows two people to listen to the poems at the same time, Théo has ensured that the audio isn’t played with crystal-clear clarity but instead sounds just like the phones did when they were being used a few decades ago.

“To achieve the vintage phone audio quality, I researched what frequencies phones operated at back then and applied the same filter with code (300Hz to 3.4kHz band range at 8kHz sampling frequency) to get the authentic ‘phone grain’.” He’s also added a hang-up sound followed by a line-disconnect tone when a poem ends so that the listener has the feeling the poet has hung up. To that end, it’s shaped up well as a head-turning art piece and if the response from Théo’s YouTube video is anything to go by, it is certainly getting people talking.

Raspberry Pi Official Magazine #152 out NOW!

You can grab the latest issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available from our online store, which ships around the world. And you can get a digital version via our app on Android or iOS.

You can also subscribe to the print version of our magazine. Not only do we deliver worldwide, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!

The post Poetry on the line: a vintage phone brought to life with Raspberry Pi appeared first on Raspberry Pi.



from News - Raspberry Pi https://ift.tt/uIWUJaE

Comments

Popular Posts