python make sound when finished 1

python make sound when finished

import winsound
duration = 1000  # milliseconds
freq = 440  # Hz
winsound.Beep(freq, duration)

Here is what the above code is Doing:
1. Import the winsound module.
2. Set the duration and frequency of the sound.
3. Play the sound.

Similar Posts