The slides_to_leanpub
Shiny application is to enable users to provide
a link to a folder Google Slides presentation and create a Leanpub
course. The overlaid text is extracted as text from the speaker notes of
the Google Slides documents.
The video is generated by the slides with overlaid audio. This text is
generated as audio using a Text-to-Speech service. Currently,
presentation_to_video
only works with the Google Text-to-Speech API
(https://cloud.google.com/text-to-speech/).
You should be able to run the app using:
shiny::runApp()
if you have the app downloaded (after adding your authentication described below) or
shiny::runGitHub("muschellij2/slides_to_leanpub")
but that will not have the authentication needed to run the app.
To set up the application, you need to authorize the Text-to-Speech API (https://cloud.google.com/text-to-speech/). Authorization uses the googleLanguageR package.
Please go to https://github.com/ropensci/googleLanguageR#installation
and follow the steps there. You need to create a project, enable the
text-to-speech API, then get a service account credential as a JSON
file. Name this JSON file, google_authorization.json
and put in the
directory of the application. # Choosing Your Voice
The text2speech
package
is used for the audio generation. In order to determine what voices are
available, you can run text2speech::tts_voices(service)
, where
service
For example:
voices = text2speech::tts_voices(service = "google")
voices = voices[ voices$language == "English (US)", ]
voices
#> voice language language_code gender service
#> NA <NA> <NA> <NA> <NA> <NA>
#> NA.1 <NA> <NA> <NA> <NA> <NA>
#> NA.2 <NA> <NA> <NA> <NA> <NA>
#> NA.3 <NA> <NA> <NA> <NA> <NA>
#> NA.4 <NA> <NA> <NA> <NA> <NA>
#> NA.5 <NA> <NA> <NA> <NA> <NA>
#> NA.6 <NA> <NA> <NA> <NA> <NA>
#> NA.7 <NA> <NA> <NA> <NA> <NA>
#> NA.8 <NA> <NA> <NA> <NA> <NA>
#> NA.9 <NA> <NA> <NA> <NA> <NA>
#> NA.10 <NA> <NA> <NA> <NA> <NA>
#> NA.11 <NA> <NA> <NA> <NA> <NA>
#> NA.12 <NA> <NA> <NA> <NA> <NA>
#> NA.13 <NA> <NA> <NA> <NA> <NA>
#> 60 en-US-Wavenet-F English (US) en-US FEMALE google
#> 61 en-US-Wavenet-B English (US) en-US MALE google
#> 62 en-US-Standard-C English (US) en-US FEMALE google
#> 63 en-US-Wavenet-A English (US) en-US MALE google
#> 64 en-US-Wavenet-D English (US) en-US MALE google
#> 65 en-US-Wavenet-C English (US) en-US FEMALE google
#> 66 en-US-Standard-D English (US) en-US MALE google
#> 67 en-US-Wavenet-E English (US) en-US FEMALE google
#> 68 en-US-Standard-E English (US) en-US FEMALE google
#> 69 en-US-Standard-B English (US) en-US MALE google
For Google, there are standard or
WaveNet
(a
neural network) voices. The WaveNet voices tend to sound more natural,
but are more expensive to render. You can hear the voices at
https://cloud.google.com/text-to-speech/docs/voices.
Here is are any versions of packages used for the app that may not be from CRAN:
package | ondiskversion | loadedversion | path | loadedpath | attached | is_base | date | source | md5ok | library | |
---|---|---|---|---|---|---|---|---|---|---|---|
ari | ari | 0.3.3 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/ari | NA | FALSE | FALSE | 2020-01-22 | Github (muschellij2/ari@099a315) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
ariExtra | ariExtra | 0.2.4 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/ariExtra | NA | FALSE | FALSE | 2019-09-16 | local | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
docxtractr | docxtractr | 0.6.2 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/docxtractr | NA | FALSE | FALSE | 2019-08-07 | Github (hrbrmstr/docxtractr@7cb823d) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
googleLanguageR | googleLanguageR | 0.2.0.9002 | 0.2.0.9002 | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/googleLanguageR | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/googleLanguageR | TRUE | FALSE | 2020-01-22 | Github (muschellij2/googleLanguageR@1f6028b) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
knitr | knitr | 1.26.1 | 1.26.1 | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/knitr | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/knitr | FALSE | FALSE | 2020-01-05 | Github (muschellij2/knitr@f5af631) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
later | later | 1.0.0.9002 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/later | NA | FALSE | FALSE | 2020-01-17 | Github (r-lib/later@077245d) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
mscstts | mscstts | 0.5.2 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/mscstts | NA | FALSE | FALSE | 2019-08-06 | Github (muschellij2/mscstts@226bfef) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
promises | promises | 1.1.0.9000 | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/promises | NA | FALSE | FALSE | 2020-01-17 | Github (rstudio/promises@627dfc6) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
rmarkdown | rmarkdown | 2.0.7 | 2.0.7 | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown | FALSE | FALSE | 2020-01-17 | Github (rstudio/rmarkdown@2faf16a) | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |
text2speech | text2speech | 0.2.10 | 0.2.10 | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/text2speech | /Library/Frameworks/R.framework/Versions/3.6/Resources/library/text2speech | FALSE | FALSE | 2020-01-31 | local | NA | /Library/Frameworks/R.framework/Versions/3.6/Resources/library |