iSEE
interface using speech recognitioniSEE 1.6.1
Compiled date: 2020-01-30
Last edited: 2018-11-29
License: MIT + file LICENSE
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 (Rue-Albrecht et al. 2018).
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.
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 earlier, enabling speech recognition is as simple as setting voice=TRUE
below:
library(iSEE)
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 http://127.0.0.1:1234
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.
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.
colData
column name) of the panel under vocal control.sessionInfo()
#> R version 3.6.2 (2019-12-12)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 18.04.3 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
#> LAPACK: /home/biocbuild/bbs-3.10-bioc/R/lib/libRlapack.so
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] parallel stats4 stats graphics grDevices utils datasets
#> [8] methods base
#>
#> other attached packages:
#> [1] scater_1.14.6 ggplot2_3.2.1
#> [3] scRNAseq_2.0.2 iSEE_1.6.1
#> [5] SingleCellExperiment_1.8.0 SummarizedExperiment_1.16.1
#> [7] DelayedArray_0.12.2 BiocParallel_1.20.1
#> [9] matrixStats_0.55.0 Biobase_2.46.0
#> [11] GenomicRanges_1.38.0 GenomeInfoDb_1.22.0
#> [13] IRanges_2.20.2 S4Vectors_0.24.3
#> [15] BiocGenerics_0.32.0 BiocStyle_2.14.4
#>
#> loaded via a namespace (and not attached):
#> [1] Rtsne_0.15 ggbeeswarm_0.6.0
#> [3] colorspace_1.4-1 XVector_0.26.0
#> [5] BiocNeighbors_1.4.1 DT_0.11
#> [7] bit64_0.9-7 interactiveDisplayBase_1.24.0
#> [9] AnnotationDbi_1.48.0 splines_3.6.2
#> [11] knitr_1.27.2 jsonlite_1.6
#> [13] dbplyr_1.4.2 shinydashboard_0.7.1
#> [15] shiny_1.4.0 BiocManager_1.30.10
#> [17] rentrez_1.2.2 compiler_3.6.2
#> [19] httr_1.4.1 assertthat_0.2.1
#> [21] Matrix_1.2-18 fastmap_1.0.1
#> [23] lazyeval_0.2.2 later_1.0.0
#> [25] BiocSingular_1.2.1 htmltools_0.4.0
#> [27] tools_3.6.2 rsvd_1.0.2
#> [29] igraph_1.2.4.2 gtable_0.3.0
#> [31] glue_1.3.1 GenomeInfoDbData_1.2.2
#> [33] reshape2_1.4.3 dplyr_0.8.3
#> [35] rappdirs_0.3.1 Rcpp_1.0.3
#> [37] vctrs_0.2.2 nlme_3.1-143
#> [39] ExperimentHub_1.12.0 rintrojs_0.2.2
#> [41] DelayedMatrixStats_1.8.0 xfun_0.12
#> [43] stringr_1.4.0 mime_0.8
#> [45] miniUI_0.1.1.1 lifecycle_0.1.0
#> [47] irlba_2.3.3 XML_3.99-0.3
#> [49] shinyAce_0.4.1 AnnotationHub_2.18.0
#> [51] zlibbioc_1.32.0 scales_1.1.0
#> [53] colourpicker_1.0 promises_1.1.0
#> [55] yaml_2.2.0 curl_4.3
#> [57] memoise_1.1.0 gridExtra_2.3
#> [59] stringi_1.4.5 RSQLite_2.2.0
#> [61] BiocVersion_3.10.1 rlang_0.4.4
#> [63] pkgconfig_2.0.3 bitops_1.0-6
#> [65] evaluate_0.14 lattice_0.20-38
#> [67] purrr_0.3.3 htmlwidgets_1.5.1
#> [69] cowplot_1.0.0 bit_1.1-15.1
#> [71] tidyselect_1.0.0 plyr_1.8.5
#> [73] magrittr_1.5 bookdown_0.17
#> [75] R6_2.4.1 DBI_1.1.0
#> [77] pillar_1.4.3 withr_2.1.2
#> [79] mgcv_1.8-31 RCurl_1.98-1.1
#> [81] tibble_2.1.3 crayon_1.3.4
#> [83] BiocFileCache_1.10.2 rmarkdown_2.1
#> [85] viridis_0.5.1 grid_3.6.2
#> [87] blob_1.2.1 digest_0.6.23
#> [89] xtable_1.8-4 httpuv_1.5.2
#> [91] munsell_0.5.0 beeswarm_0.2.3
#> [93] viridisLite_0.3.0 vipor_0.4.5
#> [95] shinyjs_1.1
# devtools::session_info()
Rue-Albrecht, K., F. Marini, C. Soneson, and A. T. L. Lun. 2018. “ISEE: Interactive Summarizedexperiment Explorer.” F1000Research 7 (June):741.