Is there a way to write for example every 2 seconds a sound in a (e.g. .mp3 or .wav) file in python? For example if I have a loop like this
x=0
while x<10:
#write sound.wav into an audio file (file.mp3)
time.sleep(2)
x=x+1
So as a result I want to have an audio file where you hear a sound every 2 seconds (and that for example 10 times)
Thanks in advance