Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@
#' @importFrom stats setNames
NULL

.onAttach <- function(libname, pkgname) {
if (!torch::torch_is_installed()) {
packageStartupMessage(
"torch backend (Lantern) is not installed.\n",
"Run torch::install_torch() to complete setup."
)
}
}

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ Native R torch implementation of OpenAI Whisper for speech-to-text transcription

```r
install.packages("whisper")
torch::install_torch() # one-time: downloads the C++ backend
```

Or install the development version from GitHub:

```r
remotes::install_github("cornball-ai/whisper")
torch::install_torch()
```

`{whisper}` uses `{torch}` for inference. After installing the R package, `install_torch()` downloads the compiled C++ libraries (Lantern). You only need to run it once.

**littler/r2u users:** If `install_torch()` fails with a permissions error, torch was installed to the system library. Use sudo for the one-time Lantern download:

```bash
sudo r -e 'torch::install_torch()'
```

## Quick Start
Expand Down