import os from random import seed from random import random seed(a=None) def rnd(): return 200 + (random() * (2100 - 200)) duration = 0.5 freq = rnd() os.system('play -nq -t alsa synth {} sine {}'.format(duration, freq))
Used like this:
mycommand && python3 sound.py
[0] - https://manpages.debian.org/jessie/sox/play.1.en.html
Used like this:
--[0] - https://manpages.debian.org/jessie/sox/play.1.en.html