from pygame import mixer#if this module in not installed then install it by pip install pygame mixer.init() mixer.music.load('alarm.mp3') mixer.music.play()