foundry_set_speech_endpoint: Set Microsoft Foundry Speech endpoint

View source: R/audio.R

foundry_set_speech_endpointR Documentation

Set Microsoft Foundry Speech endpoint

Description

Set the endpoint for Speech in Foundry Tools. This endpoint is used by foundry_transcribe() and foundry_translate_audio() when service = "speech".

Usage

foundry_set_speech_endpoint(endpoint)

Arguments

endpoint

Character. Speech endpoint URL.

Value

Invisibly returns the endpoint that was set.

Examples

local({
  old <- Sys.getenv("AZURE_FOUNDRY_SPEECH_ENDPOINT", unset = NA_character_)
  on.exit({
    if (is.na(old)) {
      Sys.unsetenv("AZURE_FOUNDRY_SPEECH_ENDPOINT")
    } else {
      Sys.setenv(AZURE_FOUNDRY_SPEECH_ENDPOINT = old)
    }
  })
  foundry_set_speech_endpoint("https://example.cognitiveservices.azure.com")
})

foundryR documentation built on Sept. 25, 2026, 1:10 a.m.