
Last chance! 50% off unlimited learning
Sale ends in
Transcribes audio into the input language. See this page for details.
create_transcription(
file,
model,
prompt = NULL,
response_format = "json",
temperature = 0,
language = NULL,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
Returns a list, elements of which contain a transcription and supplementary information.
required; a length one character vector.
required; a length one character vector.
optional; defaults to NULL
; a length one character vector.
required; defaults to "json"
; length one character
vector equals to "json"
. Currently only "json"
is implemented.
required; defaults to 1
; a length one numeric vector
with the value between 0
and 2
.
optional; defaults to NULL
; a length one character vector.
required; defaults to Sys.getenv("OPENAI_API_KEY")
(i.e., the value is retrieved from the .Renviron
file); a length one
character vector. Specifies OpenAI API key.
optional; defaults to NULL
; a length one
character vector. Specifies OpenAI organization.
For arguments description please refer to the official documentation.
Other audio functions:
create_translation()
if (FALSE) {
voice_sample_en <- system.file(
"extdata", "sample-en.m4a", package = "openai"
)
create_transcription(file = voice_sample_en, model = "whisper-1")
}
Run the code above in your browser using DataLab