Controlling the `iSEE` interface using speech recognition

Compiled date: r Sys.Date()

Last edited: 2018-11-29

License: r packageDescription("iSEE")[["License"]]

    collapse = TRUE,
    comment = "#>",
    error = FALSE,
    warning = FALSE,
    message = FALSE,
    crop = NULL
sce <- readRDS('sce.rds')


Using JavaScript, iSEE applications can leverage lightweight speech recognition libraries that react to specific vocal commands (think "OK Google", "Hey Siri") and trigger updates of the UI equivalent to one or more mouse or keyboard interaction with the UI components [@kra2018iSEE].

Note: As we value privacy, this feature is disabled by default: iSEE(..., voice=FALSE).

To keep the spoken commands reasonably short, only one panel may be under voice command at any one time. All spoken commands will affect the currently active panel, until a new panel is selected for voice command. See section Vocal commands available.


We use the annyang lightweight JavaScript library to handle speech recongnition and update Shiny reactive values in the same way as mouse and keyboard UI elements trigger panel updates.

Note that annyang requires an active internet connection, as it relies on the browser's own speech recognition engine (see the annyang FAQ). For instance, in Google Chrome, this engine performs the recognition in the cloud.

Supported web browsers

Note that the speech recognition library that we use does not work with every web browser. We currently only validated this feature in Google Chrome. Please refer to the annyang FAQ for details.


Using the sce object that we generated r Biocpkg("iSEE", vignette="basic.html", label="earlier"), enabling speech recognition is as simple as setting voice=TRUE below:

app <- iSEE(sce, voice=TRUE)

With voice=TRUE, the lightweight JavaScript speech recognition library annyang is loaded and activated in any web browser tab that runs app.

If your default browser is not compatible with the feature, or if you work in RStudio, you can prevent the application from opening in the default browser by setting launch.browser=FALSE as follows:

if (interactive()) {
    shiny::runApp(app, port=1234, launch.browser=FALSE)

At that point, your R console should be displaying the address and port where app is running. In the example above, that would be:

Listening on

Using a compatible browser, navigate to the indicated address and port. Note that when the web page opens, you may be prompted to allow the web browser to use your microphone, which you must accept to enable the functionality.

Vocal commands available {#availableVocalCommands}

As a proof of concept, only a subset of spoken commands are currently implemented, compared to the full range of interactions possible using the mouse and keyboard.

Note that in the commands below, words in brackets are optional.

Session Info {.unnumbered}

# devtools::session_info()

References {.unnumbered}

Try the iSEE package in your browser

Any scripts or data that you put into this service are public.

iSEE documentation built on Feb. 3, 2021, 2:01 a.m.