How to play a sound or tone when a program ends?

‘wavplay’ from WAV · Julia Packages worked fine for me.

using WAV
y, fs = wavread("foo.wav")

Anywhere in your program where you want to play the sound in the file foo.wav, just add the line.

wavplay(y, fs)

Also you can try Beep.jl (GitHub - arubhardwaj/Beep.jl: Notify me, Julia! I cannot remember after executing the script!!).

1 Like