tts_voices {text2speech} | R Documentation |
Text-to-Speech (Speech Synthesis) Voices
Description
Various services offer a range of voice options:
Amazon Polly : https://docs.aws.amazon.com/polly/latest/dg/voicelist.html
Microsoft Cognitive Services Text to Speech REST API : https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=tts#voice-styles-and-roles
Google Cloud Text-to-Speech API : https://cloud.google.com/text-to-speech/docs/voices
Coqui TTS : https://huggingface.co/spaces/coqui/CoquiTTS
Usage
tts_voices(service = c("amazon", "google", "microsoft", "coqui"), ...)
tts_amazon_voices(...)
tts_microsoft_voices(region = "westus")
tts_google_voices(...)
tts_coqui_voices()
Arguments
service |
Service to use (Amazon, Google, Microsoft, or Coqui) |
... |
Additional arguments to service voice listings. |
region |
(Microsoft only) Region of your Microsoft Speech Service API Key |
Value
(Amazon, Microsoft, and Google) A standardized data.frame
featuring
the following columns:
-
voice
: Name of the voice -
language
: Spoken language -
language_code
: Abbreviation for the language of the speaker -
gender
: Male or female -
service
: The text-to-speech engine used
(Coqui TTS) A tibble
featuring the following columns:
-
language
: Spoken language -
dataset
: Dataset the deep learning model was trained on -
model_name
: Name of deep learning model -
service
: The text-to-speech engine used
Examples
# Amazon Polly
if (tts_auth(service = "amazon")) {
tts_voices(service = "amazon")
}
# Microsoft Cognitive Services Text to Speech REST API
if (tts_auth(service = "microsoft")) {
tts_voices(service = "microsoft")
}
# Google Cloud Text-to-Speech API
if (tts_auth(service = "google")) {
tts_voices(service = "google")
}
# Coqui TTS
if (tts_auth(service = "coqui")) {
tts_voices(service = "coqui")
}