snippetbashTip
afplay — Command-line audio player. More information: <https://keith.github.io/xcode-man-pages/afplay.1.html>
Viewed 0 times
commandafplaycliaudioplayermoreline
macos
Problem
How to use the
afplay command: Command-line audio player. More information: <https://keith.github.io/xcode-man-pages/afplay.1.html>.Solution
afplay — Command-line audio player. More information: <https://keith.github.io/xcode-man-pages/afplay.1.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 {{n}} {{path/to/file}}Code Snippets
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 {{n}} {{path/to/file}}Context
tldr-pages: osx/afplay
Revisions (0)
No revisions yet.