View Source ExOpenAi.Audio.Transcription (ex_open_ai v2.0.1)
Represents a transcription request to the OpenAI API.
notes
Notes
The file must be a local file path, as URLs are not currently supported. If you need to transcribe audio from a URL, you will need to implement that functionality yourself.
On large bodies of text it can really take a while to process. Its recommended to stream to a process to save or play the file.
examples
Examples
iex> params = %{
...> model: "whisper-1",
...> file: "path/to/some_file.mp3"
...> }
iex> ExOpenAi.Audio.Transcription.create(params)
{:ok, %ExOpenAi.Audio.Transcription{...}}
iex> ExOpenAi.Audio.Transcription.create(%{})
{:error, %{}}