This is my first post and my first major Python program, and I have a few questions to ask.
I am trying to build an R2D2 and plan to use 2 Raspis, one for the brains of the robot and another for the controller. The pigpio daemon will be running on the robot-Pi, and I plan to use the pigpio python library to control the GPIO pins from the controller-Pi, using software PWM for motor and light control. The controller-Pi will be using pygame to read from a generic USB gamepad/joystick, and triggering robot-Pi GPIO events based on what buttons are pressed and the position of the analog sticks.
This all will probably work fine, and I foresee no conflicts between pygame and pigpio. But I would love my R2D2 to speak, and have found a bunch of .wav sounds of R2D2 speaking on the internet. I know that I can use pygame to play .wav sounds locally (on the controller-Pi), but I would like to have the .wav sounds stored and played from the robot-Pi, with playback triggered remotely from the controller-Pi. I would like, say, sound1.wav to be played on the robot-Pi when I press button9 on the gamepad connected to the controller-Pi, keeping in mind that I already have the gamepad being used by pygame to control GPIO via pigpio.
What is the best way to trigger the playback of .wav sounds via gamepad button presses on a 2 seperate Pi's?