The talk package analyses audio recordings of speech using HuggingFace transformer models. It runs in R, with a Python backend that is installed and managed automatically in a conda environment.
OS-specific instructions
-
In R, install talk:
# install.packages("devtools") devtools::install_github("theharmonylab/talk") -
Install and activate the Python backend:
library(talk) talkrpp_install() talkrpp_initialize(save_profile = TRUE)
Install R and RStudio. On Apple Silicon (M1–M4), make sure to install the arm64 build of R.
-
In R, install talk:
# install.packages("devtools") devtools::install_github("theharmonylab/talk") -
Install and activate the Python backend:
library(talk) talkrpp_install() talkrpp_initialize(save_profile = TRUE)
-
Install the development libraries needed to build talk’s R dependencies from source (Ubuntu/Debian):
sudo apt-get update sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev -
In R, install talk:
# install.packages("devtools") devtools::install_github("theharmonylab/talk") -
Install and activate the Python backend:
library(talk) talkrpp_install() talkrpp_initialize(save_profile = TRUE)
See which Python environments exist:
talk::list_talkrpp_envs().“Python already initialized” error: restart R, then call
talkrpp_initialize()before any other Python-using code.ffmpeg: no action is needed — talk finds a system ffmpeg automatically (also in locations missing from RStudio’s PATH, such as
/opt/homebrew/bin) and otherwise uses the static ffmpeg installed bytalkrpp_install(). If you prefer a system-wide ffmpeg, install it with your system’s package manager (brew install ffmpegon macOS,sudo apt-get install -y ffmpegon Ubuntu/Debian,choco install ffmpegon Windows) — but do not install ffmpeg with conda, whose ffmpeg breaks torchaudio’s audio loading. If ffmpeg still cannot be found, re-runtalkrpp_install().-
Reinstall the environment from scratch:
talkrpp_uninstall(envname = "talkrpp_condaenv") talkrpp_install() -
Old or duplicated conda installations (typical symptoms:
No module named 'whisnemo';EnvironmentNameNotFoundduringtalkrpp_install();No matching distribution found for torch==2.11.0;talkrpp_uninstall()failing to find the environment). Atalkrpp_condaenvcreated by an older talk version may use an old Python (3.9) and may live in a different conda installation (e.g. a personal~/miniconda3) than the one talk now uses (reticulate’s miniconda). The fix is to remove the old environment with the conda installation that owns it, then reinstall:# in a terminal -- adjust the path to the conda that owns the old env ~/miniconda3/bin/conda env remove -n talkrpp_condaenv -y# then, in R talkrpp_install()talk::list_talkrpp_envs()shows which environments exist; the registrations in~/.conda/environments.txtshow which conda installation each environment belongs to. Apple Silicon (MPS): on real Apple hardware talk uses the MPS GPU automatically where it is reliable; in virtualized macOS (e.g. CI runners) it falls back to CPU.
If problems persist, please look through the closed GitHub issues or open a new issue.
Using talk and text together
The environment installed by talkrpp_install() also includes the Python packages used by the text package, so both packages can be used in the same R session. To point text at it (once):
text::textrpp_initialize(condaenv = "talkrpp_condaenv", save_profile = TRUE)After this, all talk and text functions use the shared environment automatically. (If you prefer a leaner, talk-only environment, install with talkrpp_install(include_text = FALSE).)
Try talk in the browser
💡 Want to try talk without installing anything? Open our Google Colab notebook and run talk directly in your browser.

