For my program, I've been using subprocess
to play my .wav files for my Python 3 program. However, when the sound is played, the program waits until the audio file is done playing before it runs the rest of the program.
I know for winsound and pygame there are ways to play sounds in sync with the program running, but I would prefer to stick with using subprocess
because pygame hasn't been working out for me and I can't use winsound because I'm on a mac.
Here's what I have:
import subprocess
subprocess.call(["afplay", "sounds/dit.wav"])