Python Language Audio Playing Windows' beeps

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


Windows provides an explicit interface through which the winsound module allows you to play raw beeps at a given frequency and duration.

import winsound
freq = 2500 # Set frequency To 2500 Hertz
dur = 1000 # Set duration To 1000 ms == 1 second
winsound.Beep(freq, dur)

Got any Python Language Question?