openac provides R wrappers around external, open-source affective-computing tools — ffmpeg/ffprobe, OpenFace, openSMILE, and Whisper (via audio.whisper) — so researchers can run them from a single, consistent R interface. It covers tool discovery, installation, and configuration; audio/video preparation; single-file and batch extraction (with parallelism and progress); and reading each tool’s output into a tidy tibble.
You can install the development version of openac from GitHub with:
# install.packages("pak")
pak::pak("jmgirard/openac")openac calls external command-line tools; install and register the ones
you need (e.g. install_opensmile_mac() / install_opensmile_win(), or
point openac at an existing install with set_opensmile()).
Extract acoustic features from a folder of audio files in parallel, then read one result into a tidy tibble:
library(openac)
# Extract eGeMAPS features from every .wav under audio/ into features/.
os_extract_dir(
indir = "audio",
inext = "wav",
aggdir = "features",
config = "egemaps/v02/eGeMAPSv02"
)
# Read one aggregate output into a one-row-per-file tidy tibble.
feats <- os_read("features/clip01_agg.csv")openac and tidymedia both wrap ffmpeg/ffprobe, and both export these eight names:
ffm, ffmpeg, ffprobe, find_ffmpeg, find_ffprobe, set_ffmpeg,
set_ffprobe, set_program
Attaching both packages masks one set with the other, decided by attach order, with no warning beyond R’s masking message. Six of the eight behave differently between the packages, so a masked call can succeed and do the wrong thing:
ffmis the sharpest. In openac it is an alias forffmpeg()and returns the tool’s output. In tidymedia it constructs a command object and runs nothing.- The
find_*andset_*pairs read and write different configuration directories. A tool location recorded withopenac::set_ffmpeg()is invisible totidymedia::find_ffmpeg(), and the reverse. Register each tool in each package you use it from. set_program()accepts different program names in each package.
If you need both, qualify the calls — openac::ffmpeg(),
tidymedia::ffm() — rather than relying on attach order. (Observed
against tidymedia at commit b99f7e8, 2026-08-08; the two name sets are
compared in full in cairn/references/tidymedia-fit.md in this
repository.)
Please note that the openac project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.