How would I play/stop audio in python?
I know that you can use from replit import audio
, but is there something in there that can make an audio file stop playing?
For example:
from replit import audio from time import sleep audio.play_file('beeping_noise.wav') # plays a sound sleep(2) # waits 2 seconds # something here that stops the noise audio.play_file('beeping_noise_2.wav') # plays another sound
Voters
You can store the
Source
which is played, then pause that withset_paused
:More information in the documentation.
@19wintersp Yay, thanks!