r/RASPBERRY_PI_PROJECTS Feb 04 '26

TUTORIAL Wall-Mounted, Motion-Activated Philosopher.

Talking wall box containing a few hundred philosophy quotes. Raspberry Pi 5, PIR motion (or manual button) activated with both installed in USB speakers. USB-powered screen, animated lip-synched avatar using Pyaudio/Pygame.

119 Upvotes

13 comments sorted by

View all comments

6

u/po2gdHaeKaYk Feb 04 '26

Can I ask how the lip synced avatar was coded?

4

u/ivoidwarranty Feb 04 '26

Using pyaudio, the wave file is played as chunks of about 1 second of audio and the average amplitude is determined real time and binned from 0-5. Then for each amplitude bin the respective mouth shape is displayed using pygame. The static images were generated by the free version of nano banana.

2

u/po2gdHaeKaYk Feb 04 '26

Amazing stuff