Transcribes audio into the input language. See this page for details.
Usage
create_transcription(
file,
model,
prompt = NULL,
response_format = "json",
temperature = 0,
language = NULL,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)Arguments
- file
required; a length one character vector.
- model
required; a length one character vector.
- prompt
optional; defaults to
NULL; a length one character vector.- response_format
required; defaults to
"json"; length one character vector equals to"json". Currently only"json"is implemented.- temperature
required; defaults to
1; a length one numeric vector with the value between0and2.- language
optional; defaults to
NULL; a length one character vector.- openai_api_key
required; defaults to
Sys.getenv("OPENAI_API_KEY")(i.e., the value is retrieved from the.Renvironfile); a length one character vector. Specifies OpenAI API key.- openai_organization
optional; defaults to
NULL; a length one character vector. Specifies OpenAI organization.
Details
For arguments description please refer to the official documentation.
See also
Other audio functions:
create_translation()
Examples
if (FALSE) { # \dontrun{
voice_sample_en <- system.file(
"extdata", "sample-en.m4a", package = "openai"
)
create_transcription(file = voice_sample_en, model = "whisper-1")
} # }
