ms_get_tts_key: Find API Key for Microsoft Text To Speech (TTS) or Cognitive...

Description Usage Arguments Value Note Examples

View source: R/ms_tts_auth.R

Description

Determines if option(ms_tts_key) or option(ms_tts_key) is set. If not, it stops and returns an error. If so, returns the value.

Usage

1
2
3
4
5
6
7
ms_get_tts_key(api_key = NULL, error = TRUE)

ms_have_tts_key(api_key = NULL)

ms_set_tts_key(api_key)

ms_valid_tts_key(api_key = NULL, region = ms_regions())

Arguments

api_key

Microsoft Cognitive Services API key

error

Should the function error if api_key = NULL?

region

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

Value

API key

Note

You can either set the API key using option(ms_tts_key) or have it accessible by api_key = Sys.getenv('MS_TTS_API_KEY")}, or \code{api_key = Sys.getenv('MS_TTS_API_KEY1")}, or \code{api_key = Sys.getenv('MS_TTS_API_KEY2")

Examples

1
res = ms_get_tts_key(error = FALSE)

Example output



mscstts documentation built on Oct. 28, 2020, 5:07 p.m.