from audioplayer import AudioPlayer # Playback stops when the object is destroyed (GC'ed), so save a reference to the object for non-blocking playback. AudioPlayer("path/to/somemusic.mp3").play(block=True)