1668A, 14th Main Rd, Sector 7, HSR Layout, Bengaluru, Karnataka 560102
+91 99459 30733 (9am - 6pm IST, Tuesday - Sunday)
Its a great module to play sound files. Its cross platform that means it works on Windows, Mac as well as Linux.
Refer for more details: https://pypi.org/project/playsound/
pip3 install playsound
from playsound import playsound
file = "song.mp3"
playsound(file, True)
Any space in the absolute path of file will cause issue and will throw IOError.
A simple fix is to replace all the spaces with %20.
from playsound import playsound
file = "<absolute-path>/song.mp3"
file = file.replace(" ", "%20")
playsound(file, True)
To resolve this install PyObjC
pip3 install -U PyObjC