You can synthesize sound effects with synth and -n . For example, the following command creates a 3 second sine wav at 500 Hz:
sox -n -r 8000 output.wav synth 3 sine 500
You can set the sampling rate using the -r option. The default value is 48 kHz.
You can play audio directly in / dev / audio. If you just need to play the file and not save it, you can use the play utility (provided by sox) as follows:
play -n -c1 synth 3 sine 500
lCapp source share