mscstts v0.2.2

0

Monthly downloads

0th

Percentile

R Client for the Microsoft Cognitive Services 'Text-to-Speech' REST API

R Client for the Microsoft Cognitive Services 'Text-to-Speech' REST API, including voice synthesis. A valid account must be registered at the Microsoft Cognitive Services website <https://www.microsoft.com/cognitive-services/> in order to obtain a (free) API key. Without an API key, this package will not work properly.

Readme

Travis build
status AppVeyor Build
Status Coverage
status

mscstts Package:

The goal of mscstts is to provide an R Client for the Microsoft Cognitive Services Text to Speech REST API, including voice synthesis. A valid account MUST be registered at the Microsoft Cognitive Services website https://www.microsoft.com/cognitive-services/ in order to obtain a (free) API key. Without an API key, this package will not work properly.

See the documentation here: https://docs.microsoft.com/en-us/azure/cognitive-services/speech/home

You can get a TTS API key here: https://azure.microsoft.com/en-us/try/cognitive-services/. The API you need to get one from is Bing Speech.

Installation

You can install mscstts from GitHub with:

# install.packages("remotes")
remotes::install_github("muschellij2/mscstts")

Example

library(mscstts)
if (have_ms_tts_key()) {
  res = ms_synthesize(
    script = "hey, how are you doing? I'm doing pretty good",
    output_format = "audio-16khz-128kbitrate-mono-mp3")
  tmp <- "example.mp3"
  writeBin(res$content, con = tmp)
  mp3 = tuneR::readMP3(tmp)
}
testthat::expect_true(file.size(tmp) > 50000)
if (interactive()) {
  tuner::play(mp3, player = "play")
}

Functions in mscstts

Name Description
get_ms_tts_key Find API Key for Microsoft Text To Speech (TTS) or Cognitive Services
ms_locales Locales for Microsoft Translate
get_ms_tts_token Get Microsoft Text To Speech (TTS) or Cognitive Services Token from API Key
print.token Print method for token
ms_synthesize Get Microsoft Text To Speech (TTS) or Cognitive Services Token from API Key
No Results!

Last month downloads

Details

License GPL-3
Encoding UTF-8
LazyData true
Type Package
URL https://github.com/muschellij2/mscstts
BugReports https://github.com/muschellij2/mscstts/issues
RoxygenNote 6.0.1
NeedsCompilation no
Packaged 2018-07-02 15:16:22 UTC; johnmuschelli
Repository CRAN
Date/Publication 2018-07-05 09:20:10 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/mscstts)](http://www.rdocumentation.org/packages/mscstts)