Skip to content

Commit

Permalink
Merge pull request #21 from seankross/dev
Browse files Browse the repository at this point in the history
Ari 0.3.5
  • Loading branch information
seankross authored Feb 8, 2020
2 parents d36afaa + 239bd88 commit fcd0ac1
Show file tree
Hide file tree
Showing 37 changed files with 1,240 additions and 1,099 deletions.
8 changes: 3 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ari
Type: Package
Title: Automated R Instructor
Version: 0.3.3
Version: 0.3.5
Authors@R: c(
person("Sean", "Kross", email = "sean@seankross.com", role = c("aut", "cre")),
person("John", "Muschelli", role = "ctb")
Expand All @@ -16,7 +16,7 @@ SystemRequirements: ffmpeg (>= 3.2.4)
Depends:
R (>= 3.1.0)
Imports:
text2speech (>= 0.2.4),
text2speech (>= 0.2.8),
tuneR,
webshot,
purrr,
Expand All @@ -30,13 +30,11 @@ Suggests:
testthat,
grDevices,
xaringan,
aws.signature,
aws.polly,
knitr
License: MIT + file LICENSE
URL: http://github.com/seankross/ari
BugReports: http://github.com/seankross/ari/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
VignetteBuilder: knitr
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ importFrom(rvest,html_nodes)
importFrom(rvest,html_text)
importFrom(text2speech,tts)
importFrom(text2speech,tts_auth)
importFrom(text2speech,tts_default_voice)
importFrom(tools,file_ext)
importFrom(tools,file_path_sans_ext)
importFrom(tuneR,Wave)
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ari 0.3.5

- Removed `have_polly()`.

# ari 0.3.4

- Removed strict dependency on aws.polly and associated Cloudyr projects because
they have been orphaned.

# ari 0.3.3

- Added vignette for using via a Docker image.
Expand Down
5 changes: 3 additions & 2 deletions R/ari_narrate.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#' \code{\link[text2speech]{tts_voices}} for more information
#' about what voices are available.
#' @param service speech synthesis service to use,
#' passed to \code{\link[text2speech]{tts}}.
#' passed to \code{\link[text2speech]{tts}}.
#' Either \code{"amazon"} or \code{"google"}.
#' @param capture_method Either \code{"vectorized"} or \code{"iterative"}.
#' The vectorized mode is faster though it can cause screens to repeat. If
#' making a video from an \code{\link[rmarkdown]{ioslides_presentation}}
Expand Down Expand Up @@ -52,7 +53,7 @@
#' }
ari_narrate <- function(script, slides,
output = tempfile(fileext = ".mp4"),
voice = "Joanna",
voice = text2speech::tts_default_voice(service = service),
service = "amazon",
capture_method = c("vectorized", "iterative"),
subtitles = FALSE, ...,
Expand Down
14 changes: 7 additions & 7 deletions R/ari_spin.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#' Create a video from images and text
#'
#' Given equal length vectors of paths to images (preferably \code{.jpg}s
#' or \code{.png}s) and strings which will be
#' \code{\link[aws.polly]{synthesize}}d by
#' or \code{.png}s) and strings which will be synthesized by
#' \href{https://aws.amazon.com/polly/}{Amazon Polly} or
#' any other synthesizer available in
#' \code{\link[text2speech]{tts}}, this function creates an
Expand All @@ -15,7 +14,7 @@
#' narration. You can find a guide for accessing AWS from R
#' \href{http://seankross.com/2017/05/02/Access-Amazon-Web-Services-in-R.html}{here}.
#' For more information about how R connects
#' to Amazon Polly see the \code{\link[aws.polly]{aws.polly}} documentation
#' to Amazon Polly see the \code{aws.polly]} documentation
#' \href{https://github.com/cloudyr/aws.polly}{here}.
#'
#' @param images A vector of paths to images.
Expand All @@ -25,7 +24,8 @@
#' \code{\link[text2speech]{tts_voices}} for more information
#' about what voices are available.
#' @param service speech synthesis service to use,
#' passed to \code{\link[text2speech]{tts}}
#' passed to \code{\link[text2speech]{tts}}.
#' Either \code{"amazon"} or \code{"google"}.
#' @param subtitles Should a \code{.srt} file be created with subtitles? The
#' default value is \code{FALSE}. If \code{TRUE} then a file with the same name
#' as the \code{output} argument will be created, but with the file extension
Expand All @@ -34,7 +34,7 @@
#'
#' @return The output from \code{\link{ari_stitch}}
#'
#' @importFrom text2speech tts_auth tts
#' @importFrom text2speech tts_auth tts tts_default_voice
#' @importFrom tuneR bind Wave
#' @importFrom purrr map reduce
#' @importFrom progress progress_bar
Expand All @@ -54,7 +54,7 @@
ari_spin <- function(
images, paragraphs,
output = tempfile(fileext = ".mp4"),
voice = "Joanna",
voice = text2speech::tts_default_voice(service = service),
service = "amazon",
subtitles = FALSE,
...){
Expand Down Expand Up @@ -135,4 +135,4 @@ ari_spin <- function(
attr(res, "voice") = voice
attr(res, "service") = service
return(res)
}
}
4 changes: 2 additions & 2 deletions R/ari_talk.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' about what voices are available.
#' @param service speech synthesis service to use,
#' passed to \code{\link[text2speech]{tts}}
#'
#' Either \code{"amazon"} or \code{"google"}.
#' @return A \code{Wave} output object, with the attribute \code{outfile}
#' of the output file name.
#' @importFrom text2speech tts_auth tts
Expand All @@ -17,7 +17,7 @@
#' @export
ari_talk <- function(paragraphs,
output = tempfile(fileext = ".wav"),
voice = "Joanna",
voice = text2speech::tts_default_voice(service = service),
service = "amazon") {
auth = text2speech::tts_auth(service = service)
if (!auth) {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ 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`](https://github.com/cloudyr/aws.polly) package. You can find a
guide for quickly setting up R to use Amazon Web Services
Once you have 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](http://seankross.com/2017/05/02/Access-Amazon-Web-Services-in-R.html).
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
Expand Down
4 changes: 3 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@

## R CMD check results

0 errors | 0 warnings | 0 notes
0 errors | 0 warnings | 1 note

* New submission, Package was archived on CRAN
150 changes: 150 additions & 0 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fcd0ac1

Please sign in to comment.