This article was written in 2020. It might or it might not be outdated. And it could be that the layout breaks. If that’s the case please let me know.
Turning old rotary phones into music streamers
A while ago our good friend Dave gave us a very nice old record player. One of the things that I noticed when I started playing records again is that I was much more conscious of the music I was playing. Putting up a record involves quite a few — rather random — actions. You need to physically browse through all these large pieces of coloured cardboard. Then you select one of these pieces and from it you take a piece of paper. From within that paper you take a large plastic disc. You flip the disc a few times to take a good look at the coloured labels in the center. Then you lay the disc onto a machine, turn a knob which makes the disc spin, gently swipe the disc with a brush, place a handle over it, turn another knob, and finally close the lid of the machine to start listening music.
I wanted a similar experience for selecting Spotify playlists. A slow, more conscious way of picking music than simply pressing the play button. I imagined a physical machine, with all kinds of mechanics to somehow select a playlist, and select the amount of songs I want to hear. I started experimenting with different types of input, like little coloured perspex plates. And Dave also gave me a rotary dial of an old phone, which could work as an input as well. I had most mechanics working, but I just couldn’t come up with a form factor for this device. And so the project stalled.
But a few weeks ago I decided to work on this project again. And I decided to simply use an old Dutch T65 rotary phone as the input device. This way I didn’t have to think about a physical form factor and I could simply work on the product itself and see if it works as I intended.
Well, yes, it works. And it is really, really nice.
You pick up the phone and it welcomes you in a bit of a sleepy voice with the words: “Hello, dial zero to listen to music”. Why zero? It is zero because it is the most satisfactory number to dial. Then it starts reading the playlists one by one. It starts with the last playlist you chose, and then it reads the rest in a random order. Which sounds something like: “Dial zero zero, to listen to ‘Dub Dub Dub’; dial zero one, to listen to ‘Baba Zula’; dial zero two, to listen to ‘Raaaaargh’; dial …” When you’ve chosen your playlist it asks you bored but politely how many songs you want to hear. It then picks these songs randomly from your chosen playlist. And then it tells you to “Enjoy the music, you can hang up now.”
The music is streamed to the stereo in our living room.
Nerdy details
On a blog with the word nerd in its URL there should be some nerdy details.
Voice
For voice I use eSpeak NG which is fantastic. You can use SSML, which has all kinds of very nice nerdy features that can help you in sculpting the voice. You can change things like speed and pitch, and you can play with emphasis and breaks. Really, really nice to work with!
The default english voice of eSpeak NG is very robotic, not nice to listen to at all and very hard to understand. So I installed the default British English MBROLA voice, which, in this context, sounds hilariously bored and sad when you turn down the pitch to 30%. I found that a speed of 140 makes most of the phrases acceptably understandable.
The combination of eSpeak NG, MBROLA voices and SSML is fantastic. So much fun to design every detail of how a piece of text is spoken. It immediately inspired me to make a course in designing voices for my students.
Handling of playlists
The handling of playlists and the streaming to our stereo is completely handled by the incredible forked-daapd project. Without this project I don’t think I could have created these devices. It has an excellent API, which made it rather easy to get it to work the way I want it to. By default forked-daapd uses Airplay for streaming, but it offers other ways as well, like an mp3 stream and a named pipe.
Forked-daapd is designed as a DAAP and MPD server. So by design it is meant for playing local files, like iTunes does. As a bonus it also offers support for Spotify. My project uses both Spotify playlists, and playlists I made from my own digital music collection. A minor detail, but nerdy enough to mention.
Hardware
The phones are powered by a Raspberry Pi 3B+ with Raspberry Pi OS Lite. It could probably work with a less powerful Raspberry Pi, but I found that the wifi signal is much better in the 3B+ than in the 3B. This signal strength is especially needed in the cast iron device.
The Pi fits well into the cast iron phone, but I unfortunately had to remove the bells from the T65 to fit it in.
For connecting the phone to the Raspberry Pi I used this excellent (Dutch) explanation. I also used his code as a basis for my project, though I mutilated it so thoroughly that I dare not share it with you.