I was wondering how to make a sound play repeatedly in python. I'm making a simple alarm clock program, and at a certain time (6:30 for example) it will play a recorded sound over and over again until the user presses enter. I think I have that figured out, but I can't find anything useful for making the sound play.

Recommended Answers

All 2 Replies

you can try os.startfile to start any sound file

or if you're making a gui app you can try
wx.Sound or wx.SoundFromData to play a .wav file

See "Playing & creating sound" here. I have on use Snack so can't really comment on any of them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.