To reproduce the distortion, create a script and run it in its entirety, not line by line in a terminal. Run on Python 3.7 on Windows 10 64 bit with driver 0.2.1.6.
import winsound
import time
alert_time = 250
winsound.Beep(1500, alert_time)
time.sleep(alert_time / 1000)
winsound.Beep(1750, alert_time)
time.sleep(alert_time / 1000)
# this audio is badly distorted:
winsound.Beep(2000, alert_time)