how to play sound with text in python code example
Example: python mac play audio
import os
# Everything stops when played
os.system("afplay sound.wav")
# Everything continues when played
os.system("afplay sound.wav&")
import os
# Everything stops when played
os.system("afplay sound.wav")
# Everything continues when played
os.system("afplay sound.wav&")