Thursday 11 February 2016

Play sound on mac terminal

Play sound on mac terminal

If you have a script that runs in the background and sends me an alert every few minutes and you want the alert to be in the form of a sound. 

How I can play a sound in mac terminal?

printf \\ a and -e beep osascript play the default alert sound, but are silent if the volume of the alert is set to zero. \\ a printf is also silent if an audible ring is disabled. You could also use afplay or say:

afplay /System/Library/Sounds/Funk.aiff
say done
More than one sound effect files in / System / Library / PrivateFrameworks / DVD pantalla.framework / Versions / A / Resources / Sounds /.
Note:
The easiest way is to use a fume echo -e "\ a"

0 comments:

Post a Comment