View Source OpenaiEx.Audio (openai_ex v0.1.9)
This module provides an implementation of the OpenAI audio API. The API reference can be found at https://platform.openai.com/docs/api-reference/audio.
api-fields
API Fields
The following fields can be used as parameters when creating a new audio request:
:file
:model
:prompt
:response_format
:temperature
:language
Link to this section Summary
Functions
Creates a new audio request with the given arguments.
Calls the audio transcription endpoint.
Calls the audio translation endpoint.
Link to this section Functions
Creates a new audio request with the given arguments.
arguments
Arguments
args
: A list of key-value pairs, or a map, representing the fields of the audio request.
returns
Returns
A map containing the fields of the audio request.
The :file
and :model
fields are required.
Calls the audio transcription endpoint.
arguments
Arguments
openai
: A map containing the OpenAI configuration.audio
: A map containing the audio request.
returns
Returns
A map containing the audio response.
See https://platform.openai.com/docs/api-reference/audio/create for more information.
Calls the audio translation endpoint.
arguments
Arguments
openai
: A map containing the OpenAI configuration.audio
: A map containing the audio request.
returns
Returns
A map containing the audio response.
See https://platform.openai.com/docs/api-reference/audio/create for more information.