How AI Turned a Magic 8-Ball Into a Voice Oracle (Full Transcript)
[00:00:00] Speaker 1: Is voice AI the future of human-computer interfaces?
[00:00:05] Speaker 2: The mists stir, and the answer is yes. A voice shall become the way.
[00:00:10] Speaker 1: So we all know how a normal magic 8-ball works. You ask it your question, and then you give it a shake, and it gives you this cool, mysterious answer to your question. But I felt, in this day and age, we can do way better than this. By using Assembly AI's text-to-speech and speech-to-text, we can add some interaction to make this magic 8-ball truly magical. So the idea was, I would ask it a question, it would transcribe it, and then use LLM Gateway to generate an answer, and then I would text-to-speech to read it out back to me. And all of this is done with a powerful mini-computer on the inside of this magic 8-ball, and I'll show you how I did all of it from start to finish. So the very first thing I did was get Claude to write the ESP32 code for me, and then I got to work on wiring all the pieces together. I had to add a gyro to detect when the ball was shaking, and it kind of started smoking on the way because I wired something up wrongly. And then I added a screen to give us the cool animation when you shake the ball, along with reading out the answers. Lastly, I wired up a speaker so that the ball would read out the answer to me audibly, rather than just reading off of the screen. And now all that was left to do was to open up that magic 8-ball and install my computer inside. And so after my first test, I had a working magic 8-ball, but I felt we could do even better. Using Claude, I could adjust the prompt on the backend to make it more customized to my question. So like for example, when I asked if voice was the future, it would kind of riff off of that and give me a mystical answer in the same theme. Is voice the future of human-computer interfaces?
[00:02:14] Speaker 2: Between flesh and machine, the mists stir. The answer is maybe.
[00:02:20] Speaker 1: And the other thing that I felt could use some improvement was the voice that we used for the magic 8-ball. I felt it could use a bit more mystique and a bit more spookiness, and so that's where the Assembly AI Dashboard came in super helpful. It gave me filters and toggles to find a British voice in a deep and breathy tone, and that way I was able to nail that mystical magic 8-ball experience. And now it's so much fun. Hey magic 8-ball, is it going to rain tomorrow?
[00:02:51] Speaker 2: The mists whisper of clouds gathering at dawn, yet the moon remains uncertain.
[00:02:57] Speaker 1: Hey magic 8-ball, can you make predictions on polymarket?
[00:03:00] Speaker 2: The spirits cannot see those markets. Trust your own judgement instead.
[00:03:06] Speaker 1: Stay tuned for magic 8-ball on polymarket. And so that was this magic 8-ball on our latest text-to-speech and speech-to-text models. As usual, if you have any questions or requests for cool things that I should build, leave them in the comments below, and I'll see you for the next one. Bye.
- Voice AI can make familiar physical objects more interactive and expressive.
- The project combines shake detection, speech transcription, LLM-generated responses, a display, and synthesized speech.
- An ESP32 serves as the compact computer inside the Magic 8-Ball.
- Prompt engineering helps keep generated answers aligned with a mystical Magic 8-Ball theme.
- Voice selection, including tone and accent, is important for creating an immersive character experience.