Reputation: 919
I want windows (possibly cross-platform) solution to play simple tone of certain frequency and length on speakers. Here
it is suggested to use winsound
, but this solution only creates PC speaker sound. Is there any way to create sound on real speakers?
Upvotes: 1
Views: 2751
Reputation: 2131
You can use winsound
to play
A single-frequency beep:
winsound.Beep(2000,500) # Hz, milliseconds
An external sound:
winsound.PlaySound('./sounds_folder/my_sound.wav', winsound.SND_FILENAME)
Upvotes: 2