mscstts (version 0.6.2)

ms_create_ssml: Create SSML for Passing to Synthesize

Description

Create SSML for Passing to Synthesize

Usage

ms_create_ssml(
  script,
  voice = NULL,
  gender = c("Female", "Male"),
  language = "en-US",
  escape = FALSE
)

ms_voice_info(voice, token = NULL, api_key = NULL, region = NULL)

Arguments

script

A character vector of lines to be spoken

voice

full voice name, usually from ms_language_to_ms_name. Will override language and gender.

gender

Sex of the Speaker

language

Language to be spoken, must be from ms_language_codes

escape

Should non-standard characters be substituted? Should not be used if script has SSML tags

token

An authentication token, base-64 encoded usually from ms_get_tts_token. If not provided, will be created from ms_get_tts_token

api_key

Microsoft Cognitive Services API key, if token is not provided.

Value

A character string of the text and SSML markup

Examples

Run this code
# NOT RUN {
ms_create_ssml("hey I really like things & dogs", escape = TRUE)
ms_create_ssml("hey I really like things")
ms_create_ssml('hey I <emphasis level="strong">really like</emphasis> things')
ms_create_ssml('hey I <emphasis level="strong">really like</emphasis> things',
escape = TRUE)

# }

Run the code above in your browser using DataCamp Workspace