Description Usage Arguments Value Examples
Pass text to the synthesis API and return an audio file
1 2 3 4 5 6 7 8 9 10 11 |
text |
Either a plain text character string (maximum 1500 characters) or a character string containing SSML ( |
voice |
A character string specifying the name of an AWS Polly voice. See |
format |
A character string specifying an output file format. |
rate |
An integer value specifying the audio frequency in Hertz. |
lexicon |
Optionally, a character vector (max length 5) specifying the names of lexicons to apply during synthesis. See |
ssml |
A logical indicating whether |
... |
Additional arguments passed to |
get_synthesis
returns a raw vector (i.e., the bytes representing the audio as the requested file format). synthesize
is a convenience wrapper around that, which returns an object of class “Wave” (see Wave
).
1 2 3 4 5 6 7 | ## Not run:
hello <- synthesize("hello world!", voice = "Geraint")
if (interactive() & require("tuneR")) {
try(play(hello))
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.