Home Forums OS X Server and Client Discussion Misc. Play audio file hidden from user via command line

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #371308
    patrickslc
    Participant

    Hello,

    We have several instances in which it would be most helpful to be able to cause client Mac stations to play a specific audio alert, such as during fire drills, etc. Best if controlled from a remote station sending out scheduled commands via SSH.

    For example, linux has a built-in “play” command that does this very thing. Is there such a command or script to do this in Mac OS X?

    Thank you for your help,
    Patrick

    #371320
    khiltd
    Participant

    You can make the machine talk via the “say” command, but if you want to play an arbitrary sound file on command you’ll more than likely have to grab the AppleScript extension that adds this functionality to the language and invoke it via osascript.

    Either way I wouldn’t advise relying upon a computer’s speaker for fire alarms.

    #371343
    patrickslc
    Participant

    [QUOTE][u]Quote by: khiltd[/u][p]You can make the machine talk via the “say” command, but if you want to play an arbitrary sound file on command you’ll more than likely have to grab the AppleScript extension that adds this functionality to the language and invoke it via osascript.

    Either way I wouldn’t advise relying upon a computer’s speaker for fire alarms. [/p][/QUOTE]

    Thank you for your suggestion of the “say” command, khiltd. Is the AppleScript extension you mention somewhere on afp548.com?

    And of course we have good old fashioned fire alarms in the hallways but some back offices like mine are too far away from the hallways to hear the alarms. This summer they’re going to install new sirens in every room. Currently our phone system also broadcasts an alert through their speakers during a fire alarm. We thought adding one more alert source would have our bases covered.

    #373706
    sglasgow
    Participant

    Use afplay

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Comments are closed