tts_default_voice("amazon")
tts_default_voice("google")
tts_default_voice("microsoft")
if (FALSE) {
text='
He was caught up in the game. In the middle of the
10/3/2014 W3C meeting,
he shouted, "Nice job!" quite loudly. When his boss stared at him, he repeated
"Nice job," in a
whisper.
'
}
if (requireNamespace("stringi", quietly = TRUE)) {
set.seed(1)
text = stringi::stri_rand_lipsum(10)
text[3] = paste0(text[3:length(text)], collapse = " " )
text = text[c(1,3)]
nchar(text)
if (tts_auth("google")) {
res = tts(text, service = "google", bind_audio = FALSE)
testthat::expect_equal(nrow(res), length(text) + 1)
bound = tts_bind_wav(res)
testthat::expect_equal(nrow(bound), length(text))
}
}
Run the code above in your browser using DataLab