Skip to content
👯 The Automated R Instructor
Branch: master
Clone or download
Latest commit ce75771 Aug 31, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
R updated travis and tests Aug 30, 2017
.Rbuildignore on CRAN 🎉 Aug 31, 2017
.gitignore first commit Apr 6, 2017
.travis.yml updated travis and tests Aug 30, 2017
DESCRIPTION on CRAN 🎉 Aug 31, 2017
LICENSE added ari_narrate Apr 7, 2017
NAMESPACE on CRAN 🎉 Aug 31, 2017
ari.Rproj first commit Apr 6, 2017 on CRAN 🎉 Aug 31, 2017


Travis-CI Build Status CRAN version Downloads

The Automated R Instructor

Ari is an R package designed to help you make videos from plain text files. Ari uses Amazon Polly to convert your text into speech. You can then provide images or a set of HTML slides which Ari will narrate based on a script you provide. Ari uses FFmpeg to stitch together audio and images.



You can also install the development version of Ari from GitHub with:

# install.packages("devtools")

You also need to make sure you have FFmpeg version 3.2.4 or higher installed on your system.

Getting Started

First create an HTML slide presentation based in R Markdown using a package like rmarkdown or xaringan. To see an example presentation enter browseURL(ari_example("ari_intro.html")) into the R console. For every slide in the package you should write some text that will be read while the slide is being shown. You can do this in a separate Markdown file (see""))) or you can use HTML comments to put narration right in your .Rmd file (see"ari_comments.Rmd"))). Make sure to knit your .Rmd file into the HTML slides you want to be turned into a video.

Once you've finished your script and slides install the aws.polly package. You can find a guide for quickly setting up R to use Amazon Web Services here. Run aws.polly::list_voices() to make sure your keys are working (this function should return a data frame). Once you've set up your access keys you can start using Ari.


These examples make use of the ari_example() function. In order to view the files mentioned here you should use"[file name]")). You can watch an example of a video produced by Ari here.


# First set up your AWS keys
           "AWS_SECRET_ACCESS_KEY" = "OSnwITbMzcAwvHfYDEmk10khb3g82j04Wj8Va4AA",
           "AWS_DEFAULT_REGION" = "us-east-2")

# Create a video from a Markdown file and slides
  voice = "Joey")

# Create a video from an R Markdown file with comments and slides
  voice = "Kendra")

# Create a video from images and strings
  ari_example(c("mab1.png", "mab2.png")),
  c("This is a graph.", "This is another graph"),
  voice = "Joanna")

# Create a video from images and Waves
  ari_example(c("mab1.png", "mab2.png")),
  list(noise(), noise()))

Why Use Ari?

Creating videos from plain text has some significant advantages:

  1. Video content can be version controlled with Git and GitHub - after all it's just plain text!
  2. Videos with explicit narration are more accessible to students. We don't have to rely on YouTube's often faulty captioning algorithm.
  3. Scripts can be automatically translated into other languages with services like the Google Translation API and Amazon Polly can speak languages other than English. This means you can write a lecture once and generate slides and videos in multiple languages.

At the Johns Hopkins Data Science Lab we rapidly develop highly technical content about the latest libraries and technologies available to data scientists. Video production requires a significant time investment and APIs are always changing. If the interface to a software library changes it's particularly arduous to re-record an entire lecture because some function arguments changed. By using Ari we hope to be able to rapidly create and update video content.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.