ms_create_ssml: Create SSML for Passing to Synthesize

View source: R/create_ssml.R

ms_create_ssmlR Documentation

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.

region

Subscription region for your key. See https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/overview

Value

A character string of the text and SSML markup

Examples

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)


mscstts documentation built on June 10, 2022, 5:11 p.m.