by computronus · 6y ago · 0 comments
I use this after my long-running Maven builds to play either a happy sound if the build succeeds or a sad (mocking) sound if it fails, based on the value of $?.
On Linux there's usually `aplay` but you'll need play (sox) or mpv etc. to play lossy-compressed audio... a bunch of sounds can be found under /usr/share/sounds/ depending on what's installed.
`espeak-ng` doesn't have as good voices as `say`, but some `festival` ones come close, although these days I usually use Googles tts, and save the ones I use frequently.