View source: R/create_translation.R
create_translation | R Documentation |
Translates audio into into English. See this page for details.
create_translation(
file,
model,
prompt = NULL,
response_format = "json",
temperature = 0,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
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 |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
For arguments description please refer to the official documentation.
Returns a list, elements of which contain a transcription and supplementary information.
Other audio functions:
create_transcription()
## Not run:
voice_sample_ua <- system.file(
"extdata", "sample-ua.m4a", package = "openai"
)
create_translation(file = voice_sample_ua, model = "whisper-1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.