Giter Site home page Giter Site logo

ari's Introduction

ari

Travis-CI Build Status

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.

Installation

You can install ari from github with:

# install.packages("devtools")
devtools::install_github("seankross/ari")

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 file.show(ari_example("ari_intro_script.md"))) or you can use HTML comments to put narration right in your .Rmd file (see file.show(ari_example("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.

Examples

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

library(ari)

# First set up your AWS keys
Sys.setenv("AWS_ACCESS_KEY_ID" = "EA6TDV7ASDE9TL2WI6RJ",
           "AWS_SECRET_ACCESS_KEY" = "OSnwITbMzcAwvHfYDEmk10khb3g82j04Wj8Va4AA",
           "AWS_DEFAULT_REGION" = "us-east-2")
           
# Create a video from a Markdown file and slides
ari_narrate(
  ari_example("ari_intro_script.md"), 
  ari_example("ari_intro.html"),
  voice = "Joey")
  
# Create a video from an R Markdown file with comments and slides
ari_narrate(
  ari_example("ari_comments.Rmd"), 
  ari_example("ari_intro.html"),
  voice = "Kendra")
  
# Create a video from images and strings
ari_spin(
  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
library(tuneR)
ari_stitch(
  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.

ari's People

Contributors

seankross avatar

Watchers

James Cloos avatar Bradley avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.