afplay
Command-line audio player. More information: https://ss64.com/osx/afplay.html.
-
Play a sound file (waits until playback ends):
afplay {{path/to/file}}
-
Play a sound file at 2x speed (playback rate):
afplay --rate {{2}} {{path/to/file}}
-
Play a sound file at half speed:
afplay --rate {{0.5}} {{path/to/file}}
-
Play the first N seconds of a sound file:
afplay --time {{seconds}} {{path/to/file}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.