choonkeat/elm-openai/2.1.0

NOTE: the latest version is 3.0.0

OpenAI.Audio

createTranscription : TranscriptionInput -> TaskInput (Error String) Output
createTranslation : TranslationInput -> TaskInput (Error String) Output
type Model
= Whisper_1
type alias Output =
{ text : String }
= JsonFormat
| VerboseJson
| TextFormat
| SrtFormat
| VttFormat
type alias TranscriptionInput =
{ file : String
, model : Model
, prompt : Maybe String
, response_format : Maybe ResponseFormat
, temperature : Maybe Float
, language : Maybe String
}

file: The the audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.

prompt: An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.

language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.

type alias TranslationInput =
{ file : String
, model : Model
, prompt : Maybe String
, response_format : Maybe ResponseFormat
, temperature : Maybe Float
}