afplay

From RaySoft

Audio File Play plays an audio file to the default audio output.[1]

Documentation

Syntax

afplay [PARAMETER ...] FILE

Parameters

-t TIME, --time TIME
Play for TIME seconds.
-v VOLUME, --volume VOLUME
Set the VOLUME for playback of the file.

Example

Set the speaker's volume & play music
osascript <<-EOS
	set volume without output muted
	set volume output volume 100
EOS

afplay --volume 1 "${HOME}/Music/Shakra/Infected/03 The One.m4a"
NOTE:
You never know - I'm An Idiot @ xkcd

References

  1. man 1 'afplay'