Posts: 7
Joined: Tue Jun 13, 2017 3:46 pm

Script to play an audio file

Fri Apr 06, 2018 1:49 pm

Hi All,

I'm trying mod my Google AIY kit to play an audio file whenever the button is pressed, thats it, no recording or anything else needed.

Whilst I've had fun with my Google AIY, it's time to give it a new purpose, when we make a new sale in the office, I want the ability to press the button and have it play the opening few bars of Fiesta by the Pogues. (saved on the desktop as win.wav) I've managed to play the file whilst in the terminal, I just want it connected to the button.

Given the AIY kit has a button and a speaker built in, it seems perfect for this but I'm not to sure how to implement it with all the other bits that come with the AIY kit.

I'm fairly new to programming but have managed to built my own media server with 2 external hard drives and a soft shutdown button that powers off the pi when pressed, I can't imagine this is much more complicated than that.


Return to “Python”