WEEK 13: ASSEMBLED PHONE & WORKING CHATBOT
- Lauren Reyes
- Apr 20
- 3 min read
DAY 1: BASIC WORKING CHATBOT
These past two weeks have accomplished a lot, one being the working chatbot (locally on my Macbook). I wanted to accomplish two things: simple voice recognition and simple text-to-speech functionality AND basic input control to indicate a basic personality.

I had originally started with a code that utilized FREE API's and TTS libraries. It was working for the most part, but the biggest part was allowing for a smart and an easily Raspberry Pi-friendly chatbot. With the chosen libraries from last quarter, it seemed it like it relied heavily on certain environments, and I'm simply not that smart to adapt it to Raspberry Pi OS.
I installed gTTS and OpenAI, retrieved a personal key, and decided to pay for tokens. I thought it was a good investment considering the project, and it wasn't too expensive considering the project's needs. With that, the rest was relatively easy.
CODE HERE
DAY 2: FIXING & ASSEMBLING PHONE
Now for the majority of the work. I had started with no working microphone or speaker. I decided to meet with Brett, and firstly, I noted that the microphone wires were just not connected to the microphone at all. I also had noted that the speaker amplifier likely was shorted due to a mislabel of the jumper wires. I had made both the same color, which potentially could've led to the confusion. The rest of the conversation was spent giving advice on how to proceed.

So, I got to work. I first had pushed out the microphone from its casing in the actual phone shell, and re-soldered it onto the wires. I made sure to hot glue it so it actually stays in place. I decided to also remove the other layers of the phone.
I decided to also proceed without using a speaker amplifier. The amplifier last time made it super loud, so maybe the existing speaker was good enough.

I also had bought a Raspberry Pi case as I knew there would be a lot in the phone and I was worried stuff would hit the Raspberry Pi, potentially causing it to break. I made sure to buy one with a hole to access the GPIO pins easily (and it also came with a bonus fan!).
With lots of double-checking wires using a multimeter, it was time to test. Upon powering on the Raspberry Pi, I heard some feedback (not as loud as the first time the speakers were soldered). It was VERY crackly, and when running the code, I can hear a barely louder tone with the length of each note to an easy "Twinkle Twinkle Little Star" generator. It was really disappointing, as the multimeter showed successful connections. I essentially concluded it was the fault of the speaker itself, which is frustrating since I didn't have enough time to buy a speaker module in time for this first update.
When removing the jack (which was the main connection to the Raspberry Pi to the speaker), my finger had accidentally touched the tip, which created a very loud feedback tone that was reminiscent of the original installation of the amplifier. We realized there was hope for the speaker! I remembered a conversation with Brett about utilizing the existing 3.5mm output jack on the Raspberry Pi, so we plugged it in, ran the code, and it worked!

Now for the microphone, we had tried to replace the microphone with the mic on the amp module, but it did not work after soldering, so this is definitely something I will be working on it soon.
I decided to use the existing board with the original rotary phone camera as the base board. I sawed off the board so that it is smooth. I then taped down the wires and speaker amp so that it doesn't move and is more secure and harder to mess up since I believe I was finished with that.
NEXT GOALS:
Fix the microphone (either getting a new microphone or figure out what is wrong with the existing one)
Add more intricate personalities to the chatbot!
Get the pillar (and figure out how to drill a really long hole!)
Comments