--- title: "Audio Workflows with Microsoft Foundry" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Audio Workflows with Microsoft Foundry} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} # This vignette runs against recorded, credential-free API fixtures. The # fixtures are recorded once by a maintainer with real Azure OpenAI credentials # (data-raw/record-doc-outputs.R) and committed under vignettes/audio/. When the # fixtures are present every foundry_*() call below executes and shows its real # output; when they are absent the API chunks are not evaluated so the vignette # still builds anywhere without credentials. No output on this page is fabricated. fixture_dir <- "audio" recording <- nzchar(Sys.getenv("FOUNDRY_RECORD_DOCS")) have_fixtures <- dir.exists(fixture_dir) && length(list.files(fixture_dir)) > 0 run_api <- requireNamespace("httptest2", quietly = TRUE) && (recording || have_fixtures) # Attach foundryR before start_vignette(): httptest2 only sources the package's # inst/httptest2/start-vignette.R (which sets replay placeholders) from attached # packages. library(foundryR) if (run_api) { httptest2::start_vignette(fixture_dir) } knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = run_api ) # Embed a self-contained