create_transcription {openai} | R Documentation |
Create transcription
Description
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 |
response_format |
required; defaults to |
temperature |
required; defaults to |
language |
optional; defaults to |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
Details
For arguments description please refer to the official documentation.
Value
Returns a list, elements of which contain a transcription and supplementary information.
See Also
Other audio functions:
create_translation()
Examples
## Not run:
voice_sample_en <- system.file(
"extdata", "sample-en.m4a", package = "openai"
)
create_transcription(file = voice_sample_en, model = "whisper-1")
## End(Not run)